From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6799565117683823849==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] RDMA/rxe: fix call_kern.cocci warnings Date: Thu, 14 Jan 2021 23:58:33 +0800 Message-ID: <20210114155833.GA86364@a52e88a6e236> In-Reply-To: <202101142325.3vKm3sdG-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============6799565117683823849== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: Doug Ledford CC: Jason Gunthorpe CC: linux-rdma(a)vger.kernel.org TO: Bob Pearson CC: Jason Gunthorpe CC: Zhu Yanjun CC: Doug Ledford CC: linux-rdma(a)vger.kernel.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/infiniband/sw/rxe/rxe_pool.c:360:21-31: ERROR: function rxe_alloc_n= l 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 Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git wip/j= gg-for-next head: 8a48ac7f6c24973863b42d03156d5e34c46c2971 commit: 3853c35e243d56238159e8365b6aca410bdd4576 [13/14] RDMA/rxe: Add unlo= cked 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 =3D kzalloc(info->size, (pool->flags & RXE_POOL_ATOMIC) ? - GFP_ATOMIC : GFP_KERNEL); + GFP_ATOMIC : GFP_ATOMIC); if (!obj) goto out_cnt; =20 --===============6799565117683823849==--