We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a154c8 commit 6e22c83Copy full SHA for 6e22c83
kernel/trace/trace_stack.c
@@ -156,7 +156,11 @@ check_stack(unsigned long ip, unsigned long *stack)
156
for (; p < top && i < stack_trace_max.nr_entries; p++) {
157
if (stack_dump_trace[i] == ULONG_MAX)
158
break;
159
- if (*p == stack_dump_trace[i]) {
+ /*
160
+ * The READ_ONCE_NOCHECK is used to let KASAN know that
161
+ * this is not a stack-out-of-bounds error.
162
+ */
163
+ if ((READ_ONCE_NOCHECK(*p)) == stack_dump_trace[i]) {
164
stack_dump_trace[x] = stack_dump_trace[i++];
165
this_size = stack_trace_index[x++] =
166
(top - p) * sizeof(unsigned long);
0 commit comments