summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2013-10-05 19:26:05 -0700
committerDavid S. Miller <davem@davemloft.net>2013-10-07 15:23:14 -0400
commit5cde282938915f36a2e6769b51c24c4159654859 (patch)
tree9e364e2988fb3556313eda68eea6fb5655b6df1e /include/linux/netdevice.h
parentd639feaaf3f40cd90b75a2fec5b7d5c3f96c2c88 (diff)
downloadlinux-5cde282938915f36a2e6769b51c24c4159654859.tar.gz
linux-5cde282938915f36a2e6769b51c24c4159654859.tar.bz2
linux-5cde282938915f36a2e6769b51c24c4159654859.zip
net: Separate the close_list and the unreg_list v2
Separate the unreg_list and the close_list in dev_close_many preventing dev_close_many from permuting the unreg_list. The permutations of the unreg_list have resulted in cases where the loopback device is accessed it has been freed in code such as dst_ifdown. Resulting in subtle memory corruption. This is the second bug from sharing the storage between the close_list and the unreg_list. The issues that crop up with sharing are apparently too subtle to show up in normal testing or usage, so let's forget about being clever and use two separate lists. v2: Make all callers pass in a close_list to dev_close_many Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f5cd464271bf..6d77e0f3cc10 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1143,6 +1143,7 @@ struct net_device {
struct list_head dev_list;
struct list_head napi_list;
struct list_head unreg_list;
+ struct list_head close_list;
/* directly linked devices, like slaves for bonding */
struct {