mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	"Matteo Croce" <mcroce@microsoft.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>, <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 v2] net: esp: fix bad handling of pages from page_pool
Date: Fri, 8 Mar 2024 09:42:10 +0100	[thread overview]
Message-ID: <ZerPYroeK/pltA9I@gauss3.secunet.de> (raw)
In-Reply-To: <20240307182946.821568-1-dtatulea@nvidia.com>

On Thu, Mar 07, 2024 at 08:28:58PM +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>

This patch does not apply to the ipsec tree. Can you please rebase onto:

git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git

Thanks!

      reply	other threads:[~2024-03-08  8:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 18:28 Dragos Tatulea
2024-03-08  8:42 ` 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=ZerPYroeK/pltA9I@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

all inboxes | Powered by JetHome®