Commit 567d532
bpf: Add preempt_disable to protect get_perf_callchain
As Alexei suggested, the return value from get_perf_callchain() may be
reused if another task preempts and requests the stack after BPF program
switched to migrate disable.
Reported-by: Alexei Starovoitov <[email protected]>
Signed-off-by: Tao Chen <[email protected]>1 parent da4ec66 commit 567d532
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
317 | 318 | | |
318 | 319 | | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
321 | 323 | | |
| |||
443 | 445 | | |
444 | 446 | | |
445 | 447 | | |
446 | | - | |
447 | | - | |
448 | | - | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | | - | |
| 458 | + | |
460 | 459 | | |
461 | 460 | | |
462 | 461 | | |
| |||
474 | 473 | | |
475 | 474 | | |
476 | 475 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
| 476 | + | |
481 | 477 | | |
482 | 478 | | |
483 | 479 | | |
| |||
0 commit comments