diff options
author | Stanislaw Gruszka <stf_xl@wp.pl> | 2005-11-29 19:16:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-29 19:16:21 -0500 |
commit | aaaaaadbe7a663d110814db50fcbe7d320eb4c32 (patch) | |
tree | 316bdbd49e3a6ac7a78cad8797d148f79a343d45 /net/atm/resources.h | |
parent | 49693280262a149e5430d3401e263e464c88334a (diff) |
[ATM]: avoid race conditions related to atm_devs list
Use semaphore to protect atm_devs list, as no one need access to it from
interrupt context. Avoid race conditions between atm_dev_register(),
atm_dev_lookup() and atm_dev_deregister(). Fix double spin_unlock() bug.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/resources.h')
-rw-r--r-- | net/atm/resources.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/atm/resources.h b/net/atm/resources.h index 12910619dbb6..b7fb82a93b42 100644 --- a/net/atm/resources.h +++ b/net/atm/resources.h | |||
@@ -11,8 +11,7 @@ | |||
11 | 11 | ||
12 | 12 | ||
13 | extern struct list_head atm_devs; | 13 | extern struct list_head atm_devs; |
14 | extern spinlock_t atm_dev_lock; | 14 | extern struct semaphore atm_dev_mutex; |
15 | |||
16 | 15 | ||
17 | int atm_dev_ioctl(unsigned int cmd, void __user *arg); | 16 | int atm_dev_ioctl(unsigned int cmd, void __user *arg); |
18 | 17 | ||