mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
perf bpf: Return NULL when RB tree lookup fails in perf_env__find_bpf_prog_info()
We currently don't return NULL in case we don't find the
bpf_prog_info_node, fixing that.
Signed-off-by: Jiri Olsa <[email protected]>
Acked-by: Song Liu <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Fixes: e4378f0cb9 ("perf bpf: Save bpf_prog_info in a rbtree in perf_env")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
30e4c57496
commit
aa52660231
1 changed files with 3 additions and 1 deletions
|
|
@ -57,9 +57,11 @@ struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env,
|
|||
else if (prog_id > node->info_linear->info.id)
|
||||
n = n->rb_right;
|
||||
else
|
||||
break;
|
||||
goto out;
|
||||
}
|
||||
node = NULL;
|
||||
|
||||
out:
|
||||
up_read(&env->bpf_progs.lock);
|
||||
return node;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue