Christophe Leroy
67baac10dd
powerpc/fixmap: Fix VM debug warning on unmap
[ Upstream commit aec982603aa8cc0a21143681feb5f60ecc69d718 ]
Unmapping a fixmap entry is done by calling __set_fixmap()
with FIXMAP_PAGE_CLEAR as flags.
Today, powerpc __set_fixmap() calls map_kernel_page().
map_kernel_page() is not happy when called a second time
for the same page.
WARNING: CPU: 0 PID: 1 at arch/powerpc/mm/pgtable.c:194 set_pte_at+0xc/0x1e8
CPU: 0 PID: 1 Comm: swapper Not tainted 5.16.0-rc3-s3k-dev-01993-g350ff07feb7d-dirty #682
NIP: c0017cd4 LR: c00187f0 CTR: 00000010
REGS: e1011d50 TRAP: 0700 Not tainted (5.16.0-rc3-s3k-dev-01993-g350ff07feb7d-dirty)
MSR: 00029032 <EE,ME,IR,DR,RI> CR: 42000208 XER: 00000000
GPR00: c0165fec e1011e10 c14c0000 c0ee2550 ff800000 c0f3d000 00000000 c001686c
GPR08: 00001000 b00045a9 00000001 c0f58460 c0f50000 00000000 c0007e10 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
GPR24: 00000000 00000000 c0ee2550 00000000 c0f57000 00000ff8 00000000 ff800000
NIP [c0017cd4] set_pte_at+0xc/0x1e8
LR [c00187f0] map_kernel_page+0x9c/0x100
Call Trace:
[e1011e10] [c0736c68] vsnprintf+0x358/0x6c8 (unreliable)
[e1011e30] [c0165fec] __set_fixmap+0x30/0x44
[e1011e40] [c0c13bdc] early_iounmap+0x11c/0x170
[e1011e70] [c0c06cb0] ioremap_legacy_serial_console+0x88/0xc0
[e1011e90] [c0c03634] do_one_initcall+0x80/0x178
[e1011ef0] [c0c0385c] kernel_init_freeable+0xb4/0x250
[e1011f20] [c0007e34] kernel_init+0x24/0x140
[e1011f30] [c0016268] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
7fe3fb78 48019689 80010014 7c630034 83e1000c 5463d97e 7c0803a6 38210010
4e800020 81250000 712a0001 41820008 <0fe00000> 9421ffe0 93e1001c 48000030
Implement unmap_kernel_page() which clears an existing pte.
Reported-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b0b752f6f6ecc60653e873f385c6f0dce4e9ab6a.1638789098.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-02-16 12:54:19 +01:00
..
2022-02-16 12:54:19 +01:00
2022-02-16 12:54:19 +01:00
2019-05-30 11:26:32 -07:00
2020-01-25 12:18:51 -05:00
2018-07-30 22:48:16 +10:00
2020-10-22 14:26:09 +11:00
2020-10-08 12:50:52 +11:00
2019-05-24 17:27:11 +02:00
2020-08-07 10:33:50 -07:00
2021-07-19 09:44:56 +02:00
2020-12-30 11:54:16 +01:00
2019-06-07 19:00:14 +10:00
2019-11-18 22:27:51 +11:00
2019-05-30 11:26:32 -07:00
2020-10-25 14:51:49 -07:00
2020-09-02 11:00:21 +10:00
2019-05-30 11:26:32 -07:00
2020-08-20 15:45:22 -04:00
2020-05-28 23:24:36 +10:00
2018-08-08 00:32:25 +10:00
2021-11-18 14:04:29 +01:00
2020-09-17 13:00:46 -04:00
2019-05-30 11:26:32 -07:00
2020-12-30 11:54:16 +01:00
2019-12-09 13:54:34 -06:00
2021-03-25 09:04:14 +01:00
2022-01-27 10:54:05 +01:00
2019-05-30 11:26:32 -07:00
2019-04-30 22:37:48 +10:00
2020-12-30 11:54:16 +01:00
2021-07-14 16:55:55 +02:00
2020-07-27 00:01:31 +10:00
2020-07-29 23:47:54 +10:00
2019-08-20 21:22:15 +10:00
2020-07-29 21:02:09 +10:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2021-03-30 14:31:47 +02:00
2019-05-30 11:26:35 -07:00
2020-05-19 00:11:04 +10:00
2019-05-30 11:26:32 -07:00
2020-10-08 21:17:15 +11:00
2020-08-11 14:13:24 -07:00
2019-06-05 17:30:28 +02:00
2020-09-11 09:14:43 +02:00
2020-04-01 14:30:50 +11:00
2020-10-08 12:50:52 +11:00
2018-07-30 22:48:17 +10:00
2020-07-10 12:00:01 +02:00
2019-05-30 11:26:35 -07:00
2020-10-07 22:34:47 +11:00
2020-07-27 14:29:23 -04:00
2019-08-30 09:40:15 +10:00
2019-06-05 17:37:07 +02:00
2020-07-27 00:01:31 +10:00
2020-07-29 21:08:12 +10:00
2021-01-27 11:55:12 +01:00
2020-05-04 22:29:58 +10:00
2019-09-14 00:04:45 +10:00
2021-01-27 11:55:12 +01:00
2021-11-18 14:04:17 +01:00
2022-02-16 12:54:19 +01:00
2020-05-12 19:34:53 +03:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2019-06-05 17:30:28 +02:00
2019-05-30 11:26:32 -07:00
2020-05-19 00:10:34 +10:00
2020-05-28 23:24:36 +10:00
2020-07-29 23:47:53 +10:00
2020-07-22 23:00:27 +10:00
2020-06-04 19:06:22 -07:00
2019-05-24 17:39:01 +02:00
2020-07-29 21:09:37 +10:00
2022-01-20 09:17:52 +01:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-01-14 20:39:27 +11:00
2020-09-15 22:13:20 +10:00
2022-01-27 10:54:05 +01:00
2020-07-22 00:01:23 +10:00
2020-08-25 01:31:33 +10:00
2020-04-30 12:35:26 +10:00
2020-07-16 13:12:46 +10:00
2020-07-23 17:41:36 +10:00
2019-05-30 11:26:32 -07:00
2019-08-27 13:03:34 +10:00
2020-06-09 09:39:13 -07:00
2020-10-06 07:07:03 +02:00
2019-05-30 11:26:32 -07:00
2020-09-02 11:00:19 +10:00
2019-05-30 11:26:32 -07:00
2020-08-18 13:39:52 +10:00
2021-01-12 20:18:16 +01:00
2020-07-29 23:47:53 +10:00
2021-03-04 11:38:39 +01:00
2018-10-20 13:26:47 +11:00
2019-05-30 11:26:32 -07:00
2020-05-19 00:10:39 +10:00
2020-11-19 23:47:20 +11:00
2020-03-19 16:39:52 +11:00
2019-06-05 17:30:28 +02:00
2020-05-29 16:09:27 +10:00
2020-07-22 21:56:41 +10:00
2020-07-28 12:34:52 +10:00
2020-06-12 11:05:52 -07:00
2019-06-19 17:09:55 +02:00
2020-07-29 21:02:09 +10:00
2019-06-05 17:30:28 +02:00
2021-11-18 14:04:17 +01:00
2020-09-03 14:12:48 +10:00
2021-11-18 14:04:17 +01:00
2020-07-23 15:50:01 +10:00
2019-05-21 11:28:45 +02:00
2019-11-24 15:06:33 -08:00
2020-07-10 12:00:01 +02:00
2019-05-30 11:26:39 -07:00
2021-03-17 17:06:23 +01:00
2019-05-30 11:26:32 -07:00
2020-08-17 14:13:18 +10:00
2019-08-30 09:55:41 +10:00
2019-06-19 17:09:55 +02:00
2020-08-24 14:12:54 +10:00
2019-04-08 12:09:27 +01:00
2020-09-16 12:24:37 +10:00
2020-07-20 22:57:58 +10:00
2020-11-22 10:48:22 -08:00
2020-06-05 12:39:30 -07:00
2020-09-25 00:36:41 +09:00
2019-05-24 17:27:12 +02:00
2018-05-25 12:04:42 +10:00
2019-05-24 17:27:12 +02:00
2019-06-05 17:37:18 +02:00
2019-06-05 17:37:17 +02:00
2019-05-30 11:26:32 -07:00
2018-10-21 19:32:07 +11:00
2019-06-05 17:37:17 +02:00
2019-02-26 23:28:24 +11:00
2019-05-30 11:26:32 -07:00
2020-03-04 22:44:27 +11:00
2019-11-13 00:33:22 +11:00
2019-05-30 11:26:32 -07:00
2020-08-07 10:33:50 -07:00
2019-08-20 21:22:15 +10:00
2020-04-10 15:36:21 -07:00
2020-07-27 00:01:30 +10:00
2021-05-26 12:06:49 +02:00
2019-06-05 17:37:06 +02:00
2020-10-15 13:42:49 +11:00
2020-10-06 07:07:03 +02:00
2020-08-04 23:15:59 +10:00
2019-05-30 11:26:32 -07:00
2020-08-17 13:11:22 +10:00
2020-08-17 13:11:22 +10:00
2019-09-24 15:54:09 -07:00
2019-05-03 01:20:23 +10:00
2019-05-03 01:20:23 +10:00
2020-06-09 09:39:14 -07:00
2020-07-20 22:57:59 +10:00
2020-07-26 23:34:19 +10:00
2019-05-30 11:26:32 -07:00
2018-05-25 12:04:41 +10:00
2021-09-18 13:40:15 +02:00
2019-05-30 11:26:32 -07:00
2020-08-25 01:31:31 +10:00
2020-01-23 21:31:17 +11:00
2019-07-13 16:08:36 -07:00
2019-05-24 17:27:12 +02:00
2020-10-08 21:17:13 +11:00
2022-02-01 17:25:45 +01:00
2019-08-22 23:12:47 +10:00
2019-05-30 11:26:35 -07:00
2020-10-22 09:59:21 -07:00
2020-06-02 20:59:20 +10:00
2021-07-20 16:05:42 +02:00
2019-05-30 11:26:39 -07:00
2019-06-05 17:37:07 +02:00
2019-07-13 16:08:36 -07:00
2019-07-05 00:43:50 +10:00
2021-05-26 12:06:53 +02:00
2020-07-27 00:01:29 +10:00
2020-07-27 00:01:29 +10:00
2020-01-23 21:31:14 +11:00
2019-05-30 11:26:32 -07:00
2020-10-08 21:17:14 +11:00
2018-07-30 22:48:17 +10:00
2022-01-27 10:54:05 +01:00
2018-05-25 12:04:43 +10:00
2019-05-30 11:26:32 -07:00
2020-06-02 20:59:08 +10:00
2020-07-16 13:12:40 +10:00
2020-06-18 12:10:37 -07:00
2019-11-12 12:25:49 +11:00
2021-11-18 14:04:30 +01:00
2019-11-13 00:33:22 +11:00
2019-05-30 11:26:32 -07:00
2020-04-01 14:30:51 +11:00
2020-11-19 23:47:18 +11:00
2018-12-04 19:45:01 +11:00
2020-04-01 13:42:13 +11:00
2020-07-26 23:34:26 +10:00
2020-07-26 23:34:26 +10:00
2020-05-26 22:22:21 +10:00
2021-05-14 09:50:39 +02:00
2020-07-27 00:01:32 +10:00
2020-11-22 10:48:22 -08:00
2020-07-27 00:01:23 +10:00
2020-07-27 00:01:29 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:39 -07:00
2019-05-30 11:26:32 -07:00
2020-07-23 17:43:44 +10:00
2018-10-03 15:40:03 +10:00
2018-08-08 00:32:30 +10:00
2020-10-06 11:18:04 +02:00
2020-09-14 23:07:14 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2021-03-17 17:06:35 +01:00
2020-10-06 23:22:23 +11:00
2021-05-26 12:06:53 +02:00
2019-02-23 22:31:39 +11:00
2019-05-03 01:20:23 +10:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2020-09-08 22:21:37 -04:00
2020-10-08 21:17:16 +11:00
2020-10-08 21:17:13 +11:00
2020-09-16 12:24:37 +10:00
2018-07-30 22:48:21 +10:00
2018-05-24 16:04:02 +10:00
2020-11-06 14:16:19 +11:00
2019-06-19 17:09:55 +02:00
2019-05-01 16:45:05 +10:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2021-03-04 11:38:06 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-11-28 17:02:31 +11:00
2019-11-28 17:02:31 +11:00
2020-04-03 00:09:59 +11:00
2020-05-19 00:10:39 +10:00
2018-10-19 15:09:04 +11:00
2020-04-20 16:53:14 +10:00
2020-01-23 21:31:15 +11:00
2020-03-13 21:13:06 +11:00
2020-04-23 10:50:26 +09:00
2019-05-30 11:26:32 -07:00
2019-12-10 10:12:55 +01:00
2020-05-07 22:58:31 +10:00
2020-07-16 13:12:44 +10:00
2019-05-30 11:26:32 -07:00
2018-05-25 12:04:38 +10:00
2019-05-30 11:26:35 -07:00