• Lars-Peter Clausen's avatar
    ASoC: Fix component lists locking · 34e81ab4
    Lars-Peter Clausen authored
    Any access to the component_list, codec_list and platform_list needs to be
    properly locked by the client_mutex. Otherwise undefined behavior can occur
    if the list is modified in one thread and concurrently accessed from another
    thread.
    
    This patch adds the missing locking to the debugfs file handlers that
    display the registered components, as well as the various components
    unregister functions.
    
    Furthermore the client_lock is now held for the whole
    snd_soc_instantiate_card() sequence to make sure that component removal does
    not race against the card registration.
    Reported-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    34e81ab4
soc-core.c 91.6 KB