From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] skbuff: Unconditionally copy pfmemalloc in __skb_clone() Date: Fri, 13 Jul 2018 14:28:06 -0700 (PDT) Message-ID: <20180713.142806.1026051346682344836.davem@davemloft.net> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: sd@queasysnail.net, mgorman@suse.de, eric.dumazet@gmail.com, ptalbert@redhat.com, netdev@vger.kernel.org To: sbrivio@redhat.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:36662 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725908AbeGMVoa (ORCPT ); Fri, 13 Jul 2018 17:44:30 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Stefano Brivio Date: Fri, 13 Jul 2018 13:21:07 +0200 > 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 Applied.