From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Brendan Jackman <jackmanb@google.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iwlegacy: 3945-mac: Fix GFP flags in allocation loop
Date: Fri, 27 Mar 2026 13:52:05 +0100 [thread overview]
Message-ID: <20260327125205.GA18460@wp.pl> (raw)
In-Reply-To: <20260327-iwlegacy-gfp-fix-v1-1-b83e4db0bd66@google.com>
On Fri, Mar 27, 2026 at 12:30:07PM +0000, Brendan Jackman wrote:
> Do not latch these flags, they should be re-evaluated for each
> iteration of the loop.
>
> Concretely, rxq->free_count is incremented during the loop so the
> __GFP_NOWARN decision may be stale. There may be other reasons to
> require the re-evaluation too.
>
> Suggested-by: Stanislaw Gruszka <stf_xl@wp.pl>
> Link: https://lore.kernel.org/all/20260327115739.GB16800@wp.pl/
> Signed-off-by: Brendan Jackman <jackmanb@google.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
> ---
> Transparency note: I am 100% taking Stanislaw's word for this. The bug
> being fixed here hasn't been reproduced and I don't have a way to test
> this patch at all. It does seem to make sense to me though and, well,
> Stanislaw is the mantainer :)
> ---
> drivers/net/wireless/intel/iwlegacy/3945-mac.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> index c148654aa9533..e8ae6687c08ec 100644
> --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> @@ -979,9 +979,10 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority)
> struct page *page;
> dma_addr_t page_dma;
> unsigned long flags;
> - gfp_t gfp_mask = priority;
>
> while (1) {
> + gfp_t gfp_mask = priority;
> +
> spin_lock_irqsave(&rxq->lock, flags);
> if (list_empty(&rxq->rx_used)) {
> spin_unlock_irqrestore(&rxq->lock, flags);
>
> ---
> base-commit: 0138af2472dfdef0d56fc4697416eaa0ff2589bd
> change-id: 20260327-iwlegacy-gfp-fix-d553e3340b4f
>
> Best regards,
> --
> Brendan Jackman <jackmanb@google.com>
>
prev parent reply other threads:[~2026-03-27 12:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 12:30 [PATCH] iwlegacy: 3945-mac: Fix GFP flags in allocation loop Brendan Jackman
2026-03-27 12:52 ` Stanislaw Gruszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260327125205.GA18460@wp.pl \
--to=stf_xl@wp.pl \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox