Skip to content

Commit

Permalink
trace: introduce missing mutex_unlock()
Browse files Browse the repository at this point in the history
Impact: fix tracing buffer mutex leak in case of allocation failure

This error was spotted by this semantic patch:

  http://www.emn.fr/x-info/coccinelle/mut.html

It looks correct as far as I can tell. Please review.

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Vegard Nossum authored and Ingo Molnar committed Nov 18, 2008
1 parent 5177dc3 commit 641d2f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
list_del_init(&page->list);
free_buffer_page(page);
}
mutex_unlock(&buffer->mutex);
return -ENOMEM;
}

Expand Down

0 comments on commit 641d2f6

Please sign in to comment.