Skip to content
Commit a0327ff0 authored by James Hogan's avatar James Hogan Committed by Tejun Heo
Browse files

async: initialise list heads to fix crash



9fdb04cd ("async: replace list of active domains with global list
of pending items") added a struct list_head global_list in struct
async_entry, which isn't initialised.  This means that if
!domain->registered at __async_schedule(), then list_del_init() will
be called on the list head in async_run_entry_fn with both pointers
NULL, causing a crash.  This is fixed by initialising both the
global_list and domain_list list_heads after kzalloc'ing the entry.

This was noticed due to dapm_power_widgets() which uses
ASYNC_DOMAIN_EXCLUSIVE, which initialises the domain->registered to 0.

Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarJames Hogan <james.hogan@imgtec.com>
Reported-by: default avatarStephen Warren <swarren@wwwdotorg.org>
parent 9fdb04cd
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment