From: Paolo Abeni <pabeni@redhat.com>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
ilias.apalodimas@linaro.org, edumazet@google.com,
kuba@kernel.org, horms@kernel.org, hawk@kernel.org,
almasrymina@google.com
Subject: Re: [PATCH v2 net-next] page_pool: avoid infinite loop to schedule delayed worker
Date: Thu, 13 Feb 2025 09:32:11 +0100 [thread overview]
Message-ID: <94376281-1922-40ee-bfd6-80ff88b9eed7@redhat.com> (raw)
In-Reply-To: <20250213052150.18392-1-kerneljasonxing@gmail.com>
On 2/13/25 6:21 AM, Jason Xing wrote:
> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
> index 1c6fec08bc43..e1f89a19a6b6 100644
> --- a/net/core/page_pool.c
> +++ b/net/core/page_pool.c
> @@ -1112,13 +1112,12 @@ static void page_pool_release_retry(struct work_struct *wq)
> int inflight;
>
> inflight = page_pool_release(pool);
> - if (!inflight)
> - return;
>
> /* Periodic warning for page pools the user can't see */
> netdev = READ_ONCE(pool->slow.netdev);
This causes UaF, as catched by the CI:
https://netdev-3.bots.linux.dev/vmksft-net-dbg/results/990441/34-udpgro-bench-sh/stderr
at this point 'inflight' could be 0 and 'pool' already freed.
/P
next prev parent reply other threads:[~2025-02-13 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 5:21 [PATCH v2 net-next] page_pool: avoid infinite loop to schedule delayed worker Jason Xing
2025-02-13 8:32 ` Paolo Abeni [this message]
2025-02-13 10:48 ` Jason Xing
2025-02-13 20:14 ` Mina Almasry
2025-02-13 23:42 ` Jason Xing
2025-02-14 4:09 ` Mina Almasry
2025-02-14 6:13 ` Jason Xing
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=94376281-1922-40ee-bfd6-80ff88b9eed7@redhat.com \
--to=pabeni@redhat.com \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.