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(-)
--
2.53.0