[PATCH v2 1/2] wifi: b43: fix infinite loop from invalid hardware DMA RX slot
Michael Büsch
m at bues.ch
Thu Apr 16 09:31:00 PDT 2026
On Thu, 16 Apr 2026 08:34:00 +0200
Jonas Gorski <jonas.gorski at gmail.com> wrote:
> > diff --git a/drivers/net/wireless/broadcom/b43/dma.c b/drivers/net/wireless/broadcom/b43/dma.c
> > index XXXXXXX..XXXXXXX 100644
> > --- a/drivers/net/wireless/broadcom/b43/dma.c
> > +++ b/drivers/net/wireless/broadcom/b43/dma.c
> > @@ -1693,7 +1693,10 @@ void b43_dma_rx(struct b43_dmaring *ring)
> > B43_WARN_ON(ring->tx);
> > current_slot = ops->get_current_rxslot(ring);
> > - B43_WARN_ON(!(current_slot >= 0 && current_slot < ring->nr_slots));
> > + if (!(current_slot >= 0 && current_slot < ring->nr_slots)) {
> > + B43_WARN_ON(1);
> > + return;
> > + }
>
> B43_WARN_ON() returns the condition's result, so you can shorten this to
>
> if (B43_WARN_ON(!(current_slot >= 0 && current_slot < ring->nr_slots)))
> return;
Acked-by: Michael Büsch <m at bues.ch>
Please also check the b43legacy driver. It may contain exactly the same code.
--
Michael Büsch
https://bues.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20260416/9f3acb3e/attachment.sig>
More information about the b43-dev
mailing list