mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 01:51:18 +00:00
net: atlantic: fix out of range usage of active_vlans array
commit5a292c89a8
upstream. fix static checker warning: drivers/net/ethernet/aquantia/atlantic/aq_filters.c:166 aq_check_approve_fvlan() error: passing untrusted data to 'test_bit()' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes:7975d2aff5
: ("net: aquantia: add support of rx-vlan-filter offload") Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
10b2668cb3
commit
10e0190f0b
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ aq_check_approve_fvlan(struct aq_nic_s *aq_nic,
|
|||
}
|
||||
|
||||
if ((aq_nic->ndev->features & NETIF_F_HW_VLAN_CTAG_FILTER) &&
|
||||
(!test_bit(be16_to_cpu(fsp->h_ext.vlan_tci),
|
||||
(!test_bit(be16_to_cpu(fsp->h_ext.vlan_tci) & VLAN_VID_MASK,
|
||||
aq_nic->active_vlans))) {
|
||||
netdev_err(aq_nic->ndev,
|
||||
"ethtool: unknown vlan-id specified");
|
||||
|
|
Loading…
Reference in a new issue