Subject: Re: net: bnxt: Crash on 6.10 ioctl

From: Breno Leitao <[email-masked]>
Date: Mon, 15 Jul 2024 04:29:15 -0700

On Fri, Jul 12, 2024 at 10:02:06AM -0700, Michael Chan wrote:
> On Fri, Jul 12, 2024 at 9:03 AM Michael Chan <[email-masked]> wrote:
> >
> > On Fri, Jul 12, 2024 at 7:56 AM Breno Leitao <[email-masked]> wrote:
> > >         BUG: kernel NULL pointer dereference, address: 00000000000000b8
> > >         #PF: supervisor read access in kernel mode
> > >         #PF: error_code(0x0000) - not-present page
> > >         PGD 0 P4D 0
> > >         Oops: Oops: 0000 [#1] SMP
> > >         Hardware name: ...
> > >         RIP: 0010:bnxt_get_max_rss_ctx_ring (drivers/net/ethernet/broadcom/bnxt/bnxt.c:?)
> >
> > Maybe bp->rss_ctx_list is not valid.
> >
> > I think we can add this check:
> >
> > (bp->rss_cap & BNXT_RSS_CAP_MULTI_RSS_CTX)
> >
> > before proceeding in  bnxt_get_max_rss_ctx_ring().
> 
> I've confirmed the issue on older NICs not supporting multi RSS
> contexts and I will send out the patch very shortly.  Thanks.

Awesome. I've tested it and it fixed the problem.

Thanks!