CC: [email protected]
CC: [email protected]
TO: Aharon Landau <[email protected]>
CC: Leon Romanovsky <[email protected]>
CC: Doug Ledford <[email protected]>
CC: Jason Gunthorpe <[email protected]>
CC: [email protected]
CC: [email protected]

From: kernel test robot <[email protected]>

drivers/infiniband/hw/mlx5/mr.c:284:60-70: ERROR: function 
remove_cache_mr_locked called on line 536 inside lock on line 531 but uses 
GFP_KERNEL
drivers/infiniband/hw/mlx5/mr.c:284:60-70: ERROR: function 
remove_cache_mr_locked called on line 319 inside lock on line 312 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: bf3dc01c2c55 ("RDMA/mlx5: Replace the MR cache with an Mkey cache")
CC: Aharon Landau <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git 
rdma-next
head:   10e4a930e72e9e35f67b47c025dcac31d3a09b38
commit: bf3dc01c2c551326778642f6f663637b8cde461c [3/30] RDMA/mlx5: Replace the 
MR cache with an Mkey cache
:::::: branch date: 13 hours ago
:::::: commit date: 2 days ago

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

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

--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -281,7 +281,7 @@ static void remove_cache_mr_locked(struc
        lockdep_assert_held(&ent->lock);
        if (!ent->available_mrs)
                return;
-       xa_ent = xa_store(&ent->mkeys, --ent->available_mrs, NULL, GFP_KERNEL);
+       xa_ent = xa_store(&ent->mkeys, --ent->available_mrs, NULL, GFP_ATOMIC);
        WARN_ON(xa_ent == NULL || xa_is_err(xa_ent));
        xa_erase(&ent->mkeys, ent->available_mrs + ent->pending);
        ent->total_mrs--;
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to