aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/timerlist.py
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-05-08 16:30:35 +0300
committerDavid S. Miller <[email protected]>2021-05-10 14:31:27 -0700
commita269333fa5c0c8e53c92b5a28a6076a28cde3e83 (patch)
treedf38f4b1df1fadbf42b81a615c1f9d4e08a55406 /scripts/gdb/linux/timerlist.py
parentddb6e00f8413e885ff826e32521cff7924661de0 (diff)
net: dsa: fix a crash if ->get_sset_count() fails
If ds->ops->get_sset_count() fails then it "count" is a negative error code such as -EOPNOTSUPP. Because "i" is an unsigned int, the negative error code is type promoted to a very high value and the loop will corrupt memory until the system crashes. Fix this by checking for error codes and changing the type of "i" to just int. Fixes: badf3ada60ab ("net: dsa: Provide CPU port statistics to master netdev") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions