projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b5890d8
)
[DCCP]: fix theoretical ccids_{read,write}_lock() race
author
Oleg Nesterov
<
[email protected]
>
Fri, 10 Aug 2007 22:21:17 +0000
(15:21 -0700)
committer
David S. Miller
<
[email protected]
>
Tue, 14 Aug 2007 05:52:09 +0000
(22:52 -0700)
Make sure that spin_unlock_wait() is properly ordered wrt atomic_inc().
(akpm: can't we convert this code to use rwlocks?)
Signed-off-by: Oleg Nesterov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/dccp/ccid.c
patch
|
blob
|
history
diff --git
a/net/dccp/ccid.c
b/net/dccp/ccid.c
index ccbf72c793b6c61381b40d466073a89f2bfb4575..c45088b5e6fb68f5c8a453561453061dee512d54 100644
(file)
--- a/
net/dccp/ccid.c
+++ b/
net/dccp/ccid.c
@@
-40,6
+40,7
@@
static inline void ccids_write_unlock(void)
static inline void ccids_read_lock(void)
{
atomic_inc(&ccids_lockct);
+ smp_mb__after_atomic_inc();
spin_unlock_wait(&ccids_lock);
}