Files
kernel-tenderloin-3.0/include/linux
Lai Jiangshan 146aa1bd05 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.]

[akpm@linux-foundation.org: repair comments]
[menage@google.com: eliminate race in css_set refcounting]
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:38 -07:00
..
2008-07-25 10:53:30 -07:00
2008-10-13 21:51:51 +01:00
2008-10-16 11:21:38 -07:00
2008-10-15 15:54:56 -04:00
2008-09-12 16:30:20 -07:00
2008-07-01 11:28:06 +10:00
2008-08-12 10:13:38 +10:00
2008-06-19 10:42:17 +10:00
2008-10-16 11:21:51 -07:00
2008-07-24 10:47:24 -07:00
2008-07-24 10:47:33 -07:00
2008-06-06 11:29:10 -07:00
2008-05-29 01:38:46 -07:00
2008-10-20 08:52:32 -07:00
2008-07-04 10:40:05 -07:00
2008-10-16 11:21:32 -07:00
2008-07-25 10:53:33 -07:00
2008-07-20 17:12:38 -07:00
2008-07-22 17:30:57 -07:00
2008-10-10 13:37:12 +01:00
2008-08-28 11:49:15 -05:00
2008-07-21 12:00:37 +01:00
2008-10-15 14:24:08 +02:00
2008-10-12 12:05:55 +02:00
2008-07-24 10:47:29 -07:00
2008-08-20 13:19:51 -07:00
2008-05-16 17:22:26 -04:00
2008-10-08 19:44:18 -04:00
2008-08-12 16:07:31 -07:00
2008-07-26 20:53:20 -04:00
2008-07-25 10:53:48 -07:00
2008-07-20 17:12:36 -07:00
2008-09-22 07:29:31 +01:00
2008-10-16 11:21:40 -07:00
2008-07-20 17:12:36 -07:00
2008-10-14 23:51:02 +02:00
2008-07-31 18:45:41 +02:00
2008-08-08 15:13:27 +01:00
2008-08-28 08:33:23 +02:00
2008-10-16 11:21:38 -07:00
2008-07-25 10:53:42 -07:00
2008-06-11 21:00:38 -07:00
2008-07-18 18:05:19 -07:00
2008-06-11 21:00:38 -07:00
2008-10-09 11:59:55 -07:00
2008-07-14 22:49:06 -07:00
2008-09-22 21:28:11 -07:00
2008-08-02 18:36:10 +01:00
2008-10-07 15:34:37 -07:00
2008-07-25 10:53:39 -07:00
2008-10-15 14:24:08 +02:00
2008-10-15 14:24:08 +02:00
2008-06-11 21:00:38 -07:00
2008-07-18 22:50:34 +02:00
2008-07-20 17:12:37 -07:00
2008-06-04 17:50:17 +01:00
2008-05-20 12:17:39 -04:00
2008-10-12 11:44:37 -07:00
2008-07-24 10:47:17 -07:00
2008-07-04 10:40:05 -07:00
2008-07-23 09:49:56 +01:00
2008-09-01 09:47:16 +02:00
2008-08-11 15:25:07 +02:00
2008-10-13 09:47:43 +11:00
2008-10-09 08:56:06 +02:00
2008-05-23 22:26:03 +02:00
2008-10-20 08:50:26 -07:00
2008-07-27 01:56:38 +02:00
2008-07-27 01:54:58 +02:00
2008-08-02 16:28:50 +02:00
2008-10-20 08:52:31 -07:00
2008-10-20 08:52:30 -07:00
2008-07-28 16:30:21 -07:00
2008-10-20 08:52:31 -07:00
2008-07-25 10:53:34 -07:00
2008-06-06 11:29:12 -07:00
2008-08-26 10:37:20 -07:00
2008-10-01 07:03:24 -07:00
2008-07-26 11:48:04 +02:00
2008-10-20 08:52:32 -07:00
2008-10-20 08:50:26 -07:00
2008-10-16 11:21:49 -07:00
2008-06-10 14:37:03 -07:00
2008-10-16 11:21:45 -07:00
2008-10-08 16:38:41 -07:00
2008-08-05 14:33:50 -07:00
2008-06-11 21:00:38 -07:00
2008-06-11 21:00:38 -07:00
2008-08-07 17:18:47 -07:00
2008-05-19 16:25:39 +01:00
2008-10-16 11:21:46 -07:00
2008-10-16 11:21:46 -07:00
2008-10-02 15:53:13 -07:00
2008-07-25 10:53:29 -07:00
2008-08-15 17:03:06 +02:00
2008-05-25 07:09:47 +02:00
2008-08-22 16:29:57 -04:00
2008-10-20 08:52:31 -07:00
2008-09-22 19:51:15 -07:00
2008-10-20 08:52:32 -07:00
2008-07-25 10:53:42 -07:00
2008-07-24 08:31:21 -04:00
2008-10-07 14:22:33 -07:00
2008-08-05 09:28:47 +03:00
2008-07-25 10:53:30 -07:00
2008-09-09 17:41:42 +02:00
2008-06-20 14:05:53 -06:00
2008-08-11 09:30:24 +02:00
2008-07-20 17:12:37 -07:00
2008-10-20 08:52:31 -07:00
2008-10-16 11:21:47 -07:00
2008-10-07 14:43:06 -07:00
2008-10-16 11:21:45 -07:00
2008-10-13 09:51:40 -07:00
2008-10-16 11:21:33 -07:00
2008-09-05 14:39:38 -07:00
2008-07-20 17:12:34 -07:00
2008-10-17 14:41:02 -07:00
2008-07-21 15:15:55 -07:00
2008-05-09 07:45:18 -07:00
2008-10-20 08:52:32 -07:00
2008-10-16 11:21:31 -07:00
2008-07-25 10:53:40 -07:00