summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorWei Fang <wei.fang@nxp.com>2022-12-19 10:27:55 +0800
committerJakub Kicinski <kuba@kernel.org>2022-12-20 11:33:24 -0800
commit19e72b064fc32cd58f6fc0b1eb64ac2e4f770e76 (patch)
tree2312c355264a8809b9e7c3400e0e6e639f16ed53 /include/trace
parent4be84df38a6f49b81e5909ede78242ba1538c1e6 (diff)
downloadlinux-19e72b064fc32cd58f6fc0b1eb64ac2e4f770e76.tar.bz2
net: fec: check the return value of build_skb()
The build_skb might return a null pointer but there is no check on the return value in the fec_enet_rx_queue(). So a null pointer dereference might occur. To avoid this, we check the return value of build_skb. If the return value is a null pointer, the driver will recycle the page and update the statistic of ndev. Then jump to rx_processing_done to clear the status flags of the BD so that the hardware can recycle the BD. Fixes: 95698ff6177b ("net: fec: using page pool to manage RX buffers") Signed-off-by: Wei Fang <wei.fang@nxp.com> Reviewed-by: Shenwei Wang <Shenwei.wang@nxp.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Link: https://lore.kernel.org/r/20221219022755.1047573-1-wei.fang@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/trace')
0 files changed, 0 insertions, 0 deletions