Skip to content

Commit ace0ab3

Browse files
w1ldptrdavem330
authored andcommitted
Revert "vlan: Fix VLAN 0 memory leak"
This reverts commit 718cb09. The commit triggers multiple syzbot issues, probably due to possibility of manually creating VLAN 0 on netdevice which will cause the code to delete it since it can't distinguish such VLAN from implicit VLAN 0 automatically created for devices with NETIF_F_HW_VLAN_CTAG_FILTER feature. Reported-by: syzbot+662f783a5cdf3add2719@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/00000000000090196d0602a6167d@google.com/ Reported-by: syzbot+4b4f06495414e92701d5@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/00000000000096ae870602a61602@google.com/ Reported-by: syzbot+d810d3cd45ed1848c3f7@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/0000000000009f0f9c0602a616ce@google.com/ Fixes: 718cb09 ("vlan: Fix VLAN 0 memory leak") Signed-off-by: Vlad Buslov <vladbu@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent cc941e5 commit ace0ab3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

net/8021q/vlan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
384384
dev->name);
385385
vlan_vid_add(dev, htons(ETH_P_8021Q), 0);
386386
}
387-
if (event == NETDEV_DOWN)
387+
if (event == NETDEV_DOWN &&
388+
(dev->features & NETIF_F_HW_VLAN_CTAG_FILTER))
388389
vlan_vid_del(dev, htons(ETH_P_8021Q), 0);
389390

390391
vlan_info = rtnl_dereference(dev->vlan_info);

0 commit comments

Comments
 (0)