[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1131414072170@webcorp02e.yandex-team.ru>
Date: Thu, 23 Oct 2014 17:49:30 +0400
From: Roman Gushchin <klamm@...dex-team.ru>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
"jesse.brandeburg@...el.com" <jesse.brandeburg@...el.com>,
"bruce.w.allan@...el.com" <bruce.w.allan@...el.com>,
"carolyn.wyborny@...el.com" <carolyn.wyborny@...el.com>,
"donald.c.skidmore@...el.com" <donald.c.skidmore@...el.com>,
"gregory.v.rose@...el.com" <gregory.v.rose@...el.com>,
"peter.p.waskiewicz.jr@...el.com" <peter.p.waskiewicz.jr@...el.com>,
"alexander.h.duyck@...el.com" <alexander.h.duyck@...el.com>,
"john.ronciak@...el.com" <john.ronciak@...el.com>,
"tushar.n.dave@...el.com" <tushar.n.dave@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"sassmann@...nic.de" <sassmann@...nic.de>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"e1000-devel@...ts.sourceforge.net"
<e1000-devel@...ts.sourceforge.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATHC] net: napi_reuse_skb() should check pfmemalloc
Signed-off-by: Roman Gushchin <klamm@...dex-team.ru>
--
@klamm
23.10.2014, 17:30, "Eric Dumazet" <eric.dumazet@...il.com>:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Do not reuse skb if it was pfmemalloc tainted, otherwise
> future frame might be dropped anyway.
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.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));
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists