octeon_ep_vf: fix napi_build_skb() NULL dereference
Status from this message: This series was applied to netdev/net.git (main)
Get series with b4
b4 am [email protected]Versions newest first
Patches in v2 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | octeon_ep_vf: introduce octep_vf_oq_next_idx() helperdrivers/ | +8 | 0 replies | Applied |
| 2/2 | octeon_ep_vf: add NULL check for napi_build_skb()drivers/ | +28 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH net v2 0/2] octeon_ep_vf: fix napi_build_skb() NULL dereference
napi_build_skb() can return NULL on allocation failure. In __octep_vf_oq_process_rx(), the result is used directly without a NULL check in both the single-buffer and multi-fragment paths, leading to a NULL pointer dereference.
Patch 1 introduces a helper to deduplicate the ring index advance pattern, patch 2 adds the actual NULL checks.
---
v1 -> v2: split into refactor + fix per Simon Horman review.
v1: https://lore.kernel.org/netdev/Z-6w5kfCJoGhb30g@framework/
David Carlier (2):
octeon_ep_vf: introduce octep_vf_oq_next_idx() helper
octeon_ep_vf: add NULL check for napi_build_skb()
.../marvell/octeon_ep_vf/octep_vf_rx.c | 47 ++++++++++++++----- 1 file changed, 36 insertions(+), 11 deletions(-)
Signature · 1 line
2.53.0