aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/uverbs_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index c84cc28b60ee..3a887006b253 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)
312 } 312 }
313 313
314 entry = kmalloc(sizeof *entry, GFP_ATOMIC); 314 entry = kmalloc(sizeof *entry, GFP_ATOMIC);
315 if (!entry) 315 if (!entry) {
316 spin_unlock_irqrestore(&file->lock, flags);
316 return; 317 return;
318 }
317 319
318 uobj = container_of(cq->uobject, struct ib_ucq_object, uobject); 320 uobj = container_of(cq->uobject, struct ib_ucq_object, uobject);
319 321
@@ -343,8 +345,10 @@ static void ib_uverbs_async_handler(struct ib_uverbs_file *file,
343 } 345 }
344 346
345 entry = kmalloc(sizeof *entry, GFP_ATOMIC); 347 entry = kmalloc(sizeof *entry, GFP_ATOMIC);
346 if (!entry) 348 if (!entry) {
349 spin_unlock_irqrestore(&file->async_file->lock, flags);
347 return; 350 return;
351 }
348 352
349 entry->desc.async.element = element; 353 entry->desc.async.element = element;
350 entry->desc.async.event_type = event; 354 entry->desc.async.event_type = event;