KAMEZAWA Hiroyuki
9e7814404b
hold task->mempolicy while numa_maps scans.
...
/proc/<pid>/numa_maps scans vma and show mempolicy under
mmap_sem. It sometimes accesses task->mempolicy which can
be freed without mmap_sem and numa_maps can show some
garbage while scanning.
This patch tries to take reference count of task->mempolicy at reading
numa_maps before calling get_vma_policy(). By this, task->mempolicy
will not be freed until numa_maps reaches its end.
V2->v3
- updated comments to be more verbose.
- removed task_lock() in numa_maps code.
V1->V2
- access task->mempolicy only once and remember it. Becase kernel/exit.c
can overwrite it.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-19 14:32:10 -07:00
..
2012-10-12 09:59:23 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-11 10:21:16 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-13 13:23:39 -07:00
2012-07-30 17:25:21 -07:00
2012-10-09 23:33:55 -04:00
2012-10-14 13:39:34 -07:00
2012-10-02 21:35:55 -04:00
2012-09-18 01:01:37 -07:00
2012-09-21 03:13:08 -07:00
2012-10-02 11:11:09 -07:00
2012-07-14 16:38:34 +04:00
2012-10-02 13:38:27 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-12 10:52:03 +09:00
2012-07-23 00:01:29 +04:00
2012-10-09 23:23:53 +02:00
2012-10-16 18:12:38 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 23:33:38 -04:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-10-09 23:33:55 -04:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-10 11:15:20 +09:00
2012-10-09 23:33:38 -04:00
2012-10-09 22:34:52 +02:00
2012-10-09 16:22:39 +09:00
2012-10-09 23:33:55 -04:00
2012-09-12 15:52:03 +02:00
2012-10-08 06:36:39 +09:00
2012-10-09 15:04:25 +01:00
2012-10-03 08:48:21 -07:00
2012-10-17 10:14:14 -04:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-13 10:53:54 +09:00
2012-10-09 18:35:22 -04:00
2012-10-09 16:22:17 +09:00
2012-06-01 19:51:22 -07:00
2012-09-26 22:20:08 -04:00
2012-10-02 20:25:04 -07:00
2012-10-09 16:22:17 +09:00
2012-10-06 03:05:31 +09:00
2012-10-02 21:35:55 -04:00
2012-10-19 14:32:10 -07:00
2012-09-20 17:04:50 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-16 18:12:38 -07:00
2012-07-14 16:34:47 +04:00
2012-10-09 23:33:55 -04:00
2012-10-02 21:35:55 -04:00
2012-10-02 20:25:04 -07:00
2012-09-04 16:11:31 -07:00
2012-10-09 23:33:39 -04:00
2012-10-09 16:22:17 +09:00
2012-10-04 09:14:01 -07:00
2012-10-09 23:33:39 -04:00
2012-10-09 23:33:55 -04:00
2012-07-22 23:57:59 +04:00
2012-03-20 21:29:45 -04:00
2012-09-07 14:57:46 -04:00
2012-07-14 16:34:47 +04:00
2012-10-06 03:05:16 +09:00
2012-10-10 12:02:25 +09:00
2012-10-10 12:02:25 +09:00
2012-03-20 21:29:46 -04:00
2012-10-06 03:05:16 +09:00
2012-05-06 13:43:41 +08:00
2012-03-20 21:29:46 -04:00
2012-04-20 17:29:13 -07:00
2012-09-09 10:35:38 +02:00
2012-09-28 10:38:48 +02:00
2012-10-11 09:04:23 +09:00
2012-10-08 06:36:39 +09:00
2011-12-13 11:18:17 -08:00
2012-10-06 03:05:17 +09:00
2012-10-02 20:25:04 -07:00
2012-10-12 20:14:55 -04:00
2012-10-16 13:36:50 -04:00
2012-10-06 03:05:15 +09:00
2012-10-02 20:25:04 -07:00
2012-02-28 19:31:58 -05:00
2012-08-09 15:23:09 +02:00
2012-05-31 17:49:32 -07:00
2012-10-06 03:05:00 +09:00
2012-10-12 20:15:09 -04:00
2012-10-09 15:52:31 +09:00
2012-09-26 22:20:08 -04:00
2012-07-16 08:33:14 -07:00
2012-10-10 01:15:44 -04:00
2012-10-09 23:33:38 -04:00
2012-10-12 20:14:55 -04:00
2012-07-14 16:32:47 +04:00
2012-10-12 10:46:03 +09:00
2012-09-18 01:01:35 -07:00
2012-10-09 16:22:39 +09:00
2012-10-12 20:15:09 -04:00
2012-09-26 22:20:08 -04:00
2012-05-30 08:52:42 -07:00
2012-03-21 13:36:41 -07:00
2012-10-06 03:05:15 +09:00
2012-09-05 10:59:30 +02:00
2012-10-09 18:35:22 -04:00
2012-10-06 03:05:15 +09:00
2012-07-14 16:32:48 +04:00
2012-02-28 19:31:58 -05:00
2012-10-12 20:15:10 -04:00
2012-10-12 20:14:55 -04:00
2012-10-12 20:15:09 -04:00
2012-09-26 21:08:52 -04:00
2012-07-14 16:37:27 +04:00
2012-01-03 22:57:11 -05:00
2012-09-18 01:01:35 -07:00
2012-07-14 16:32:48 +04:00
2012-10-02 21:35:55 -04:00
2012-10-02 21:35:55 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-08-14 21:47:55 -07:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-02-28 19:31:58 -05:00
2012-10-02 20:25:04 -07:00
2012-09-26 22:20:08 -04:00
2012-10-09 23:33:39 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-10-12 13:16:48 -07:00
2012-10-18 12:35:58 -07:00