]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/usnic: Lock VF with mutex instead of spinlock
authorLeon Romanovsky <leonro@nvidia.com>
Mon, 13 Sep 2021 08:04:42 +0000 (11:04 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 24 Sep 2021 13:55:28 +0000 (10:55 -0300)
commitcfee20bef51ac69ac86277d7a4a42caf94360fb2
treee2497ffb32b0e96b4d5a6b0c6e56db16936f32d1
parent70c72d1162f9aa19eed153529829dcfee4cc0d53
RDMA/usnic: Lock VF with mutex instead of spinlock

Usnic VF doesn't need lock in atomic context to create QPs, so it is safe
to use mutex instead of spinlock. Such change fixes the following smatch
error.

Smatch static checker warning:

   lib/kobject.c:289 kobject_set_name_vargs()
    warn: sleeping in atomic context

Fixes: 0a422dec2a13 ("RDMA: Globally allocate and release QP memory")
Link: https://lore.kernel.org/r/2a0e295786c127e518ebee8bb7cafcb819a625f6.1631520231.git.leonro@nvidia.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/usnic/usnic_ib.h
drivers/infiniband/hw/usnic/usnic_ib_main.c
drivers/infiniband/hw/usnic/usnic_ib_verbs.c