unwind: Simplify unwind_user_faultable()

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20250924080119.271671514@infradead.org
This commit is contained in:
Peter Zijlstra
2025-09-22 15:49:14 +02:00
parent 1e74829f36
commit 42b9138f81

View File

@@ -128,17 +128,14 @@ int unwind_user_faultable(struct unwind_stacktrace *trace)
cache = info->cache; cache = info->cache;
trace->entries = cache->entries; trace->entries = cache->entries;
trace->nr = cache->nr_entries;
if (cache->nr_entries) { /*
/* * The user stack has already been previously unwound in this
* The user stack has already been previously unwound in this * entry context. Skip the unwind and use the cache.
* entry context. Skip the unwind and use the cache. */
*/ if (trace->nr)
trace->nr = cache->nr_entries;
return 0; return 0;
}
trace->nr = 0;
unwind_user(trace, UNWIND_MAX_ENTRIES); unwind_user(trace, UNWIND_MAX_ENTRIES);
cache->nr_entries = trace->nr; cache->nr_entries = trace->nr;