Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp1691937rwe; Sat, 15 Apr 2023 04:24:22 -0700 (PDT) X-Google-Smtp-Source: AKy350Yygcj2yNFVfPFH9hLJ90tR6YuB2OHukNxzNY5iI0LBeo8nIfdJ2N8J30qrYti5V5ii2Mb0 X-Received: by 2002:a17:902:c946:b0:1a5:1b94:e63d with SMTP id i6-20020a170902c94600b001a51b94e63dmr6571480pla.65.1681557862065; Sat, 15 Apr 2023 04:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681557862; cv=none; d=google.com; s=arc-20160816; b=TF2/MFsKhnDwGAqMCQdAn7W1qgHxawviHf916Cbv/TCTGJ3TgpD5BO2uChg4Nu5RFB Xyb3XjPN+zPNtcHzRPwTt3FT+jaTFdq94iQr3o2Ur0uW/U+vUSpPo+l9pADiGcfm3fA8 JQQTS99g5/yJ/sZqKCFNeGs5Bes0BvawxubXRN7pVxFR66UiCpneG5eminNFtN2B4moF wPn7UCBstS3435K2Wf6t3/LWVr12epsCHEzmmlgGHKzWvx41a8+XpHRSI2R5krG/tmE7 1oq9RLcG40yf5uATd1f6LCVI6bVqivQ7N4uovJ6wXpe3eaqQrcz4vAB64yZCh6DRlY96 7qOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:from:to :content-language:user-agent:mime-version:date:message-id; bh=MgIY/r+sFhNiID/KbBdrryCGZk9avOQzbtweiyFE4FY=; b=VdOOccE6EVKflH7NXuKQuR8bWuAWGM8IY3YI/rcvn+4HnoMsDMKcXEpUwjTrRCrj4O d6cJfo8wnkXhvn6V3LQ/LbGO6aRpWc2M4B73d4tocCGdHUrGQfAVKxoGQKP8KadJfSnr kICcryN4QBqrEWsA0U+tS92ITgdeK2aaa6iVdx1YdP/+mTFf69TxO4DBu9aF8wQFw3nf YC/jw+4nLU0+1aX4RjIpeIOb3tvyCksIr2WoWK0G/yu/akL3gbJwWWDtFgByirWe25go +Tt8uczpbAIrIOwJRlc8bklJz1hcXNlYTp5REmhJpUyA7swRSscET59T80c/zaegywxo ruVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t4-20020a170902a5c400b001a2a31a4f0bsi6612378plq.373.2023.04.15.04.23.55; Sat, 15 Apr 2023 04:24:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230013AbjDOLIN (ORCPT + 99 others); Sat, 15 Apr 2023 07:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229922AbjDOLIM (ORCPT ); Sat, 15 Apr 2023 07:08:12 -0400 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A7A435AE for ; Sat, 15 Apr 2023 04:08:10 -0700 (PDT) Received: from fsav315.sakura.ne.jp (fsav315.sakura.ne.jp [153.120.85.146]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 33FB7rq4082153; Sat, 15 Apr 2023 20:07:53 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav315.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp); Sat, 15 Apr 2023 20:07:53 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav315.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 33FB7rCZ082150 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Sat, 15 Apr 2023 20:07:53 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <72bf692e-bb6b-c1f2-d1ba-3205ab649b43@I-love.SAKURA.ne.jp> Date: Sat, 15 Apr 2023 20:07:52 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: Chuck Lever , Jeff Layton , Frank van der Linden , "open list:NFS, SUNRPC, AND..." From: Tetsuo Handa Subject: [PATCH] nfsd: don't use GFP_KERNEL from nfsd_getxattr()/nfsd_listxattr() Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Since GFP_KERNEL is GFP_NOFS | __GFP_FS, usage like GFP_KERNEL | GFP_NOFS does not make sense. Drop __GFP_FS flag in order to avoid deadlock. Fixes: 32119446bb65 ("nfsd: define xattr functions to call into their vfs counterparts") Signed-off-by: Tetsuo Handa --- fs/nfsd/vfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 5783209f17fc..109b31246666 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -2164,7 +2164,7 @@ nfsd_getxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char *name, goto out; } - buf = kvmalloc(len, GFP_KERNEL | GFP_NOFS); + buf = kvmalloc(len, GFP_NOFS); if (buf == NULL) { err = nfserr_jukebox; goto out; @@ -2230,7 +2230,7 @@ nfsd_listxattr(struct svc_rqst *rqstp, struct svc_fh *fhp, char **bufp, /* * We're holding i_rwsem - use GFP_NOFS. */ - buf = kvmalloc(len, GFP_KERNEL | GFP_NOFS); + buf = kvmalloc(len, GFP_NOFS); if (buf == NULL) { err = nfserr_jukebox; goto out; -- 2.34.1