summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-09-22 15:49:14 +0200
committerPeter Zijlstra <peterz@infradead.org>2025-10-29 10:29:56 +0100
commit42b9138f81fc22c36128f9524bb21bc9eabfb1b8 (patch)
tree52471861ca3ad3a4a93f2b10abe4458bf2fe3a11
parent1e74829f36b5db19afc3d17f0a3750e9573710ae (diff)
unwind: Simplify unwind_user_faultable()
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20250924080119.271671514@infradead.org
-rw-r--r--kernel/unwind/deferred.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/kernel/unwind/deferred.c b/kernel/unwind/deferred.c
index 6395192d7225..09617d8ae24b 100644
--- a/kernel/unwind/deferred.c
+++ b/kernel/unwind/deferred.c
@@ -128,17 +128,14 @@ int unwind_user_faultable(struct unwind_stacktrace *trace)
cache = info->cache;
trace->entries = cache->entries;
-
- if (cache->nr_entries) {
- /*
- * The user stack has already been previously unwound in this
- * entry context. Skip the unwind and use the cache.
- */
- trace->nr = cache->nr_entries;
+ trace->nr = cache->nr_entries;
+ /*
+ * The user stack has already been previously unwound in this
+ * entry context. Skip the unwind and use the cache.
+ */
+ if (trace->nr)
return 0;
- }
- trace->nr = 0;
unwind_user(trace, UNWIND_MAX_ENTRIES);
cache->nr_entries = trace->nr;