diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-01-20 05:32:49 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-21 13:47:56 -0500 |
commit | 8ce96afa8239f13bdf5ab35839bac46c103bbedc (patch) | |
tree | 6dceb2ad7ea02becf88378f008561885c2c10de4 | |
parent | d1db47c5eed89a1c8b60e780aeadd870bb0d3894 (diff) |
IB/usnic: Use GFP_ATOMIC under spinlock
This is called from qp_grp_and_vf_bind() and we are holding the
vf->lock so the allocation can't sleep.
Fixes: e3cf00d0a87f ('IB/usnic: Add Cisco VIC low-level hardware driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | drivers/infiniband/hw/usnic/usnic_uiom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index ae6934c0d05a..16755cdab2c0 100644 --- a/drivers/infiniband/hw/usnic/usnic_uiom.c +++ b/drivers/infiniband/hw/usnic/usnic_uiom.c | |||
@@ -498,7 +498,7 @@ int usnic_uiom_attach_dev_to_pd(struct usnic_uiom_pd *pd, struct device *dev) | |||
498 | struct usnic_uiom_dev *uiom_dev; | 498 | struct usnic_uiom_dev *uiom_dev; |
499 | int err; | 499 | int err; |
500 | 500 | ||
501 | uiom_dev = kzalloc(sizeof(*uiom_dev), GFP_KERNEL); | 501 | uiom_dev = kzalloc(sizeof(*uiom_dev), GFP_ATOMIC); |
502 | if (!uiom_dev) | 502 | if (!uiom_dev) |
503 | return -ENOMEM; | 503 | return -ENOMEM; |
504 | uiom_dev->dev = dev; | 504 | uiom_dev->dev = dev; |