- 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>
/*
* 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.
*/
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;
}