[PATCH 6.12 170/242] Revert "LoongArch/orc: Use RCU in all users of __module_address()."

Greg Kroah-Hartman
2026-04-08T18:48:27Z

This reverts commit 2e6949777d1dbfa5c906a880028680cc3ebe1f68.

Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/loongarch/kernel/unwind_orc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/loongarch/kernel/unwind_orc.c b/arch/loongarch/kernel/unwind_orc.c
index 59809c3406c03..471652c0c8653 100644
--- a/arch/loongarch/kernel/unwind_orc.c
+++ b/arch/loongarch/kernel/unwind_orc.c
@@ -399,7 +399,7 @@ bool unwind_next_frame(struct unwind_state *state)
return false;

/* Don't let modules unload while we're reading their ORC data. */
- guard(rcu)();
+ preempt_disable();

if (is_entry_func(state->pc))
goto end;
@@ -514,12 +514,14 @@ bool unwind_next_frame(struct unwind_state *state)
if (!__kernel_text_address(state->pc))
goto err;

+ preempt_enable();
return true;

err:
state->error = true;

end:
+ preempt_enable();
state->stack_info.type = STACK_TYPE_UNKNOWN;
return false;
}
--
2.53.0