From: Steffen Klassert <steffen.klassert@secunet.com>
To: Dragos Tatulea <dtatulea@nvidia.com>
Cc: <almasrymina@google.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Matteo Croce <mcroce@microsoft.com>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
<leonro@nvidia.com>, <gal@nvidia.com>, <stable@vger.kernel.org>,
"Anatoli N . Chechelnickiy"
<Anatoli.Chechelnickiy@m.interpipe.biz>,
Ian Kumlien <ian.kumlien@gmail.com>,
<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net v3] net: esp: fix bad handling of pages from page_pool
Date: Tue, 19 Mar 2024 08:07:39 +0100 [thread overview]
Message-ID: <Zfk5uxupr5ntQui9@gauss3.secunet.de> (raw)
In-Reply-To: <20240308152723.831620-1-dtatulea@nvidia.com>
On Fri, Mar 08, 2024 at 05:26:00PM +0200, Dragos Tatulea wrote:
> When the skb is reorganized during esp_output (!esp->inline), the pages
> coming from the original skb fragments are supposed to be released back
> to the system through put_page. But if the skb fragment pages are
> originating from a page_pool, calling put_page on them will trigger a
> page_pool leak which will eventually result in a crash.
>
> This leak can be easily observed when using CONFIG_DEBUG_VM and doing
> ipsec + gre (non offloaded) forwarding:
...
> The suggested fix is to introduce a new wrapper (skb_page_unref) that
> covers page refcounting for page_pool pages as well.
>
> Cc: stable@vger.kernel.org
> Fixes: 6a5bcd84e886 ("page_pool: Allow drivers to hint on SKB recycling")
> Reported-and-tested-by: Anatoli N.Chechelnickiy <Anatoli.Chechelnickiy@m.interpipe.biz>
> Reported-by: Ian Kumlien <ian.kumlien@gmail.com>
> Link: https://lore.kernel.org/netdev/CAA85sZvvHtrpTQRqdaOx6gd55zPAVsqMYk_Lwh4Md5knTq7AyA@mail.gmail.com
> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
> Reviewed-by: Mina Almasry <almasrymina@google.com>
> Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Applied to the ipsec tree, thanks a lot!
prev parent reply other threads:[~2024-03-19 7:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 15:26 [PATCH net v3] net: esp: fix bad handling of pages from page_pool Dragos Tatulea
2024-03-11 8:43 ` Ilias Apalodimas
2024-03-11 8:51 ` Dragos Tatulea
2024-03-11 8:58 ` Ilias Apalodimas
2024-03-19 7:07 ` Steffen Klassert [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=Zfk5uxupr5ntQui9@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=Anatoli.Chechelnickiy@m.interpipe.biz \
--cc=almasrymina@google.com \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=herbert@gondor.apana.org.au \
--cc=ian.kumlien@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@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