Byungchul Park
d6159bd4c0
mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index
...
[ Upstream commit 2774f256e7c0219e2b0a0894af1c76bdabc4f974 ]
With numa balancing on, when a numa system is running where a numa node
doesn't have its local memory so it has no managed zones, the following
oops has been observed. It's because wakeup_kswapd() is called with a
wrong zone index, -1. Fixed it by checking the index before calling
wakeup_kswapd().
> BUG: unable to handle page fault for address: 00000000000033f3
> #PF: supervisor read access in kernel mode
> #PF: error_code(0x0000) - not-present page
> PGD 0 P4D 0
> Oops: 0000 [#1 ] PREEMPT SMP NOPTI
> CPU: 2 PID: 895 Comm: masim Not tainted 6.6.0-dirty #255
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
> rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
> RIP: 0010:wakeup_kswapd (./linux/mm/vmscan.c:7812)
> Code: (omitted)
> RSP: 0000:ffffc90004257d58 EFLAGS: 00010286
> RAX: ffffffffffffffff RBX: ffff88883fff0480 RCX: 0000000000000003
> RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88883fff0480
> RBP: ffffffffffffffff R08: ff0003ffffffffff R09: ffffffffffffffff
> R10: ffff888106c95540 R11: 0000000055555554 R12: 0000000000000003
> R13: 0000000000000000 R14: 0000000000000000 R15: ffff88883fff0940
> FS: 00007fc4b8124740(0000) GS:ffff888827c00000(0000) knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00000000000033f3 CR3: 000000026cc08004 CR4: 0000000000770ee0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> PKRU: 55555554
> Call Trace:
> <TASK>
> ? __die
> ? page_fault_oops
> ? __pte_offset_map_lock
> ? exc_page_fault
> ? asm_exc_page_fault
> ? wakeup_kswapd
> migrate_misplaced_page
> __handle_mm_fault
> handle_mm_fault
> do_user_addr_fault
> exc_page_fault
> asm_exc_page_fault
> RIP: 0033:0x55b897ba0808
> Code: (omitted)
> RSP: 002b:00007ffeefa821a0 EFLAGS: 00010287
> RAX: 000055b89983acd0 RBX: 00007ffeefa823f8 RCX: 000055b89983acd0
> RDX: 00007fc2f8122010 RSI: 0000000000020000 RDI: 000055b89983acd0
> RBP: 00007ffeefa821a0 R08: 0000000000000037 R09: 0000000000000075
> R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
> R13: 00007ffeefa82410 R14: 000055b897ba5dd8 R15: 00007fc4b8340000
> </TASK>
Link: https://lkml.kernel.org/r/20240216111502.79759-1-byungchul@sk.com
Signed-off-by: Byungchul Park <byungchul@sk.com>
Reported-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
Fixes: c574bbe917036 ("NUMA balancing: optimize page placement for memory tiering system")
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-15 10:48:14 -04:00
..
2024-03-01 13:35:00 +01:00
2023-10-18 12:12:41 -07:00
2023-09-08 12:16:52 -07:00
2023-08-21 13:37:29 -07:00
2024-02-23 09:25:16 +01:00
2023-03-28 16:20:06 -07:00
2023-11-28 17:20:06 +00:00
2023-08-21 14:26:20 -07:00
2023-06-09 16:25:23 -07:00
2024-03-06 14:48:41 +00:00
2023-06-09 16:25:31 -07:00
2023-04-05 19:42:38 -07:00
2023-06-09 16:25:17 -07:00
2023-06-09 16:25:56 -07:00
2023-06-23 16:59:31 -07:00
2023-06-09 16:25:23 -07:00
2022-11-22 18:50:44 -08:00
2024-03-06 14:48:39 +00:00
2023-07-24 18:04:30 -04:00
2023-06-23 16:58:19 -07:00
2022-11-08 17:37:15 -08:00
2023-08-31 12:20:12 -07:00
2023-06-19 16:19:25 -07:00
2023-08-21 13:07:20 -07:00
2023-11-28 17:20:13 +00:00
2023-02-13 15:54:27 -08:00
2023-08-18 10:12:14 -07:00
2023-12-13 18:45:24 +01:00
2023-08-21 13:37:46 -07:00
2023-08-31 12:20:12 -07:00
2023-08-18 10:12:36 -07:00
2023-08-29 14:25:26 -07:00
2023-05-29 16:14:28 +01:00
2023-08-29 14:25:26 -07:00
2023-09-02 15:17:34 -07:00
2023-09-05 11:11:52 -07:00
2023-04-12 17:36:23 -07:00
2023-08-24 16:20:16 -07:00
2023-08-29 14:25:26 -07:00
2023-08-24 16:20:30 -07:00
2024-03-01 13:35:06 +01:00
2024-03-01 13:35:00 +01:00
2023-09-05 11:11:52 -07:00
2024-01-20 11:51:49 +01:00
2024-01-10 17:16:54 +01:00
2023-08-18 10:12:38 -07:00
2024-03-01 13:35:00 +01:00
2023-11-20 11:58:51 +01:00
2022-11-30 15:58:41 -08:00
2023-02-09 16:51:46 -08:00
2023-08-21 13:37:47 -07:00
2023-08-31 12:20:12 -07:00
2024-03-15 10:48:14 -04:00
2023-08-21 13:07:20 -07:00
2023-08-21 14:26:20 -07:00
2024-01-31 16:18:56 -08:00
2023-10-06 14:11:38 -07:00
2023-08-24 16:20:30 -07:00
2023-08-18 10:12:41 -07:00
2023-08-31 12:20:12 -07:00
2023-09-16 15:23:31 -07:00
2023-08-31 12:20:12 -07:00
2023-08-21 13:37:44 -07:00
2024-01-31 16:18:57 -08:00
2023-08-18 10:12:31 -07:00
2023-01-18 17:12:52 -08:00
2023-08-21 13:37:27 -07:00
2023-08-18 10:12:39 -07:00
2023-08-21 13:37:27 -07:00
2023-08-21 13:37:30 -07:00
2023-04-05 19:42:46 -07:00
2023-08-24 16:20:18 -07:00
2023-08-18 10:12:13 -07:00
2024-02-23 09:25:16 +01:00
2023-09-02 08:39:21 -07:00
2023-06-19 16:19:29 -07:00
2024-02-16 19:10:52 +01:00
2023-08-18 10:12:25 -07:00
2023-06-09 16:25:25 -07:00
2023-06-19 16:19:24 -07:00
2023-11-20 11:58:52 +01:00
2023-09-29 17:20:47 -07:00
2023-08-21 13:38:02 -07:00
2023-08-09 09:15:40 +02:00
2023-12-20 17:02:03 +01:00
2023-08-21 13:38:01 -07:00
2023-06-19 13:19:34 -07:00
2023-04-05 19:42:46 -07:00
2023-10-11 15:24:49 +02:00
2023-07-18 10:07:47 +02:00
2023-07-18 10:07:47 +02:00
2023-07-14 09:57:21 +02:00
2023-08-18 10:12:53 -07:00
2024-01-31 16:18:56 -08:00
2023-08-24 16:20:28 -07:00
2023-06-23 16:59:30 -07:00
2024-03-01 13:35:00 +01:00
2024-03-01 13:35:00 +01:00
2023-08-29 14:25:26 -07:00
2023-04-12 17:36:23 -07:00
2024-02-23 09:24:53 +01:00
2023-11-28 17:20:08 +00:00
2023-09-29 17:20:47 -07:00
2023-08-16 12:21:32 +01:00
2024-01-10 17:17:00 +01:00
2023-08-21 13:37:30 -07:00
2023-12-20 17:02:02 +01:00
2023-08-21 13:37:51 -07:00
2023-06-19 16:19:27 -07:00
2023-06-19 16:19:27 -07:00
2023-08-21 14:26:20 -07:00
2024-03-01 13:35:10 +01:00