• Xin Long's avatar
    ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf · 3d7eec16
    Xin Long authored
    [ Upstream commit 2a31e4bd9ad255ee40809b5c798c4b1c2b09703b ]
    
    ip_vs_dst_event is supposed to clean up all dst used in ipvs'
    destinations when a net dev is going down. But it works only
    when the dst's dev is the same as the dev from the event.
    
    Now with the same priority but late registration,
    ip_vs_dst_notifier is always called later than ipv6_dev_notf
    where the dst's dev is set to lo for NETDEV_DOWN event.
    
    As the dst's dev lo is not the same as the dev from the event
    in ip_vs_dst_event, ip_vs_dst_notifier doesn't actually work.
    Also as these dst have to wait for dest_trash_timer to clean
    them up. It would cause some non-permanent kernel warnings:
    
      unregister_netdevice: waiting for br0 to become free. Usage count = 3
    
    To fix it, call ip_vs_dst_notifier earlier than ipv6_dev_notf
    by increasing its priority to ADDRCONF_NOTIFY_PRIORITY + 5.
    
    Note that for ipv4 route fib_netdev_notifier doesn't set dst's
    dev to lo in NETDEV_DOWN event, so this fix is only needed when
    IP_VS_IPV6 is defined.
    
    Fixes: 7a4f0761 ("IPVS: init and cleanup restructuring")
    Reported-by: default avatarLi Shuang <shuali@redhat.com>
    Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
    Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
    Acked-by: default avatarSimon Horman <horms@verge.net.au>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    3d7eec16
Name
Last commit
Last update
..
6lowpan Loading commit data...
802 Loading commit data...
8021q Loading commit data...
9p Loading commit data...
appletalk Loading commit data...
atm Loading commit data...
ax25 Loading commit data...
batman-adv Loading commit data...
bluetooth Loading commit data...
bridge Loading commit data...
caif Loading commit data...
can Loading commit data...
ceph Loading commit data...
core Loading commit data...
dcb Loading commit data...
dccp Loading commit data...
decnet Loading commit data...
dns_resolver Loading commit data...
dsa Loading commit data...
ethernet Loading commit data...
hsr Loading commit data...
ieee802154 Loading commit data...
ipv4 Loading commit data...
ipv6 Loading commit data...
ipx Loading commit data...
irda Loading commit data...
iucv Loading commit data...
kcm Loading commit data...
key Loading commit data...
l2tp Loading commit data...
l3mdev Loading commit data...
lapb Loading commit data...
llc Loading commit data...
mac80211 Loading commit data...
mac802154 Loading commit data...
mpls Loading commit data...
ncsi Loading commit data...
netfilter Loading commit data...
netlabel Loading commit data...
netlink Loading commit data...
netrom Loading commit data...
nfc Loading commit data...
openvswitch Loading commit data...
packet Loading commit data...
phonet Loading commit data...
qrtr Loading commit data...
rds Loading commit data...
rfkill Loading commit data...
rose Loading commit data...
rxrpc Loading commit data...
sched Loading commit data...
sctp Loading commit data...
strparser Loading commit data...
sunrpc Loading commit data...
switchdev Loading commit data...
tipc Loading commit data...
unix Loading commit data...
vmw_vsock Loading commit data...
wimax Loading commit data...
wireless Loading commit data...
x25 Loading commit data...
xfrm Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
compat.c Loading commit data...
socket.c Loading commit data...
sysctl_net.c Loading commit data...