Mitsuo Hayasaka
f5252e009d
mm: avoid null pointer access in vm_struct via /proc/vmallocinfo
...
The /proc/vmallocinfo shows information about vmalloc allocations in
vmlist that is a linklist of vm_struct. It, however, may access pages
field of vm_struct where a page was not allocated. This results in a null
pointer access and leads to a kernel panic.
Why this happens: In __vmalloc_node_range() called from vmalloc(), newly
allocated vm_struct is added to vmlist at __get_vm_area_node() and then,
some fields of vm_struct such as nr_pages and pages are set at
__vmalloc_area_node(). In other words, it is added to vmlist before it is
fully initialized. At the same time, when the /proc/vmallocinfo is read,
it accesses the pages field of vm_struct according to the nr_pages field
at show_numa_info(). Thus, a null pointer access happens.
The patch adds the newly allocated vm_struct to the vmlist *after* it is
fully initialized. So, it can avoid accessing the pages field with
unallocated page when show_numa_info() is called.
Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-31 17:30:47 -07:00
..
2011-10-26 23:15:28 +02:00
2011-09-19 16:10:11 -04:00
2011-08-26 12:02:50 -04:00
2011-10-17 19:22:46 -04:00
2011-10-28 16:42:18 -07:00
2011-03-31 11:26:23 -03:00
2011-07-27 17:52:58 -03:00
2011-10-11 20:56:41 -07:00
2011-10-18 21:26:55 -07:00
2011-03-31 11:26:23 -03:00
2011-10-28 14:25:01 -07:00
2011-10-19 03:42:26 -04:00
2011-10-27 09:11:34 -04:00
2011-07-22 13:09:55 -07:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-03-31 11:26:23 -03:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-09-13 22:44:10 -04:00
2011-10-20 11:41:49 +02:00
2011-10-26 14:52:52 +02:00
2011-07-08 17:01:58 +04:00
2011-07-28 11:31:47 +10:00
2011-10-28 14:25:01 -07:00
2011-07-15 13:54:17 -06:00
2011-09-13 15:42:30 -04:00
2011-10-25 15:44:06 +02:00
2011-07-14 14:45:59 -07:00
2011-10-28 14:25:01 -07:00
2011-03-31 11:26:23 -03:00
2011-02-24 19:58:42 +01:00
2011-08-03 21:53:27 -10:00
2011-07-22 08:25:37 -07:00
2011-07-26 16:49:47 -07:00
2011-08-10 14:55:29 -07:00
2011-06-21 10:49:31 +02:00
2011-07-20 20:47:43 -04:00
2011-06-06 22:55:11 -07:00
2011-03-15 02:42:32 -04:00
2011-08-26 12:02:50 -04:00
2011-06-22 16:09:57 -04:00
2011-07-26 16:49:47 -07:00
2011-10-26 15:43:26 -04:00
2011-10-26 15:43:25 -04:00
2011-07-26 16:49:47 -07:00
2011-06-30 13:31:57 +02:00
2011-08-26 12:02:50 -04:00
2011-07-26 16:49:47 -07:00
2011-03-22 17:43:59 -07:00
2011-09-14 18:09:38 -07:00
2011-03-11 14:25:50 +00:00
2011-07-20 01:43:10 -04:00
2011-03-08 08:28:01 +01:00
2011-07-26 16:49:47 -07:00
2011-08-03 11:30:42 -04:00
2011-05-26 17:12:38 -07:00
2011-08-23 14:50:29 +02:00
2011-08-24 16:04:34 +02:00
2011-08-11 10:36:05 +02:00
2011-08-09 01:33:04 -07:00
2011-05-25 08:39:30 -07:00
2011-05-19 16:55:27 +09:30
2011-07-31 22:05:09 +02:00
2011-07-26 16:49:47 -07:00
2011-05-25 08:39:43 -07:00
2011-10-17 19:22:46 -04:00
2011-10-20 18:21:36 -04:00
2011-03-31 11:26:23 -03:00
2011-03-31 11:26:23 -03:00
2011-05-26 17:12:34 -07:00
2011-07-08 22:21:58 +02:00
2011-05-26 10:01:36 -06:00
2011-09-27 09:25:02 +01:00
2011-10-13 14:36:58 +01:00
2011-09-08 11:10:56 +02:00
2011-07-22 17:05:15 -07:00
2011-03-31 11:26:23 -03:00
2011-09-28 13:41:50 -04:00
2011-03-22 17:44:00 -07:00
2011-10-31 17:30:44 -07:00
2011-03-22 17:44:10 -07:00
2011-05-25 08:39:47 -07:00
2011-05-25 08:39:46 -07:00
2011-07-26 16:49:47 -07:00
2011-08-25 16:25:33 -07:00
2011-06-03 15:01:07 -04:00
2011-03-31 11:26:23 -03:00
2011-09-23 12:05:29 +05:30
2011-07-25 20:57:14 -07:00
2011-06-28 13:54:26 -07:00
2011-08-03 19:06:37 -04:00
2011-07-26 16:49:44 -07:00
2011-05-28 17:02:57 +02:00
2011-05-26 17:12:37 -07:00
2011-06-03 15:01:06 -04:00
2011-03-22 17:44:15 -07:00
2011-08-08 11:33:23 -07:00
2011-07-26 16:49:47 -07:00
2011-08-06 22:12:37 -07:00
2011-07-06 14:44:42 -07:00
2011-07-25 20:57:16 -07:00
2011-03-22 19:25:05 -07:00
2011-08-06 22:52:40 -07:00
2011-07-05 23:42:17 -07:00
2011-06-06 22:55:11 -07:00
2011-07-26 16:49:47 -07:00
2011-03-08 16:10:38 +01:00
2011-10-02 00:19:34 +02:00
2011-06-20 10:46:04 -04:00
2011-09-25 23:26:21 +01:00
2011-10-30 15:46:19 -07:00
2011-06-10 14:55:36 +02:00
2011-05-23 10:47:06 -05:00
2011-05-29 13:03:09 +01:00
2011-08-02 12:32:06 +01:00
2011-08-02 12:32:04 +01:00
2011-09-21 10:22:03 +02:00
2011-06-21 19:17:20 -07:00
2011-07-26 16:49:45 -07:00
2011-06-21 19:17:20 -07:00
2011-10-31 17:30:44 -07:00
2011-02-25 12:00:34 -08:00
2011-06-30 09:23:45 +02:00
2011-03-10 11:35:17 +01:00
2011-09-15 14:02:57 +02:00
2011-05-24 10:21:29 +02:00
2011-10-04 13:08:18 -07:00
2011-05-25 18:30:37 +05:30
2011-10-18 11:22:00 -07:00
2011-06-27 09:11:02 -04:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:16 -07:00
2011-08-01 13:40:51 -10:00
2011-06-02 21:19:05 +02:00
2011-05-14 21:36:55 +01:00
2011-03-22 17:44:11 -07:00
2011-07-13 02:29:59 -07:00
2011-09-16 19:25:10 -04:00
2011-03-31 11:26:23 -03:00
2011-09-14 15:24:51 -04:00
2011-03-31 11:26:23 -03:00
2011-06-25 17:29:52 +02:00
2011-07-26 11:34:40 -07:00
2011-08-03 14:25:20 -10:00
2011-07-20 20:47:59 -04:00
2011-03-14 19:12:20 -04:00
2011-07-07 08:18:18 +02:00
2011-07-26 16:49:47 -07:00
2011-03-15 02:21:45 -04:00
2011-10-19 19:35:51 -04:00
2011-07-16 07:24:32 +02:00
2011-07-26 16:49:47 -07:00
2011-05-26 17:12:33 -07:00
2011-10-28 10:43:32 -07:00
2011-10-31 17:30:44 -07:00
2011-05-25 08:39:44 -07:00
2011-07-07 13:21:56 -07:00
2011-05-02 16:59:38 -07:00
2011-07-08 00:21:27 -05:00
2011-10-05 01:10:12 +00:00
2011-07-26 16:49:47 -07:00
2011-07-14 16:36:53 -04:00
2011-07-11 10:12:59 -04:00
2011-08-08 16:08:08 +02:00
2011-08-03 11:15:57 -04:00
2011-07-25 14:30:23 -04:00
2011-08-29 00:16:19 -07:00
2011-08-03 14:25:21 -10:00
2011-04-11 23:53:19 -07:00
2011-10-24 16:04:06 +02:00
2011-07-01 15:34:45 -07:00
2011-06-10 15:15:40 +02:00
2011-08-17 13:00:20 -07:00
2011-10-25 09:59:04 +02:00
2011-03-31 11:26:23 -03:00
2011-06-28 10:48:34 +02:00
2011-05-25 08:39:19 -07:00
2011-05-26 09:20:31 -07:00
2011-07-25 20:57:07 -07:00
2011-07-01 11:06:38 +02:00
2011-05-25 14:15:12 +02:00
2011-10-11 09:51:22 -06:00
2011-07-10 05:27:15 -06:00
2011-02-23 00:53:26 +00:00
2011-10-30 13:47:25 +01:00
2011-03-31 11:26:23 -03:00
2011-07-01 10:37:15 +02:00
2011-03-12 15:08:54 -08:00
2011-05-08 16:41:45 -07:00
2011-08-03 14:25:20 -10:00
2011-09-30 15:57:07 -04:00
2011-10-11 15:35:42 -04:00
2011-10-16 13:15:38 -07:00
2011-10-21 02:53:07 -04:00
2011-10-03 14:03:48 -04:00
2011-03-18 15:14:45 -07:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-10-30 04:43:30 -04:00
2011-08-17 20:21:27 -07:00
2011-03-10 16:37:26 -08:00
2011-07-18 12:29:38 -04:00
2011-08-26 12:02:50 -04:00
2011-10-12 19:09:18 -04:00
2011-07-21 13:47:54 -07:00
2011-02-18 12:42:28 -08:00
2011-09-13 11:11:55 +02:00
2011-05-16 14:46:30 -04:00
2011-10-28 14:25:01 -07:00
2011-09-14 15:24:52 -04:00
2011-10-26 16:17:32 +02:00
2011-10-17 11:42:49 +02:00
2011-10-28 05:54:23 -07:00
2011-07-12 14:24:35 +02:00
2011-10-21 14:38:55 +02:00
2011-07-31 14:30:59 -10:00
2011-09-20 14:50:00 -04:00
2011-07-26 16:49:44 -07:00
2011-05-26 17:12:37 -07:00
2011-03-31 11:26:23 -03:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-10-04 12:43:49 +02:00
2011-10-03 15:35:26 +02:00
2011-10-03 15:35:26 +02:00
2011-09-20 12:16:22 +02:00
2011-06-03 14:53:15 +02:00
2011-06-29 16:43:06 -05:00
2011-09-27 18:08:04 +02:00
2011-03-31 11:26:23 -03:00
2011-07-10 22:05:08 -04:00
2011-06-27 11:44:37 +02:00
2011-09-21 10:28:51 +02:00
2011-07-25 17:24:47 +02:00
2011-07-26 16:49:47 -07:00
2011-03-24 08:36:10 +01:00
2011-03-22 16:17:32 -07:00
2011-07-08 00:21:27 -05:00
2011-07-29 21:53:30 +02:00
2011-07-26 16:49:47 -07:00
2011-09-20 23:24:44 -04:00
2011-04-01 16:14:30 +11:00
2011-03-08 11:17:18 +11:00
2011-07-26 16:49:47 -07:00
2011-03-08 11:17:22 +11:00
2011-07-26 16:49:47 -07:00
2011-06-17 09:40:48 -07:00
2011-06-15 20:03:59 -07:00
2011-06-12 17:45:41 -04:00
2011-07-26 16:49:47 -07:00
2011-09-13 11:11:45 +02:00
2011-03-22 17:44:01 -07:00
2011-03-31 11:26:23 -03:00
2011-09-25 19:52:59 +03:00
2011-10-30 12:24:05 +02:00
2011-08-26 12:02:50 -04:00
2011-09-16 19:20:20 -04:00
2011-07-25 20:57:15 -07:00
2011-05-25 08:39:50 -07:00
2011-04-13 11:11:43 +02:00
2011-05-25 08:39:51 -07:00
2011-07-22 14:39:48 +09:30
2011-10-02 12:30:30 -05:00
2011-05-24 14:33:35 +02:00
2011-04-25 18:14:10 -07:00
2011-05-19 14:15:29 -07:00
2011-08-26 12:02:50 -04:00
2011-10-11 12:51:22 +02:00
2011-09-28 21:36:37 -07:00
2011-07-31 22:08:04 +02:00
2011-05-24 10:01:37 +02:00
2011-04-25 18:14:07 -04:00
2011-03-18 22:33:38 -07:00
2011-03-22 04:53:56 -03:00
2011-05-25 08:39:48 -07:00
2011-10-31 17:30:44 -07:00
2011-07-25 20:57:08 -07:00
2011-07-12 11:08:01 +10:00
2011-05-25 08:39:34 -07:00
2011-09-15 15:36:34 -04:00
2011-07-31 22:08:04 +02:00
2011-10-31 17:30:46 -07:00
2011-08-17 13:00:20 -07:00
2011-07-26 16:49:47 -07:00
2011-05-25 08:39:19 -07:00
2011-10-31 17:30:47 -07:00
2011-07-20 20:47:50 -04:00
2011-08-25 10:25:37 -07:00
2011-08-10 20:38:14 -04:00
2011-07-24 22:06:04 +09:30
2011-10-26 13:10:39 +10:30
2011-07-26 16:49:47 -07:00
2011-03-31 11:26:23 -03:00
2011-05-04 12:18:54 -07:00
2011-03-02 13:43:15 -08:00
2011-07-26 16:49:47 -07:00
2011-05-09 11:40:38 +10:00
2011-09-27 08:12:33 -07:00
2011-10-19 17:00:35 -04:00
2011-05-27 13:41:33 -04:00
2011-10-25 15:18:39 +02:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-08-26 12:02:50 -04:00
2011-05-27 13:40:58 -04:00
2011-08-26 12:02:50 -04:00
2011-07-03 20:02:07 -07:00
2011-08-26 12:02:50 -04:00
2011-09-20 14:43:49 -04:00
2011-10-19 11:52:12 -04:00
2011-07-31 14:27:04 -10:00
2011-10-18 09:14:34 -07:00
2011-03-11 15:39:26 -05:00
2011-03-11 15:38:44 -05:00
2011-10-19 13:58:38 -07:00
2011-10-19 13:37:34 -07:00
2011-07-31 12:18:16 -04:00
2011-05-10 22:21:45 +09:00
2011-10-14 14:48:23 -04:00
2011-05-23 11:58:59 +02:00
2011-07-26 16:49:43 -07:00
2011-07-25 20:57:15 -07:00
2011-07-20 01:44:07 -04:00
2011-07-18 16:37:45 -06:00
2011-05-18 12:32:23 -06:00
2011-08-04 11:26:24 +01:00
2011-07-28 16:19:22 -06:00
2011-07-28 01:32:04 -06:00
2011-07-27 09:30:56 +08:00
2011-06-08 09:08:17 +10:00
2011-06-21 11:04:10 -06:00
2011-10-29 12:49:40 +02:00
2011-03-31 11:26:23 -03:00
2011-10-31 17:30:45 -07:00
2011-09-30 22:35:12 +02:00
2011-09-13 11:12:05 +02:00
2011-03-31 11:26:23 -03:00
2011-07-30 08:21:48 -10:00
2011-07-25 20:57:10 -07:00
2011-03-14 02:58:03 -04:00
2011-10-14 09:05:27 -07:00
2011-10-14 09:05:35 -07:00
2011-05-21 12:16:44 -07:00
2011-10-14 09:05:35 -07:00
2011-10-28 14:20:44 -07:00
2011-09-13 11:11:47 +02:00
2011-06-03 19:33:49 +03:00
2011-10-06 13:00:28 +02:00
2011-08-25 10:17:28 -07:00
2011-08-26 12:02:50 -04:00
2011-10-24 02:54:50 -04:00
2011-05-26 17:12:37 -07:00
2011-04-11 13:44:25 -07:00
2011-10-29 07:28:36 -07:00
2011-07-08 14:02:53 +02:00
2011-08-25 15:34:19 +02:00
2011-09-26 20:22:02 +02:00
2011-10-04 21:54:26 +02:00
2011-08-25 15:34:19 +02:00
2011-03-15 00:43:14 +01:00
2011-10-22 00:21:52 +02:00
2011-07-12 13:40:29 -04:00
2011-06-10 14:55:36 +02:00
2011-07-25 20:57:09 -07:00
2011-03-31 11:26:23 -03:00
2011-08-03 00:58:42 -04:00
2011-05-10 10:16:21 +02:00
2011-08-10 14:55:26 -07:00
2011-03-01 22:27:26 +03:00
2011-06-10 15:15:40 +02:00
2011-03-31 11:26:23 -03:00
2011-05-25 08:39:48 -07:00
2011-07-27 12:50:45 -07:00
2011-09-13 11:11:50 +02:00
2011-07-22 16:14:29 -07:00
2011-07-01 15:39:38 -07:00
2011-09-29 00:32:03 -04:00
2011-05-23 13:01:00 -07:00
2011-05-23 13:01:00 -07:00
2011-07-17 20:23:52 +02:00
2011-08-25 16:25:34 -07:00
2011-03-31 11:26:23 -03:00
2011-07-26 16:49:47 -07:00
2011-03-24 21:16:31 -04:00
2011-08-03 14:25:24 -10:00
2011-07-26 16:49:46 -07:00
2011-10-28 05:29:07 -07:00
2011-09-13 11:11:54 +02:00
2011-04-26 14:01:42 -07:00
2011-07-20 14:10:20 -07:00
2011-09-28 21:38:35 -07:00
2011-09-28 21:38:20 -07:00
2011-09-28 21:36:42 -07:00
2011-07-25 20:57:14 -07:00
2011-09-30 13:57:47 +01:00
2011-07-25 14:30:23 -04:00
2011-07-25 20:57:17 -07:00
2011-07-25 14:30:23 -04:00
2011-03-23 19:46:23 -07:00
2011-10-03 15:19:19 -04:00
2011-04-19 15:38:02 -04:00
2011-08-30 12:27:45 -04:00
2011-03-23 19:46:41 -07:00
2011-04-14 16:06:56 -07:00
2011-08-25 16:25:34 -07:00
2011-04-14 16:06:56 -07:00
2011-05-25 08:39:19 -07:00
2011-08-26 12:02:50 -04:00
2011-05-12 08:28:47 -07:00
2011-07-26 14:50:01 -07:00
2011-07-08 14:02:53 +02:00
2011-07-25 13:56:39 -07:00
2011-09-13 11:11:59 +02:00
2011-09-13 11:11:59 +02:00
2011-10-26 17:08:43 +02:00
2011-07-18 11:06:03 -07:00
2011-06-07 10:02:35 +02:00
2011-09-09 16:56:33 -07:00
2011-07-26 16:49:47 -07:00
2011-09-13 11:11:57 +02:00
2011-07-20 20:47:50 -04:00
2011-06-11 13:17:28 -07:00
2011-08-24 15:25:49 -07:00
2011-09-22 15:50:38 -07:00
2011-09-22 15:50:38 -07:00
2011-06-28 15:25:36 +09:00
2011-08-24 15:27:59 -07:00
2011-09-28 10:24:14 -07:00
2011-07-11 15:07:25 +09:00
2011-06-21 17:56:11 +09:00
2011-09-28 13:41:51 -04:00
2011-07-30 08:44:19 -10:00
2011-08-03 14:25:24 -10:00
2011-07-20 20:47:10 -04:00
2011-05-19 08:19:36 -07:00
2011-03-22 17:44:15 -07:00
2011-05-20 13:33:21 -07:00
2011-10-24 18:18:09 -04:00
2011-07-20 20:27:56 +03:00
2011-07-07 21:04:12 +03:00
2011-06-16 19:40:20 +03:00
2011-09-27 23:03:30 +03:00
2011-03-22 17:16:34 +09:00
2011-03-31 11:26:23 -03:00
2011-06-17 10:17:12 +02:00
2011-04-13 17:13:00 -07:00
2011-09-15 14:49:43 -04:00
2011-08-07 22:48:07 -07:00
2011-03-09 14:08:09 -08:00
2011-07-26 16:49:47 -07:00
2011-03-28 06:05:24 -04:00
2011-03-31 11:26:23 -03:00
2011-05-20 12:51:07 -07:00
2011-07-26 16:49:47 -07:00
2011-07-25 20:57:11 -07:00
2011-06-14 22:48:51 -04:00
2011-07-21 15:29:16 -07:00
2011-07-25 13:56:39 -07:00
2011-10-31 17:30:47 -07:00
2011-08-16 00:16:49 -07:00
2011-10-16 23:28:51 +02:00
2011-03-22 15:47:22 +09:00
2011-10-31 17:30:44 -07:00
2011-08-03 14:25:22 -10:00
2011-06-06 15:41:16 -04:00
2011-10-31 17:30:44 -07:00
2011-03-15 00:43:46 +01:00
2011-10-03 14:13:01 -04:00
2011-05-11 21:37:15 +02:00
2011-10-19 19:24:14 -04:00
2011-10-03 14:01:21 -04:00
2011-08-02 14:51:57 -04:00
2011-05-23 13:59:54 +02:00
2011-08-22 14:13:32 -07:00
2011-05-23 13:59:53 +02:00
2011-05-23 13:59:53 +02:00
2011-04-26 14:01:42 -07:00
2011-08-26 12:02:50 -04:00
2011-05-10 16:03:56 -04:00
2011-06-15 20:03:59 -07:00
2011-09-19 11:35:58 -04:00
2011-06-27 20:30:08 +02:00
2011-08-10 20:38:14 -04:00
2011-08-23 10:10:38 -07:00
2011-06-04 06:33:24 +09:00
2011-10-26 15:11:09 +02:00
2011-09-28 21:36:38 -07:00
2011-05-25 19:56:23 -04:00
2011-03-31 11:26:23 -03:00
2011-10-12 21:13:11 -07:00
2011-10-18 11:18:57 -07:00
2011-08-26 12:02:50 -04:00
2011-06-07 09:05:42 -07:00
2011-09-26 15:51:10 -07:00
2011-06-15 20:04:00 -07:00
2011-03-23 19:47:03 -07:00
2011-05-20 09:30:46 -03:00
2011-03-31 11:26:23 -03:00
2011-05-20 11:28:49 -03:00
2011-03-22 04:53:33 -03:00
2011-03-31 11:26:23 -03:00
2011-07-27 17:55:40 -03:00
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-06-11 15:57:47 -07:00
2011-05-30 11:14:14 +09:30
2011-05-30 11:14:14 +09:30
2011-10-24 02:07:21 -04:00
2011-05-26 17:12:34 -07:00
2011-10-31 17:30:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:45 -07:00
2011-07-25 20:57:15 -07:00
2011-07-28 08:01:18 +00:00
2011-03-31 11:26:23 -03:00
2011-04-19 16:49:20 +03:00
2011-07-04 19:31:38 -07:00
2011-07-26 16:49:47 -07:00
2011-08-19 22:42:07 +08:00
2011-08-26 12:02:50 -04:00
2011-09-14 15:24:51 -04:00
2011-03-13 20:22:28 -07:00
2011-03-31 11:26:23 -03:00
2011-03-22 17:44:17 -07:00
2011-06-10 14:55:36 +02:00