diff options
| author | Hao Chen <chenhao288@hisilicon.com> | 2022-05-09 10:55:27 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2022-05-09 16:30:37 +0300 |
| commit | a4fe9b6db6f93694fa14b41e764a2c0f147f13da (patch) | |
| tree | 2fd4ccb7862027bd417019b0a75c432e7078fb3c /tools/perf/scripts/python/net_dropmonitor.py | |
| parent | 1728c0567f70583d5e8aa698ce5778c481cc8de7 (diff) | |
| download | linux-a4fe9b6db6f93694fa14b41e764a2c0f147f13da.tar.xz | |
net: hns3: fix access null pointer issue when set tx-buf-size as 0
When set tx-buf-size as 0 by ethtool, hns3_init_tx_spare_buffer()
will return directly and priv->ring->tx_spare->len is uninitialized,
then print function access priv->ring->tx_spare->len will cause
this issue.
When set tx-buf-size as 0 by ethtool, the print function will
print 0 directly and not access priv->ring->tx_spare->len.
Fixes: 2373b35c24ff ("net: hns3: add log for setting tx spare buf size")
Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions
