From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sabrina Dubroca Subject: Re: [PATCH net] skbuff: Unconditionally copy pfmemalloc in __skb_clone() Date: Fri, 13 Jul 2018 14:45:05 +0200 Message-ID: <20180713124505.GA13363@bistromath.localdomain> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: "David S. Miller" , Mel Gorman , Eric Dumazet , Patrick Talbert , netdev@vger.kernel.org To: Stefano Brivio Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:53030 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728140AbeGMM72 (ORCPT ); Fri, 13 Jul 2018 08:59:28 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 2018-07-13, 13:21:07 +0200, Stefano Brivio wrote: > Commit 8b7008620b84 ("net: Don't copy pfmemalloc flag in > __copy_skb_header()") introduced a different handling for the > pfmemalloc flag in copy and clone paths. > > In __skb_clone(), now, the flag is set only if it was set in the > original skb, but not cleared if it wasn't. This is wrong and > might lead to socket buffers being flagged with pfmemalloc even > if the skb data wasn't allocated from pfmemalloc reserves. Copy > the flag instead of ORing it. > > Reported-by: Sabrina Dubroca > Fixes: 8b7008620b84 ("net: Don't copy pfmemalloc flag in __copy_skb_header()") > Signed-off-by: Stefano Brivio Thanks, Tested-by: Sabrina Dubroca -- Sabrina