Skip to contentSkip to conversation

dma-buf: double unlock in debugfs code

PATCH In review Dan Carpenter 2 participants 4 messages Apr 11, 2013 – Apr 12, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dma-buf: double unlock in debugfs code

We unlock here when we failed to take the lock.

---
This is in linux-next, and I think the debugfs code is only in Sumit's tree.

drivers/base/dma-buf.c +1 -2
index 466476f..174cd2c 100644
@@ -593,7 +593,7 @@ static int dma_buf_describe(struct seq_file *s)
 		if (ret) {
 			seq_printf(s,
 				  "\tERROR locking buffer object: skipping\n");
-			goto skip_buffer;
+			continue;
 		}
 
 		seq_printf(s, "\t");
@@ -618,7 +618,6 @@ static int dma_buf_describe(struct seq_file *s)
 
 		count++;
 		size += buf_obj->size;
-skip_buffer:
 		mutex_unlock(&buf_obj->lock);
 	}
 
#1 lore raw

Oops... I mailed that prematurely. There isn't a [patch 2/2].

regards,
dan carpenter

A message that is not in the archive (sent off-list or not yet received): CAO_48GHvAUmVmmZyHiEXzN3nWtTjC9iz-hEo-z3GrR2T-LZ-0w@mail.gmail.com

#4 lore raw
Quoted 9 lines · Sumit Semwal

Hi Dan,

Quoted 2 lines · Dan Carpenter

We unlock here when we failed to take the lock.

Thanks for catching this; I will add it to the for-next queue.

Could I merge this change with the main patch while submitting to mainline? With an attribution to you, of course.

Yeah. Just merge it. Don't stress about attribution.

regards,
dan carpenter