Commit 91215f7
io_uring/io-wq: avoid garbage value of 'match' in io_wq_enqueue()
Clang static checker (scan-build) warning:
o_uring/io-wq.c:line 1051, column 3
The expression is an uninitialized value. The computed value will
also be garbage.
'match.nr_pending' is used in io_acct_cancel_pending_work(), but it is
not fully initialized. Change the order of assignment for 'match' to fix
this problem.
Fixes: 42abc95 ("io-wq: decouple work_list protection from the big wqe->lock")
Signed-off-by: Su Hui <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 415ce0e commit 91215f7
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
931 | 935 | | |
932 | 936 | | |
933 | 937 | | |
| |||
965 | 969 | | |
966 | 970 | | |
967 | 971 | | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| |||
0 commit comments