Re: [PATCH net] octeontx2-pf: fix NULL deref of af_xdp_zc_qidx on rep setup
Ratheesh Kannoth <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.bpf,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <aoguTKQIJa6IZ5r4@rkannoth-OptiPlex-7090> |
On 2026-08-20 at 14:35:33, Ratheesh Kannoth ([email protected]) wrote: > From: Suman Ghosh <[email protected]> > > af_xdp_zc_qidx tracks receive queues using AF_XDP zero-copy and is > allocated during PF/VF probe. Representors and other non-AF_XDP paths > leave the pointer NULL, but several call sites used test_bit() on it > unconditionally. > > Switching to devlink eswitch mode creates representors and runs > otx2_init_hw_resources(), which reaches otx2_pool_aq_init() and oopses > when dereferencing the NULL bitmap. Add NULL checks before every > af_xdp_zc_qidx test_bit() use in the RSS, ethtool, XSK, and pool init > paths. > > Fixes: efabce290151 ("octeontx2-pf: AF_XDP zero copy receive support") > Signed-off-by: Suman Ghosh <[email protected]> > Signed-off-by: Geetha sowjanya <[email protected]> > Signed-off-by: Ratheesh Kannoth <[email protected]> Will address sashiko comments in v2 pw-bot: changes-requested