Re: [Patch net-next] net: remove some useless list_del()
From: David Miller <davem@davemloft.net>
Date: 2014-06-04 00:24:53
From: Cong Wang <redacted> Date: Tue, 3 Jun 2014 17:11:55 -0700
"list_kill" is allocated on stack and it's a list head, it is pointless to call list_del(&kill_list) especially after unregister_netdevice_many(). Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <redacted>
Do not edit what you do not understand:
commit ceaaec98ad99859ac90ac6863ad0a6cd075d8e0e
Author: Eric Dumazet [off-list ref]
Date: Thu Feb 17 22:59:19 2011 +0000
net: deinit automatic LIST_HEAD
commit 9b5e383c11b08784 (net: Introduce
unregister_netdevice_many()) left an active LIST_HEAD() in
rollback_registered(), with possible memory corruption.
Even if device is freed without touching its unreg_list (and therefore
touching the previous memory location holding LISTE_HEAD(single), better
close the bug for good, since its really subtle.
(Same fix for default_device_exit_batch() for completeness)
Reported-by: Michal Hocko [off-list ref]
Tested-by: Michal Hocko [off-list ref]
Reported-by: Eric W. Biderman [off-list ref]
Tested-by: Eric W. Biderman [off-list ref]
Signed-off-by: Linus Torvalds [off-list ref]
Signed-off-by: Eric Dumazet [off-list ref]
CC: Ingo Molnar [off-list ref]
CC: Octavian Purdila [off-list ref]
CC: stable [off-list ref] [.33+]
Signed-off-by: David S. Miller [off-list ref]