diff options
author | Gal Pressman <galpress@amazon.com> | 2018-12-10 17:17:25 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-12-11 14:38:17 -0700 |
commit | a276a4d93bf1580d737f38d1810e5f4b166f3edd (patch) | |
tree | 93000b0848093a480bf7767bfe6e2f8b273f56c9 /drivers/infiniband | |
parent | 59590b8ad2eea9543a639880fc0d2c139b66d164 (diff) | |
download | linux-a276a4d93bf1580d737f38d1810e5f4b166f3edd.tar.bz2 |
RDMA/vmw_pvrdma: Use atomic memory allocation in create AH
Create address handle callback should not sleep, use GFP_ATOMIC instead of
GFP_KERNEL for memory allocation.
Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver")
Cc: Adit Ranadive <aditr@vmware.com>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c index b65d10b0a875..f4cb5cf26006 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c @@ -555,7 +555,7 @@ struct ib_ah *pvrdma_create_ah(struct ib_pd *pd, struct rdma_ah_attr *ah_attr, if (!atomic_add_unless(&dev->num_ahs, 1, dev->dsr->caps.max_ah)) return ERR_PTR(-ENOMEM); - ah = kzalloc(sizeof(*ah), GFP_KERNEL); + ah = kzalloc(sizeof(*ah), GFP_ATOMIC); if (!ah) { atomic_dec(&dev->num_ahs); return ERR_PTR(-ENOMEM); |