summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2020-02-17 15:27:58 +0300
committerDavid S. Miller <davem@davemloft.net>2020-02-18 01:30:54 +0300
commitbd706ff8ea2b6e2d3f21f0863b2fc42f860f8ba2 (patch)
treeea4e9fd226dcaec59d14d0b17b6998982bdb69c3 /net
parent3e07df430c2b4ffe003085a0b3e6b0b041187632 (diff)
downloadlinux-bd706ff8ea2b6e2d3f21f0863b2fc42f860f8ba2.tar.xz
net: vlan: suppress "failed to kill vid" warnings
When a real dev unregisters, vlan_device_event() also unregisters all of its vlan interfaces. For each VID this ends up in __vlan_vid_del(), which attempts to remove the VID from the real dev's VLAN filter. But the unregistering real dev might no longer be able to issue the required IOs, and return an error. Subsequently we raise a noisy warning msg that is not appropriate for this situation: the real dev is being torn down anyway, there shouldn't be any worry about cleanly releasing all of its HW-internal resources. So to avoid scaring innocent users, suppress this warning when the failed deletion happens on an unregistering device. While at it also convert the raw pr_warn() to a more fitting netdev_warn(). Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/8021q/vlan_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index a313165e7a67..78ec2e1b14d1 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -359,9 +359,8 @@ static void __vlan_vid_del(struct vlan_info *vlan_info,
int err;
err = vlan_kill_rx_filter_info(dev, proto, vid);
- if (err)
- pr_warn("failed to kill vid %04x/%d for device %s\n",
- proto, vid, dev->name);
+ if (err && dev->reg_state != NETREG_UNREGISTERING)
+ netdev_warn(dev, "failed to kill vid %04x/%d\n", proto, vid);
list_del(&vid_info->list);
kfree(vid_info);