Permalink
Browse files

Protect BMM_DUMP with the global mutex

Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com>
  • Loading branch information...
1 parent 1be2c76 commit b9fc5ff6f6b56a20c0d247679b46b4d8fb14b801 @rabeeh committed Mar 29, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 drivers/misc/bmm_drv.c
View
@@ -159,10 +159,12 @@ static void bmm_dump_list(struct list_head *head)
static void bmm_dump_all(void)
{
+ mutex_lock(&bmm_mutex);
pr_info("free block list:\n");
bmm_dump_list(&(bmm_free_block.list));
pr_info("used block list:\n");
bmm_dump_list(&(bmm_used_block.list));
+ mutex_unlock(&bmm_mutex);
}
static struct bmm_block_t *bmm_search_vaddr(struct list_head *head,

0 comments on commit b9fc5ff

Please sign in to comment.