diff options
| author | Lai Jiangshan <[email protected]> | 2008-10-18 20:28:03 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2008-10-20 08:52:38 -0700 |
| commit | 146aa1bd0511f88ddb4e92fafa2b8aad4f2f65f3 (patch) | |
| tree | d7deb46b9a38f82f109b2126317899efbbce41c2 /include/linux/timerqueue.h | |
| parent | 248736c2a57206388c86f8cdd3392ee986e84f9f (diff) | |
cgroups: fix probable race with put_css_set[_taskexit] and find_css_set
put_css_set_taskexit may be called when find_css_set is called on other
cpu. And the race will occur:
put_css_set_taskexit side find_css_set side
|
atomic_dec_and_test(&kref->refcount) |
/* kref->refcount = 0 */ |
....................................................................
| read_lock(&css_set_lock)
| find_existing_css_set
| get_css_set
| read_unlock(&css_set_lock);
....................................................................
__release_css_set |
....................................................................
| /* use a released css_set */
|
[put_css_set is the same. But in the current code, all put_css_set are
put into cgroup mutex critical region as the same as find_css_set.]
[[email protected]: repair comments]
[[email protected]: eliminate race in css_set refcounting]
Signed-off-by: Lai Jiangshan <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Paul Menage <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions