diff options
author | Anssi Hannula <[email protected]> | 2022-10-10 17:08:27 +0200 |
---|---|---|
committer | Marc Kleine-Budde <[email protected]> | 2022-10-11 08:50:44 +0200 |
commit | cd7f30e174d09a02ca2afa5ef093fb0f0352e0d8 (patch) | |
tree | 9bea702835493aeea235f28809ca7d921d71f97d /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | 1499ecaea9d2ba68d5e18d80573b4561a8dc4ee7 (diff) |
can: kvaser_usb: Fix use of uninitialized completion
flush_comp is initialized when CMD_FLUSH_QUEUE is sent to the device and
completed when the device sends CMD_FLUSH_QUEUE_RESP.
This causes completion of uninitialized completion if the device sends
CMD_FLUSH_QUEUE_RESP before CMD_FLUSH_QUEUE is ever sent (e.g. as a
response to a flush by a previously bound driver, or a misbehaving
device).
Fix that by initializing flush_comp in kvaser_usb_init_one() like the
other completions.
This issue is only triggerable after RX URBs have been set up, i.e. the
interface has been opened at least once.
Cc: [email protected]
Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family")
Tested-by: Jimmy Assarsson <[email protected]>
Signed-off-by: Anssi Hannula <[email protected]>
Signed-off-by: Jimmy Assarsson <[email protected]>
Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions