summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorTony LIU <junjie.liu@freescale.com>2012-07-20 10:11:06 +0800
committerTerry Lv <r65388@freescale.com>2012-07-25 13:11:30 +0800
commit6af0601e9a7974dd3ce3d5a5b38f7711a1cf0498 (patch)
treee7c67608e558500c5fa9bb7403104617501450aa /drivers/usb
parent2121d647a84064e9a7fb74b65a6921331664b222 (diff)
ENGR00217717 mfgtool firmware will crash during mfgtool running
- the root cause of this issue is there is no protection for the resource which will be accessed by multiple thread Signed-off-by: Tony LIU <junjie.liu@freescale.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/fsl_updater.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/fsl_updater.c b/drivers/usb/gadget/fsl_updater.c
index 01b35f31cba7..39175d6d4c48 100644
--- a/drivers/usb/gadget/fsl_updater.c
+++ b/drivers/usb/gadget/fsl_updater.c
@@ -1,7 +1,7 @@
/*
* Freescale UUT driver
*
- * Copyright 2008-2011 Freescale Semiconductor, Inc.
+ * Copyright 2008-2012 Freescale Semiconductor, Inc.
* Copyright 2008-2009 Embedded Alley Solutions, Inc All Rights Reserved.
*/
@@ -71,9 +71,11 @@ static u32 count_list(struct list_head *l)
u32 count = 0;
struct list_head *tmp;
+ mutex_lock(&utp_context.lock);
list_for_each(tmp, l) {
count++;
}
+ mutex_unlock(&utp_context.lock);
return count;
}