linux/net/core
WANG Cong f51048c3e0 bonding: avoid NETDEV_CHANGEMTU event when unregistering slave
As Hongjun/Nicolas summarized in their original patch:

"
When a device changes from one netns to another, it's first unregistered,
then the netns reference is updated and the dev is registered in the new
netns. Thus, when a slave moves to another netns, it is first
unregistered. This triggers a NETDEV_UNREGISTER event which is caught by
the bonding driver. The driver calls bond_release(), which calls
dev_set_mtu() and thus triggers NETDEV_CHANGEMTU (the device is still in
the old netns).
"

This is a very special case, because the device is being unregistered
no one should still care about the NETDEV_CHANGEMTU event triggered
at this point, we can avoid broadcasting this event on this path,
and avoid touching inetdev_event()/addrconf_notify() path.

It requires to export __dev_set_mtu() to bonding driver.

Reported-by: Hongjun Li <hongjun.li@6wind.com>
Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-08 11:23:29 +01:00
..
Makefile
datagram.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
dev.c bonding: avoid NETDEV_CHANGEMTU event when unregistering slave 2017-07-08 11:23:29 +01:00
dev_addr_lists.c
dev_ioctl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-06-21 17:35:22 -04:00
devlink.c devlink: fix potential memort leak 2017-06-05 11:24:28 -04:00
drop_monitor.c
dst.c net: store port/representator id in metadata_dst 2017-06-25 11:42:01 -04:00
dst_cache.c
ethtool.c ethtool: don't open-code memdup_user() 2017-06-30 02:04:10 -04:00
fib_rules.c net: avoid one splat in fib_nl_delrule() 2017-07-03 03:29:14 -07:00
filter.c bpf: add missing break in for the TCP_BPF_SNDCWND_CLAMP case 2017-07-05 09:08:54 +01:00
flow.c
flow_dissector.c net/flow_dissector: add support for dissection of misc ip header fields 2017-06-04 18:12:23 -04:00
gen_estimator.c
gen_stats.c
gro_cells.c net: Generic XDP 2017-04-25 13:33:49 -04:00
hwbm.c
link_watch.c
lwt_bpf.c net: add extack arg to lwtunnel build state 2017-05-30 11:55:32 -04:00
lwtunnel.c net: add extack arg to lwtunnel build state 2017-05-30 11:55:32 -04:00
neighbour.c net: convert neigh_params.refcnt from atomic_t to refcount_t 2017-07-01 07:39:07 -07:00
net-procfs.c net-procfs: Use vsnprintf extension %phN 2017-06-04 19:52:58 -04:00
net-sysfs.c net: convert net.passive from atomic_t to refcount_t 2017-07-01 07:39:09 -07:00
net-sysfs.h
net-traces.c
net_namespace.c net: convert net.passive from atomic_t to refcount_t 2017-07-01 07:39:09 -07:00
netclassid_cgroup.c
netevent.c
netpoll.c net: convert netpoll_info.refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
netprio_cgroup.c
pktgen.c net: convert sk_buff.users from atomic_t to refcount_t 2017-07-01 07:39:07 -07:00
ptp_classifier.c
request_sock.c
rtnetlink.c net: convert sk_buff.users from atomic_t to refcount_t 2017-07-01 07:39:07 -07:00
scm.c
secure_seq.c tcp: Namespaceify sysctl_tcp_timestamps 2017-06-08 10:53:29 -04:00
skbuff.c net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
sock.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
sock_diag.c netlink: extended ACK reporting 2017-04-13 13:58:20 -04:00
sock_reuseport.c
stream.c
sysctl_net_core.c net: move somaxconn init from sysctl code 2017-05-25 13:12:17 -04:00
timestamping.c
tso.c
utils.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00