All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Mina Almasry <almasrymina@google.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Mina Almasry <almasrymina@google.com>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Kaifeng Wang <kaifengw@google.com>,
	Dong Chenchen <dongchenchen2@huawei.com>
Subject: Re: [PATCH net v1] net: page_pool: fix use-after-free in page_pool_recycle_ring_bulk()
Date: Mon, 28 Sep 2026 14:40:22 +0200	[thread overview]
Message-ID: <871padlfbd.fsf@toke.dk> (raw)
In-Reply-To: <20260925144127.1445667-1-almasrymina@google.com>

Mina Almasry <almasrymina@google.com> writes:

> With CONFIG_PAGE_POOL_STATS=y, page_pool_recycle_ring_bulk() updates
> the recycle stats after dropping the producer lock. If it just recycled
> the last inflight netmems of a pool being destroyed, page_pool_release()
> can pass its producer-lock barrier and free the pool before
> recycle_stat_add() runs.
>
> Commit fcc680a647ba7 ("page_pool: allow mixing PPs within one bulk")
> moved this stat update after the unlock. Commit 271683bb2cf32
> ("page_pool: Fix use-after-free in page_pool_recycle_in_ring") later
> added the barrier, but only fixed page_pool_recycle_in_ring(). Move
> the update back under the lock.
>
> Fixes: fcc680a647ba7 ("page_pool: allow mixing PPs within one bulk")
> Link: https://lore.kernel.org/r/179028939171.2160803.706522228583664641@kernel.org
> Cc: Kaifeng Wang <kaifengw@google.com>
> Cc: Dong Chenchen <dongchenchen2@huawei.com>
> Assisted-by: LLM
> Signed-off-by: Mina Almasry <almasrymina@google.com>

Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>


  parent reply	other threads:[~2026-09-28 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25 14:41 [PATCH net v1] net: page_pool: fix use-after-free in page_pool_recycle_ring_bulk() Mina Almasry
2026-09-26 17:00 ` Simon Horman
2026-09-28 12:40 ` Toke Høiland-Jørgensen [this message]
2026-09-29  1:40 ` patchwork-bot+netdevbpf

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=871padlfbd.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=almasrymina@google.com \
    --cc=davem@davemloft.net \
    --cc=dongchenchen2@huawei.com \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kaifengw@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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.