]> git.baikalelectronics.ru Git - kernel.git/commit
net: Separate the close_list and the unreg_list v2
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 6 Oct 2013 02:26:05 +0000 (19:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Oct 2013 19:23:14 +0000 (15:23 -0400)
commite368188fefbaa0639c47c8b549c08772be700fc1
tree9e364e2988fb3556313eda68eea6fb5655b6df1e
parent3bab635bbe994add2e66557eb38f58aa9bf952f8
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>
include/linux/netdevice.h
net/core/dev.c
net/sched/sch_generic.c