diff options
author | Menglong Dong <imagedong@tencent.com> | 2022-05-13 06:03:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-05-16 12:47:43 +0300 |
commit | a3af33abd9210c93dc829b4fdd7a19f63f168a25 (patch) | |
tree | 7f4c61b9ab4241fd95cb616c8d95ad56632687ec /net/core/hwbm.c | |
parent | 3aba103006bcc4a7472b7c9506b3bc065ffb7992 (diff) | |
download | linux-a3af33abd9210c93dc829b4fdd7a19f63f168a25.tar.xz |
net: dm: check the boundary of skb drop reasons
The 'reason' will be set to 'SKB_DROP_REASON_NOT_SPECIFIED' if it not
small that SKB_DROP_REASON_MAX in net_dm_packet_trace_kfree_skb_hit(),
but it can't avoid it to be 0, which is invalid and can cause NULL
pointer in drop_reasons.
Therefore, reset it to SKB_DROP_REASON_NOT_SPECIFIED when 'reason <= 0'.
Reviewed-by: Jiang Biao <benbjiang@tencent.com>
Reviewed-by: Hao Peng <flyingpeng@tencent.com>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/hwbm.c')
0 files changed, 0 insertions, 0 deletions