From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] SUNRPC/xprt: fix call_kern.cocci warnings
Date: Mon, 14 Mar 2022 11:32:05 +0800 [thread overview]
Message-ID: <20220314033205.GA31728@237979dc38b3> (raw)
In-Reply-To: <202203141129.Lt2sd2kq-lkp@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: NeilBrown <neilb@suse.de>
CC: Trond Myklebust <trond.myklebust@hammerspace.com>
CC: Anna Schumaker <anna@kernel.org>
CC: Chuck Lever <chuck.lever@oracle.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: linux-nfs(a)vger.kernel.org
CC: netdev(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp@intel.com>
net/sunrpc/xprt.c:1690:18-28: ERROR: function xprt_dynamic_alloc_slot called on line 1728 inside lock on line 1722 but uses GFP_KERNEL
Find functions that refer to GFP_KERNEL but are called with locks held.
Semantic patch information:
The proposed change of converting the GFP_KERNEL is not necessarily the
correct one. It may be desired to unlock the lock, or to not call the
function under the lock in the first place.
Generated by: scripts/coccinelle/locks/call_kern.cocci
Fixes: a721035477fb ("SUNRPC/xprt: async tasks mustn't block waiting for memory")
CC: NeilBrown <neilb@suse.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: git://git.linux-nfs.org/projects/trondmy/nfs-2.6.git linux-next
head: 693486d5f8951780a9bb31f7fe935171a80010e4
commit: a721035477fb5fb8abc738fbe410b07c12af3dc5 [59/66] SUNRPC/xprt: async tasks mustn't block waiting for memory
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
Please take the patch only if it's a positive warning. Thanks!
net/sunrpc/xprt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1687,7 +1687,7 @@ out:
static struct rpc_rqst *xprt_dynamic_alloc_slot(struct rpc_xprt *xprt)
{
struct rpc_rqst *req = ERR_PTR(-EAGAIN);
- gfp_t gfp_mask = GFP_KERNEL;
+ gfp_t gfp_mask = GFP_ATOMIC;
if (xprt->num_reqs >= xprt->max_reqs)
goto out;
next prev parent reply other threads:[~2022-03-14 3:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-14 3:41 [trondmy-nfs-2.6:linux-next 59/66] net/sunrpc/xprt.c:1690:18-28: ERROR: function xprt_dynamic_alloc_slot called on line 1728 inside lock on line 1722 but uses GFP_KERNEL kernel test robot
2022-03-14 3:32 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-09 22:28 [sashal-stable:pending-5.10 84/98] net/sunrpc/xprt.c:1638:18-28: ERROR: function xprt_dynamic_alloc_slot called on line 1676 inside lock on line 1670 " kernel test robot
2022-04-09 22:19 ` [PATCH] SUNRPC/xprt: fix call_kern.cocci warnings kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220314033205.GA31728@237979dc38b3 \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.