Skip to content

Commit 42b9138

Browse files
author
Peter Zijlstra
committed
unwind: Simplify unwind_user_faultable()
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20250924080119.271671514@infradead.org
1 parent 1e74829 commit 42b9138

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

kernel/unwind/deferred.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,14 @@ int unwind_user_faultable(struct unwind_stacktrace *trace)
128128

129129
cache = info->cache;
130130
trace->entries = cache->entries;
131-
132-
if (cache->nr_entries) {
133-
/*
134-
* The user stack has already been previously unwound in this
135-
* entry context. Skip the unwind and use the cache.
136-
*/
137-
trace->nr = cache->nr_entries;
131+
trace->nr = cache->nr_entries;
132+
/*
133+
* The user stack has already been previously unwound in this
134+
* entry context. Skip the unwind and use the cache.
135+
*/
136+
if (trace->nr)
138137
return 0;
139-
}
140138

141-
trace->nr = 0;
142139
unwind_user(trace, UNWIND_MAX_ENTRIES);
143140

144141
cache->nr_entries = trace->nr;

0 commit comments

Comments
 (0)