Commit fa69325
bpf: Initialize used but uninit variable in propagate_liveness()
With input changed == NULL, a local variable is used for "changed".
Initialize tmp properly, so that it can be used in the following:
*changed |= err > 0;
Otherwise, UBSAN will complain:
UBSAN: invalid-load in kernel/bpf/verifier.c:18924:4
load of value <some random value> is not a valid value for type '_Bool'
Fixes: dfb2d4c ("bpf: set 'changed' status if propagate_liveness() did any updates")
Signed-off-by: Song Liu <[email protected]>
Acked-by: Eduard Zingerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>1 parent 50034d9 commit fa69325
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18900 | 18900 | | |
18901 | 18901 | | |
18902 | 18902 | | |
18903 | | - | |
| 18903 | + | |
18904 | 18904 | | |
18905 | 18905 | | |
18906 | 18906 | | |
| |||
0 commit comments