aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/timerlist.py
diff options
context:
space:
mode:
authorSuwan Kim <[email protected]>2019-11-11 23:10:35 +0900
committerGreg Kroah-Hartman <[email protected]>2019-11-13 18:53:11 +0800
commit2a9125317b247f2cf35c196f968906dcf062ae2d (patch)
tree3b883ede04e3cb83c2ab3d27dd023ca9638387a8 /scripts/gdb/linux/timerlist.py
parent1ec13abac58b6f24e32f0d3081ef4e7456e62ed8 (diff)
usbip: Fix uninitialized symbol 'nents' in stub_recv_cmd_submit()
Smatch reported that nents is not initialized and used in stub_recv_cmd_submit(). nents is currently initialized by sgl_alloc() and used to allocate multiple URBs when host controller doesn't support scatter-gather DMA. The use of uninitialized nents means that buf_len is zero and use_sg is true. But buffer length should not be zero when an URB uses scatter-gather DMA. To prevent this situation, add the conditional that checks buf_len and use_sg. And move the use of nents right after the sgl_alloc() to avoid the use of uninitialized nents. If the error occurs, it adds SDEV_EVENT_ERROR_MALLOC and stub_priv will be released by stub event handler and connection will be shut down. Fixes: ea44d190764b ("usbip: Implement SG support to vhci-hcd and stub driver") Reported-by: kbuild test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Suwan Kim <[email protected]> Acked-by: Shuah Khan <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions