aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/Space.c
diff options
context:
space:
mode:
authorMichal Ostrowski <mostrows@earthlink.net>2007-04-20 19:59:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:29:21 -0400
commit42dc9cd54b7290f862874a2544e50395e5719985 (patch)
treef37f4465f6adbdcdc9b961aa867919a3970190ce /drivers/net/Space.c
parent202a03acf9994076055df40ae093a5c5474ad0bd (diff)
[PPPOE]: Fix device tear-down notification.
pppoe_flush_dev() kicks all sockets bound to a device that is going down. In doing so, locks must be taken in the right order consistently (sock lock, followed by the pppoe_hash_lock). However, the scan process is based on us holding the sock lock. So, when something is found in the scan we must release the lock we're holding and grab the sock lock. This patch fixes race conditions between this code and pppoe_release(), both of which perform similar functions but would naturally prefer to grab locks in opposing orders. Both code paths are now going after these locks in a consistent manner. pppoe_hash_lock protects the contents of the "pppox_sock" objects that reside inside the hash. Thus, NULL'ing out the pppoe_dev field should be done under the protection of this lock. Signed-off-by: Michal Ostrowski <mostrows@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/Space.c')
0 files changed, 0 insertions, 0 deletions