diff options
author | Bryan Honza <honza@ti.com> | 2011-12-16 13:05:18 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-01-09 08:39:17 +0800 |
commit | 10c005731027c9c2075a1dd6ab404525b2437776 (patch) | |
tree | 0a7494c0f0b6e05c1806cbc6490e73ddc1a947a2 | |
parent | 2c2b9c8130706dbd06ef7d71103ab67621465ffa (diff) |
syslink: procmgr: initialize attach_count
atomic_cmpmask_and_set() is operating on an uninitialized attach_count
which can pass the cmpmask as if it has been initialized
resulting in the cmpmask_and_set() not initializing the attach_count.
For instance, if the uninitialized attach_count happens to be
0xffffffff, atomic_cmpmask_and_set() will not change the attach_count.
This attach_count is allocated on the heap.
Change-Id: Iaadc3f093287d965ff4d00f8d3f9c63ce596a6d4
Signed-off-by: Bryan Honza <honza@ti.com>
-rw-r--r-- | drivers/dsp/syslink/procmgr/proc4430/proc4430.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dsp/syslink/procmgr/proc4430/proc4430.c b/drivers/dsp/syslink/procmgr/proc4430/proc4430.c index 7530ba8df5b..f3fb7887823 100644 --- a/drivers/dsp/syslink/procmgr/proc4430/proc4430.c +++ b/drivers/dsp/syslink/procmgr/proc4430/proc4430.c @@ -312,6 +312,7 @@ void *proc4430_create(u16 proc_id, const struct proc4430_params *params) params->num_mem_entries)); } handle->boot_mode = PROC_MGR_BOOTMODE_NOLOAD; + atomic_set(&object->attach_count, 0); /* Set the handle in the state object. */ proc4430_state.proc_handles[proc_id] = handle; } |