OrangePi_CM5/drivers/net/ethernet/cisco/enic
Lv Yunlong 7afdd6aba9 ethernet:enic: Fix a use after free bug in enic_hard_start_xmit
[ Upstream commit 643001b47adc844ae33510c4bb93c236667008a3 ]

In enic_hard_start_xmit, it calls enic_queue_wq_skb(). Inside
enic_queue_wq_skb, if some error happens, the skb will be freed
by dev_kfree_skb(skb). But the freed skb is still used in
skb_tx_timestamp(skb).

My patch makes enic_queue_wq_skb() return error and goto spin_unlock()
incase of error. The solution is provided by Govind.
See https://lkml.org/lkml/2021/4/30/961.

Fixes: fb7516d424 ("enic: add sw timestamp support")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Acked-by: Govindarajulu Varadarajan <gvaradar@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-19 10:13:06 +02:00
..
Kconfig
…
Makefile
…
cq_desc.h
…
cq_enet_desc.h
…
enic.h
…
enic_api.c
…
enic_api.h
…
enic_clsf.c
…
enic_clsf.h
…
enic_dev.c
…
enic_dev.h
…
enic_ethtool.c
…
enic_main.c
…
enic_pp.c
…
enic_pp.h
…
enic_res.c
…
enic_res.h
…
rq_enet_desc.h
…
vnic_cq.c
…
vnic_cq.h
…
vnic_dev.c
…
vnic_dev.h
…
vnic_devcmd.h
…
vnic_enet.h
…
vnic_intr.c
…
vnic_intr.h
…
vnic_nic.h
…
vnic_resource.h
…
vnic_rq.c
…
vnic_rq.h
…
vnic_rss.h
…
vnic_stats.h
…
vnic_vic.c
…
vnic_vic.h
…
vnic_wq.c
…
vnic_wq.h
…
wq_enet_desc.h
…