public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Roman Gushchin <klamm@yandex-team.ru>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "alexander.h.duyck@intel.com" <alexander.h.duyck@intel.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"sassmann@kpanic.de" <sassmann@kpanic.de>,
	"e1000-devel@lists.sourceforge.net"
	<e1000-devel@lists.sourceforge.net>,
	"peter.p.waskiewicz.jr@intel.com"
	<peter.p.waskiewicz.jr@intel.com>,
	"bruce.w.allan@intel.com" <bruce.w.allan@intel.com>,
	"jesse.brandeburg@intel.com" <jesse.brandeburg@intel.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"john.ronciak@intel.com" <john.ronciak@intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATHC] net: napi_reuse_skb() should check pfmemalloc
Date: Thu, 23 Oct 2014 17:49:30 +0400	[thread overview]
Message-ID: <1131414072170@webcorp02e.yandex-team.ru> (raw)
In-Reply-To: <1414071030.2094.46.camel@edumazet-glaptop2.roam.corp.google.com>

Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>

--
@klamm


23.10.2014, 17:30, "Eric Dumazet" <eric.dumazet@gmail.com>:
> From: Eric Dumazet <edumazet@google.com>
>
> Do not reuse skb if it was pfmemalloc tainted, otherwise
> future frame might be dropped anyway.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/core/dev.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index b793e3521a36..945bbd001359 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -4157,6 +4157,10 @@ EXPORT_SYMBOL(napi_gro_receive);
>
>  static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
>  {
> + if (unlikely(skb->pfmemalloc)) {
> + consume_skb(skb);
> + return;
> + }
>          __skb_pull(skb, skb_headlen(skb));
>          /* restore the reserve we had after netdev_alloc_skb_ip_align() */
>          skb_reserve(skb, NET_SKB_PAD + NET_IP_ALIGN - skb_headroom(skb));

------------------------------------------------------------------------------
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

  reply	other threads:[~2014-10-23 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 13:50 [PATCH] igb: don't reuse pages with pfmemalloc flag Roman Gushchin
2014-10-22 15:45 ` Eric Dumazet
2014-10-23 11:21   ` Roman Gushchin
2014-10-23 13:30     ` [PATHC] net: napi_reuse_skb() should check pfmemalloc Eric Dumazet
2014-10-23 13:49       ` Roman Gushchin [this message]
2014-10-27  2:47       ` David Miller
2014-10-22 18:30 ` [PATCH] igb: don't reuse pages with pfmemalloc flag Jeff Kirsher
2014-10-23  7:52   ` Roman Gushchin

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=1131414072170@webcorp02e.yandex-team.ru \
    --to=klamm@yandex-team.ru \
    --cc=alexander.h.duyck@intel.com \
    --cc=bruce.w.allan@intel.com \
    --cc=davem@davemloft.net \
    --cc=e1000-devel@lists.sourceforge.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=sassmann@kpanic.de \
    /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