Message ID | 1544455045-3059-1-git-send-email-galpress@amazon.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a276a4d93bf1580d737f38d1810e5f4b166f3edd |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | [rdma-rc] RDMA/vmw_pvrdma: Use atomic memory allocation in create AH | expand |
On Mon, Dec 10, 2018 at 05:17:25PM +0200, Gal Pressman wrote: > 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> > --- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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); Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> > -- > 2.7.4 >
On Mon, Dec 10, 2018 at 05:17:25PM +0200, Gal Pressman wrote: > 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> > --- > drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to for-next Thanks, Jason
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);
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> --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)