]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_xdp_run
authorLorenzo Bianconi <lorenzo@kernel.org>
Tue, 16 Aug 2022 14:16:15 +0000 (16:16 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 04:59:14 +0000 (21:59 -0700)
commitc4ac09354dad6c37708b31d084a877ae1ff7918e
tree71c78fe6b44fe03f2edcfa0267bc5a5f10340214
parent26b0cfc73214994beba3fe146e0dcb14f7dfaa26
net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_xdp_run

Fix possible NULL pointer dereference in mtk_xdp_run() if the
ebpf program returns XDP_TX and xdp_convert_buff_to_frame routine fails
returning NULL.

Fixes: 8130afc7e456f ("net: ethernet: mtk_eth_soc: add xmit XDP support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/627a07d759020356b64473e09f0855960e02db28.1660659112.git.lorenzo@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mediatek/mtk_eth_soc.c