diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2019-03-06 06:00:00 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2019-03-06 06:12:39 +0100 |
commit | 981f5f7e40cbf26bc0beb0a2aa5f3c562b83c85b (patch) | |
tree | 09bfe39ab95e41093246a41690bb470a8bfe0fef /target/linux/lantiq/patches-4.4/0047-poweroff.patch | |
parent | eab65374490a53dd88bdff00be11cdf1fcb5fe62 (diff) | |
download | upstream-981f5f7e40cbf26bc0beb0a2aa5f3c562b83c85b.tar.gz upstream-981f5f7e40cbf26bc0beb0a2aa5f3c562b83c85b.tar.bz2 upstream-981f5f7e40cbf26bc0beb0a2aa5f3c562b83c85b.zip |
kernel: fix refcnt leak in LED netdev trigger on interface rename
Renaming a netdev-trigger-tracked interface was resulting in an
unbalanced dev_hold().
Example:
> iw phy phy0 interface add foo type __ap
> echo netdev > trigger
> echo foo > device_name
> ip link set foo name bar
> iw dev bar del
[ 237.355366] unregister_netdevice: waiting for bar to become free. Usage count = 1
[ 247.435362] unregister_netdevice: waiting for bar to become free. Usage count = 1
[ 257.545366] unregister_netdevice: waiting for bar to become free. Usage count = 1
Above problem was caused by trigger checking a dev->name which obviously
changes after renaming an interface. It meant missing all further events
including the NETDEV_UNREGISTER which is required for calling dev_put().
This change fixes that by:
1) Comparing device struct *address* for notification-filtering purposes
2) Dropping unneeded NETDEV_CHANGENAME code (no behavior change)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit eea538204bb973d73d3bc3d38947d7f85214d486)
Diffstat (limited to 'target/linux/lantiq/patches-4.4/0047-poweroff.patch')
0 files changed, 0 insertions, 0 deletions