summaryrefslogtreecommitdiff
path: root/net/core/rtnetlink.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-06-06 06:44:03 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-26 15:12:38 -0400
commit6a827d8a67f750f3096e668657e16d479363d4b5 (patch)
tree11687aa90e59cc27704f62682f915ae2e2f38088 /net/core/rtnetlink.c
parent9deb5f0852ddb318511605433367fcb02a738dc2 (diff)
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>
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r--net/core/rtnetlink.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 054ebbf73236..642151c003e4 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1601,7 +1601,6 @@ static int rtnl_dellink(struct sk_buff *skb, struct nlmsghdr *nlh)
ops->dellink(dev, &list_kill);
unregister_netdevice_many(&list_kill);
- list_del(&list_kill);
return 0;
}