aboutsummaryrefslogtreecommitdiff
path: root/scripts/bpf_doc.py
diff options
context:
space:
mode:
authorPavel Skripkin <[email protected]>2021-08-17 19:37:23 +0300
committerDavid S. Miller <[email protected]>2021-08-18 11:46:52 +0100
commita786e3195d6af183033e86f0518ffd2c51c0e8ac (patch)
treeec716cb3e3457a639139c31177ab855593366a48 /scripts/bpf_doc.py
parent01634047bf0d5c2d9b7d8095bb4de1663dbeedeb (diff)
net: asix: fix uninit value bugs
Syzbot reported uninit-value in asix_mdio_read(). The problem was in missing error handling. asix_read_cmd() should initialize passed stack variable smsr, but it can fail in some cases. Then while condidition checks possibly uninit smsr variable. Since smsr is uninitialized stack variable, driver can misbehave, because smsr will be random in case of asix_read_cmd() failure. Fix it by adding error handling and just continue the loop instead of checking uninit value. Added helper function for checking Host_En bit, since wrong loop was used in 4 functions and there is no need in copy-pasting code parts. Cc: Robert Foss <[email protected]> Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter") Reported-by: [email protected] Signed-off-by: Pavel Skripkin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/bpf_doc.py')
0 files changed, 0 insertions, 0 deletions