diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-01 16:38:16 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-01 16:38:16 -0800 |
| commit | 523462df282fc527a01bceca5125017e2259fbf5 (patch) | |
| tree | b3cca26b719ce1f46f203e2f86334525a2f50e14 /kernel/trace/trace_stack.c | |
| parent | mei: fix format string in debug prints (diff) | |
| parent | Linux 4.5-rc6 (diff) | |
| download | linux-523462df282fc527a01bceca5125017e2259fbf5.tar.gz linux-523462df282fc527a01bceca5125017e2259fbf5.zip | |
Merge 4.5-rc6 into char-misc-next
We want the fixes in here, and others are sending us pull requests based
on this kernel tree.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/trace_stack.c')
| -rw-r--r-- | kernel/trace/trace_stack.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 202df6cffcca..2a1abbaca10e 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -156,7 +156,11 @@ check_stack(unsigned long ip, unsigned long *stack) for (; p < top && i < stack_trace_max.nr_entries; p++) { if (stack_dump_trace[i] == ULONG_MAX) break; - if (*p == stack_dump_trace[i]) { + /* + * The READ_ONCE_NOCHECK is used to let KASAN know that + * this is not a stack-out-of-bounds error. + */ + if ((READ_ONCE_NOCHECK(*p)) == stack_dump_trace[i]) { stack_dump_trace[x] = stack_dump_trace[i++]; this_size = stack_trace_index[x++] = (top - p) * sizeof(unsigned long); |
