aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-add.c
diff options
context:
space:
mode:
authorPavel Skripkin <[email protected]>2022-02-06 21:05:16 +0300
committerDavid S. Miller <[email protected]>2022-02-07 12:28:36 +0000
commit920a9fa27e7805499cfe78491b36fed2322c02ec (patch)
tree489a32cf147146a9e7853cba58300753b75fbf72 /lib/mpi/mpi-add.c
parentb845bac8edb10365efd4d37ed644f3f1edc23964 (diff)
net: asix: add proper error handling of usb read errors
Syzbot once again hit uninit value in asix driver. The problem still the same -- asix_read_cmd() reads less bytes, than was requested by caller. Since all read requests are performed via asix_read_cmd() let's catch usb related error there and add __must_check notation to be sure all callers actually check return value. So, this patch adds sanity check inside asix_read_cmd(), that simply checks if bytes read are not less, than was requested and adds missing error handling of asix_read_cmd() all across the driver code. Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter") Reported-and-tested-by: [email protected] Signed-off-by: Pavel Skripkin <[email protected]> Tested-by: Oleksij Rempel <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions