CC: kbuild-...@lists.01.org
BCC: l...@intel.com
TO: Sasha Levin <sas...@kernel.org>

From: kernel test robot <l...@intel.com>

net/sunrpc/xprt.c:1638:18-28: ERROR: function xprt_dynamic_alloc_slot called on 
line 1676 inside lock on line 1670 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: ab3f07e5a52e ("SUNRPC/xprt: async tasks mustn't block waiting for 
memory")
CC: NeilBrown <ne...@suse.de>
Reported-by: kernel test robot <l...@intel.com>
Signed-off-by: kernel test robot <l...@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git 
pending-5.10
head:   9008a65557dbcc00c1a0874eae6fd0601dece970
commit: ab3f07e5a52e2eeeede7ecb0f35092f496bc6120 [84/98] SUNRPC/xprt: async 
tasks mustn't block waiting for memory
:::::: branch date: 6 hours ago
:::::: commit date: 8 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
@@ -1635,7 +1635,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;
_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to