Hugh Dickins ee40d543e9 mm/pagewalk: fix bootstopping regression from extra pte_unmap()
Mikhail reports early-6.6-based Fedora Rawhide not booting: "rcu_preempt
detected expedited stalls", minutes wait, and then hung_task splat while
kworker trying to synchronize_rcu_expedited().  Nothing logged to disk.

He bisected to my 6.6 a349d72fd9ef ("mm/pgtable: add rcu_read_lock() and
rcu_read_unlock()s"): but the one to blame is my 6.5 commit to fix the
espfix "bad pmd" warnings when booting x86_64 with CONFIG_EFI_PGT_DUMP=y.

Gaah, that added an "addr >= TASK_SIZE" check to avoid pte_offset_map(),
but failed to add the equivalent check when choosing to pte_unmap().

It's not a problem on 6.5 (for different reasons, it's harmless on both
64-bit and 32-bit), but becomes a bootstopper on 6.6 with the unbalanced
rcu_read_unlock() - RCU has a WARN_ON_ONCE for that, but it would have
scrolled off Mikhail's console too quickly.

Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Closes: https://lore.kernel.org/linux-mm/CABXGCsNi8Tiv5zUPNXr6UJw6qV1VdaBEfGqEAMkkXE3QPvZuAQ@mail.gmail.com/
Fixes: 8b1cb4a2e819 ("mm/pagewalk: fix EFI_PGT_DUMP of espfix area")
Fixes: a349d72fd9ef ("mm/pgtable: add rcu_read_lock() and rcu_read_unlock()s")
Signed-off-by: Hugh Dickins <hughd@google.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-09-02 08:39:21 -07:00
..
2023-08-29 20:32:10 -07:00
2023-06-09 16:25:17 -07:00
2023-07-24 18:04:30 -04:00
2023-08-31 12:20:12 -07:00
2023-06-19 16:19:25 -07:00
2023-08-31 12:20:12 -07:00
2023-08-31 12:20:12 -07:00
2023-04-12 17:36:23 -07:00
2023-08-31 12:20:12 -07:00
2023-08-31 12:20:12 -07:00
2023-08-31 12:20:12 -07:00
2022-10-03 14:02:43 -07:00
2023-08-31 12:20:12 -07:00
2022-09-26 19:46:09 -07:00
2023-08-31 12:20:12 -07:00
2023-08-31 12:20:12 -07:00
2023-08-21 14:28:44 -07:00
2021-05-07 00:26:35 -07:00
2023-08-29 20:32:10 -07: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-06-23 16:59:30 -07:00
2023-04-12 17:36:23 -07:00
2023-08-31 12:20:12 -07:00
2023-08-31 12:20:12 -07:00