Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Gregory Price
Tue, 13 Oct 2026 21:50
Re: [PATCH net-next v3 7/7] bnxt_en: Fix ring accounting and validation when rings are constrained
Author: Gregory Price
Date: Tue, 13 Oct 2026 21:50
Date: Tue, 13 Oct 2026 21:50
34 lines
9446 bytes
9446 bytes
On Mon, Oct 12, 2026 at 03:08:27PM -0700, Michael Chan wrote:
> When __bnxt_reserve_rings() reserves fewer TX rings than requested,
> and an XDP program is attached, the driver used to blindly subtract
> bp->tx_nr_rings_xdp from bp->tx_nr_rings, potentially causing an integer
> underflow.
>
This is outside my normal space, was reviewing this for testing and had
an agent spot what it thinks is a bug. It seemed reasonable to me but
if you think this is wrong, please ignore.
> @@ -11602,25 +11673,23 @@ int bnxt_reserve_rings(struct bnxt *bp, bool irq_re_init)
> if (!rc)
> rc = bnxt_init_int_mode(bp);
> bnxt_ulp_irq_restart(bp, rc);
> - } else if (irq_change && !rc) {
> - if (bnxt_change_msix(bp, irqs_required) != irqs_required)
> - rc = -ENOSPC;
> + } else if (irq_re_init && BNXT_NEW_RM(bp) && !rc) {
should this be:
} else if (irq_re_init && BNXT_NEW_RM(bp) && bp->irq_tbl && !rc) {
Note from the LLM was:
Unlike irq_change, this no longer implies bp->irq_tbl != NULL. After a
FW/AER reset irq_tbl is gone but total_irqs is stale, so if the rings
shrink we call bnxt_change_msix() with no table and fail with -ENOSPC.
Should this also check bp->irq_tbl?
~Gregory
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads