Received: by 10.192.165.148 with SMTP id m20csp4586400imm; Tue, 8 May 2018 10:45:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZorZelQqyKbwRcu7D3AoERMekdtHex58Va7cu/PY7qdoNiOSE98s0BJXC48UGvKwFjl66kY X-Received: by 2002:a17:902:b485:: with SMTP id y5-v6mr10633372plr.381.1525801519231; Tue, 08 May 2018 10:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525801519; cv=none; d=google.com; s=arc-20160816; b=wl2HSyhEuJjSBUY0HNVqTLpSjiorNe9CfzTkk8fjuD1/dhFAJvc/hctbuBrtlo/Oov 2yDox/lh6vCUfW+2/q603+QE9VeMos48Fkj71of4We4LxINeiDIHmoG7gK45WzbL9Xg1 9q65tvEd789fTk5hfqR8ACnXOOi2yObL5f9hm2Kzg6mrMEa6VsaoVPsltkrjXWy5VJXQ m/pk62Ip0JvSNQlaFnVjGDjQPnryFvWepWhHMxjrTQlpbjg7YJ4AJgmXGiZmEWF9NTyN slTiHSNap8C7ByCh7Cl0Ee3KWpf8Ilc4PLZY4G6wtqb8r4SRTtIxLbVSvAo7fKFoBJd6 +3Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=pJ+1a3jvTTIzASThuudXjp082SRdJ/kumyTXP5UHqGE=; b=lEQJbydbZSA7OYC9k2kGcJpyBBq2cbZwGgBZ3UGtXNVIQhEl1OZDvr1EwRWsKBthiC ktxJphu0Q7ef+TzgZ40ludx/4WOMCFOlKPXTXlEGGM/wJFYkRxMvSPkaLMgyY+TwdJI8 QFRx51je4pe2JDbYCE1GuMUTztZEdywdpVrrYrQwGJWWFpaTc5MRL2CLFVErBjxmoIWt +x/n17eSjba3pNtyJgp+9H8z7khJu9syEO/WaLsBRP6ZLx60Mngxj5okITUwIA7N+D2w lCFOPpXTZR8PigGtr4uM4AAo1iC8fNYEDcL44BLf4femJTFUDuFjh6IN79KkHpAsTmmM OKgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si22965826pls.462.2018.05.08.10.45.04; Tue, 08 May 2018 10:45:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755606AbeEHRof (ORCPT + 99 others); Tue, 8 May 2018 13:44:35 -0400 Received: from fieldses.org ([173.255.197.46]:50958 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755438AbeEHRoc (ORCPT ); Tue, 8 May 2018 13:44:32 -0400 Received: by fieldses.org (Postfix, from userid 2815) id CC7CC25E6; Tue, 8 May 2018 13:44:31 -0400 (EDT) Date: Tue, 8 May 2018 13:44:31 -0400 From: Bruce Fields To: Chuck Lever Cc: Trond Myklebust , "syzbot+4b98281f2401ab849f4b@syzkaller.appspotmail.com" , "syzkaller-bugs@googlegroups.com" , Anna Schumaker , "davem@davemloft.net" , "linux-kernel@vger.kernel.org" , Linux NFS Mailing List , "jlayton@kernel.org" , "netdev@vger.kernel.org" Subject: Re: general protection fault in encode_rpcb_string Message-ID: <20180508174431.GE6151@fieldses.org> References: <20180417213308.GC18217@fieldses.org> <1524002074.63751.5.camel@hammer.space> <20180508161529.GD6151@fieldses.org> <4B24FAE4-C7E8-4D01-9808-B8F4E9E59D64@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B24FAE4-C7E8-4D01-9808-B8F4E9E59D64@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 12:34:48PM -0400, Chuck Lever wrote: > > > > On May 8, 2018, at 12:15 PM, bfields@fieldses.org wrote: > > > > On Tue, Apr 17, 2018 at 09:54:36PM +0000, Trond Myklebust wrote: > >> Yes, and we can probably convert it, and the other GFP_ATOMIC > >> allocations in the rpcbind client to use GFP_NOFS in order to improve > >> reliability. > > > > Chuck, I think the GFP_ATOMIC is unnecessary here as well? > > > > --b. > > > > diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c > > index e8adad33d0bb..de90c6c90cde 100644 > > --- a/net/sunrpc/xprtrdma/rpc_rdma.c > > +++ b/net/sunrpc/xprtrdma/rpc_rdma.c > > @@ -228,7 +228,7 @@ rpcrdma_convert_iovs(struct rpcrdma_xprt *r_xprt, struct xdr_buf *xdrbuf, > > /* XXX: Certain upper layer operations do > > * not provide receive buffer pages. > > */ > > - *ppages = alloc_page(GFP_ATOMIC); > > + *ppages = alloc_page(GFP_NOFS); > > if (!*ppages) > > return -EAGAIN; > > } > > This code can't sleep, as I understand it. Caller is holding > the transport write lock. This logic was copied from > xdr_partial_copy_from_skb, which uses GFP_ATOMIC. OK. > Recall that this is here because of GETACL. As I've stated in > the past, the correct solution is to ensure that these pages > are provided in every case by the upper layer, making this > alloc_page call site unnecessary. Got it. --b.