• Takashi Iwai's avatar
    ALSA: hda - Serialize codec registrations · 18c071d4
    Takashi Iwai authored
    commit 305a0ade upstream.
    
    In the current code, the codec registration may happen both at the
    codec bind time and the end of the controller probe time.  In a rare
    occasion, they race with each other, leading to Oops due to the still
    uninitialized card device.
    
    This patch introduces a simple flag to prevent the codec registration
    at the codec bind time as long as the controller probe is going on.
    The controller probe invokes snd_card_register() that does the whole
    registration task, and we don't need to register each piece
    beforehand.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    18c071d4
hda_bind.c 7.08 KB