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 165f2d2 commit 229a0ddCopy full SHA for 229a0dd
arch/csky/kernel/perf_callchain.c
@@ -12,12 +12,17 @@ struct stackframe {
12
13
static int unwind_frame_kernel(struct stackframe *frame)
14
{
15
- if (kstack_end((void *)frame->fp))
+ unsigned long low = (unsigned long)task_stack_page(current);
16
+ unsigned long high = low + THREAD_SIZE;
17
+
18
+ if (unlikely(frame->fp < low || frame->fp > high))
19
return -EPERM;
- if (frame->fp & 0x3 || frame->fp < TASK_SIZE)
20
21
+ if (kstack_end((void *)frame->fp) || frame->fp & 0x3)
22
23
24
*frame = *(struct stackframe *)frame->fp;
25
26
if (__kernel_text_address(frame->lr)) {
27
int graph = 0;
28
0 commit comments