All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [PATCH] RDMA/rxe: fix call_kern.cocci warnings
Date: Thu, 14 Jan 2021 23:58:33 +0800	[thread overview]
Message-ID: <20210114155833.GA86364@a52e88a6e236> (raw)
In-Reply-To: <202101142325.3vKm3sdG-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

CC: kbuild-all(a)lists.01.org
CC: Doug Ledford <dledford@redhat.com>
CC: Jason Gunthorpe <jgg+lists@ziepe.ca>
CC: linux-rdma(a)vger.kernel.org
TO: Bob Pearson <rpearsonhpe@gmail.com>
CC: Jason Gunthorpe <jgg@nvidia.com>
CC: Zhu Yanjun <zyjzyj2000@gmail.com>
CC: Doug Ledford <dledford@redhat.com>
CC: linux-rdma(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org

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

drivers/infiniband/sw/rxe/rxe_pool.c:360:21-31: ERROR: function rxe_alloc_nl called on line 385 inside lock on line 384 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: 3853c35e243d ("RDMA/rxe: Add unlocked versions of pool APIs")
CC: Bob Pearson <rpearsonhpe@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/jgg-for-next
head:   8a48ac7f6c24973863b42d03156d5e34c46c2971
commit: 3853c35e243d56238159e8365b6aca410bdd4576 [13/14] RDMA/rxe: Add unlocked versions of pool APIs
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago

Please take the patch only if it's a positive warning. Thanks!

 rxe_pool.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -357,7 +357,7 @@ void *rxe_alloc_nl(struct rxe_pool *pool
 		goto out_cnt;
 
 	obj = kzalloc(info->size, (pool->flags & RXE_POOL_ATOMIC) ?
-		      GFP_ATOMIC : GFP_KERNEL);
+		      GFP_ATOMIC : GFP_ATOMIC);
 	if (!obj)
 		goto out_cnt;
 

      reply	other threads:[~2021-01-14 15:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 15:58 [rdma:wip/jgg-for-next 13/14] drivers/infiniband/sw/rxe/rxe_pool.c:360:21-31: ERROR: function rxe_alloc_nl called on line 385 inside lock on line 384 but uses GFP_KERNEL kernel test robot
2021-01-14 15:58 ` kernel test robot [this message]

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=20210114155833.GA86364@a52e88a6e236 \
    --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.