Merge "ALSA: info: Protect list access of new entry"
This commit is contained in:
commit
b95d667366
1 changed files with 4 additions and 1 deletions
|
@ -754,8 +754,11 @@ snd_info_create_entry(const char *name, struct snd_info_entry *parent)
|
|||
INIT_LIST_HEAD(&entry->children);
|
||||
INIT_LIST_HEAD(&entry->list);
|
||||
entry->parent = parent;
|
||||
if (parent)
|
||||
if (parent) {
|
||||
mutex_lock(&parent->access);
|
||||
list_add_tail(&entry->list, &parent->children);
|
||||
mutex_unlock(&parent->access);
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue