diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-10-11 15:39:38 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-10-17 15:20:29 -0700 |
commit | 305a7e87055dde2466a855c24ef51a606915d149 (patch) | |
tree | 7cfe3df3901ad99677dc1794d684894db8bf5a38 | |
parent | 5b6810e048435de508ef66aebd6b78db13d651b8 (diff) |
[IB] uverbs: unlock correctly in error paths
A couple of functions were missing spin_unlock calls in error paths.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | drivers/infiniband/core/uverbs_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index c84cc28b60e..3a887006b25 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -312,8 +312,10 @@ void ib_uverbs_comp_handler(struct ib_cq *cq, void *cq_context) } entry = kmalloc(sizeof *entry, GFP_ATOMIC); - if (!entry) + if (!entry) { + spin_unlock_irqrestore(&file->lock, flags); return; + } uobj = container_of(cq->uobject, struct ib_ucq_object, uobject); @@ -343,8 +345,10 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file, } entry = kmalloc(sizeof *entry, GFP_ATOMIC); - if (!entry) + if (!entry) { + spin_unlock_irqrestore(&file->async_file->lock, flags); return; + } entry->desc.async.element = element; entry->desc.async.event_type = event; |