Florian Westphal
30c1936663
mm: fix BUG splat with kvmalloc + GFP_ATOMIC
...
Martin Zaharinov reports BUG with 5.19.10 kernel:
kernel BUG at mm/vmalloc.c:2437!
invalid opcode: 0000 [#1 ] SMP
CPU: 28 PID: 0 Comm: swapper/28 Tainted: G W O 5.19.9 #1
[..]
RIP: 0010:__get_vm_area_node+0x120/0x130
__vmalloc_node_range+0x96/0x1e0
kvmalloc_node+0x92/0xb0
bucket_table_alloc.isra.0+0x47/0x140
rhashtable_try_insert+0x3a4/0x440
rhashtable_insert_slow+0x1b/0x30
[..]
bucket_table_alloc uses kvzalloc(GPF_ATOMIC). If kmalloc fails, this now
falls through to vmalloc and hits code paths that assume GFP_KERNEL.
Link: https://lkml.kernel.org/r/20220926151650.15293-1-fw@strlen.de
Fixes: a421ef303008 ("mm: allow !GFP_KERNEL allocations for kvmalloc")
Signed-off-by: Florian Westphal <fw@strlen.de>
Suggested-by: Michal Hocko <mhocko@suse.com>
Link: https://lore.kernel.org/linux-mm/Yy3MS2uhSgjF47dy@pc636/T/#t
Acked-by: Michal Hocko <mhocko@suse.com>
Reported-by: Martin Zaharinov <micron10@gmail.com>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-09-30 18:46:31 -07:00
..
2022-09-11 16:22:31 -07:00
2022-08-05 16:32:45 -07:00
2022-08-05 16:32:45 -07:00
2022-08-28 14:02:43 -07:00
2022-08-02 12:34:03 -04:00
2022-08-28 14:02:45 -07:00
2022-07-29 18:07:16 -07:00
2021-05-05 11:27:24 -07:00
2022-05-13 15:11:26 -07:00
2022-03-22 15:57:09 -07:00
2022-08-05 16:32:45 -07:00
2022-06-27 12:52:53 -07:00
2022-03-24 19:06:45 -07:00
2022-01-15 16:30:28 +02:00
2022-03-22 15:57:11 -07:00
2022-04-26 13:36:25 -07:00
2022-05-19 14:08:55 -07:00
2022-08-05 16:32:45 -07:00
2022-08-02 12:34:04 -04:00
2022-09-26 12:14:34 -07:00
2022-07-17 17:14:27 -07:00
2021-05-05 11:27:26 -07:00
2022-09-26 12:14:33 -07:00
2022-08-05 16:32:45 -07:00
2022-07-29 11:33:37 -07:00
2022-09-26 12:14:33 -07:00
2022-07-29 18:07:17 -07:00
2022-08-08 18:06:43 -07:00
2022-08-08 18:06:43 -07:00
2022-09-26 12:14:34 -07:00
2022-06-16 19:11:32 -07:00
2022-02-14 19:51:47 +01:00
2022-08-05 16:32:45 -07:00
2021-04-30 11:20:38 -07:00
2021-04-30 11:20:39 -07:00
2022-06-27 12:22:31 +01:00
2022-08-10 11:07:26 -07:00
2022-05-27 11:40:49 -07:00
2022-09-26 12:14:33 -07:00
2022-06-16 19:48:32 -07:00
2022-08-05 16:32:45 -07:00
2022-06-16 19:48:31 -07:00
2022-03-23 18:03:08 -07:00
2022-09-26 12:14:33 -07:00
2022-07-03 18:08:40 -07:00
2022-01-15 16:30:27 +02:00
2022-08-09 09:48:30 -07:00
2022-07-29 18:07:18 -07:00
2022-03-05 11:08:32 -08:00
2022-07-29 18:07:20 -07:00
2022-09-26 12:14:34 -07:00
2022-09-26 12:14:34 -07:00
2022-07-29 18:07:16 -07:00
2022-06-16 19:48:30 -07:00
2022-08-05 16:32:45 -07:00
2022-09-11 16:22:30 -07:00
2022-08-05 16:32:45 -07:00
2022-05-13 07:20:09 -07:00
2022-07-17 17:14:28 -07:00
2021-04-30 11:20:42 -07:00
2021-07-23 17:43:28 -07:00
2022-08-20 15:17:45 -07:00
2022-04-28 23:16:12 -07:00
2022-04-21 20:01:10 -07:00
2022-03-22 17:03:12 -07:00
2022-08-28 14:02:46 -07:00
2022-05-26 12:32:41 -07:00
2021-04-30 11:20:37 -07:00
2022-07-17 17:14:37 -07:00
2022-06-01 15:57:16 -07:00
2022-09-26 12:14:34 -07:00
2022-01-15 16:30:27 +02:00
2022-04-29 14:36:58 -07:00
2022-05-19 14:08:54 -07:00
2022-05-26 12:32:41 -07:00
2022-09-26 12:14:34 -07:00
2022-05-26 12:32:41 -07:00
2021-04-30 11:20:36 -07:00
2021-06-29 10:53:47 -07:00
2021-06-29 10:53:47 -07:00
2022-05-27 11:29:35 -07:00
2022-07-17 17:14:47 -07:00
2022-08-28 14:02:43 -07:00
2021-06-29 10:53:49 -07:00
2022-05-13 07:20:18 -07:00
2021-07-04 18:30:17 +00:00
2022-03-08 09:30:46 -05:00
2021-07-04 18:30:17 +00:00
2022-07-17 17:14:47 -07:00
2021-05-07 00:26:35 -07:00
2022-05-13 07:20:05 -07:00
2021-05-05 11:27:27 -07:00
2022-03-22 15:57:08 -07:00
2022-06-23 12:22:00 -04:00
2022-08-05 16:32:45 -07:00
2022-09-11 16:22:31 -07:00
2022-08-28 14:02:43 -07:00
2022-07-29 18:07:13 -07:00
2021-04-16 16:10:36 -07:00
2021-05-22 15:09:07 -10:00
2022-07-20 13:30:12 +02:00
2022-08-05 16:32:45 -07:00
2022-07-20 13:30:12 +02:00
2022-07-20 13:30:12 +02:00
2022-07-20 13:30:11 +02:00
2022-08-08 18:06:42 -07:00
2022-07-03 18:08:49 -07:00
2022-03-08 09:30:46 -05:00
2022-07-20 10:52:40 +01:00
2022-09-11 16:22:31 -07:00
2022-08-05 16:32:45 -07:00
2022-07-03 18:08:52 -07:00
2022-07-03 18:08:48 -07:00
2022-06-29 08:51:05 -04:00
2022-07-01 17:03:38 -07:00
2022-08-20 15:17:45 -07:00
2022-09-30 18:46:31 -07:00
2022-07-03 18:08:41 -07:00
2021-11-06 13:30:40 -07:00
2022-09-11 16:22:31 -07:00
2022-08-20 15:17:45 -07:00
2022-07-03 18:08:40 -07:00
2022-08-02 12:34:03 -04:00
2021-07-01 11:06:03 -07:00
2022-01-15 16:30:31 +02:00
2022-08-28 14:02:44 -07:00
2022-05-19 14:08:53 -07:00