Commit 2218c01
bpf: liveness: Handle ERR_PTR from get_outer_instance() in propagate_to_outer_instance()
propagate_to_outer_instance() calls get_outer_instance() and then uses the
returned pointer to reset/commit stack write marks. When get_outer_instance()
fails (e.g., __lookup_instance() returns -ENOMEM), it may return an ERR_PTR.
Without a check, the code dereferences this error pointer.
Protect the call with IS_ERR() and propagate the error.
Fixes: b3698c3 ("bpf: callchain sensitive stack liveness tracking
using CFG")
Reported-by: kernel-patches-review-bot (kernel-patches/bpf#10006 (comment))
Signed-off-by: Shardul Bankar <[email protected]>1 parent 5d34384 commit 2218c01
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| 527 | + | |
| 528 | + | |
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
| |||
0 commit comments