net: force a list_del() in unregister_netdevice_many()
authorEric Dumazet <edumazet@google.com>
Fri, 6 Jun 2014 13:44:03 +0000 (06:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Jun 2014 19:15:39 +0000 (15:15 -0400)
commit0d0fc9f9e888a6e3fdabdfc08b7c4044b58bc87a
tree369a5e8f50b7ed4c222c79a5066aecef0bab5f08
parentcff9d473bda5185fd537e93cefd70c4bc4eb4e99
net: force a list_del() in unregister_netdevice_many()

[ Upstream commit 87757a917b0b3c0787e0563c679762152be81312 ]

unregister_netdevice_many() API is error prone and we had too
many bugs because of dangling LIST_HEAD on stacks.

See commit f87e6f47933e3e ("net: dont leave active on stack LIST_HEAD")

In fact, instead of making sure no caller leaves an active list_head,
just force a list_del() in the callee. No one seems to need to access
the list after unregister_netdevice_many()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/macvlan.c
net/core/dev.c
net/core/rtnetlink.c
net/mac80211/iface.c