mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
RDMA/vmw_pvrdma: Use atomic memory allocation in create AH
[ Upstream commita276a4d93b] Create address handle callback should not sleep, use GFP_ATOMIC instead of GFP_KERNEL for memory allocation. Fixes:29c8d9eba5("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
64694b276d
commit
d2e3e3c3c1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user