net: ipv4: use kfree_skb_reason() in ip_rcv_core()
authorMenglong Dong <imagedong@tencent.com>
Sat, 5 Feb 2022 07:47:35 +0000 (15:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Jul 2022 15:25:16 +0000 (17:25 +0200)
commitad5a78ed1356f4f3b397790802f7348b648465a0
tree8e80c8fd8f395c5ceaed9c1d28a8db1d1c5ec539
parent82cda99184736367a8768782f28cc1d13c9794ed
net: ipv4: use kfree_skb_reason() in ip_rcv_core()

[ Upstream commit 33cba42985c8144eef78d618fc1e51aaa074b169 ]

Replace kfree_skb() with kfree_skb_reason() in ip_rcv_core(). Three new
drop reasons are introduced:

SKB_DROP_REASON_OTHERHOST
SKB_DROP_REASON_IP_CSUM
SKB_DROP_REASON_IP_INHDR

Signed-off-by: Menglong Dong <imagedong@tencent.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/skbuff.h
include/trace/events/skb.h
net/ipv4/ip_input.c