• Wang YanQing's avatar
    ALSA: HDA: Fix Oops caused by dereference NULL pointer · 2195b063
    Wang YanQing authored
    The interrupt handler azx_interrupt will call azx_update_rirb,
    which may call snd_hda_queue_unsol_event, snd_hda_queue_unsol_event
    will dereference chip->bus pointer.
    
    The problem is we alloc chip->bus in azx_codec_create
    which will be called after we enable IRQ and enable unsolicited
    event in azx_probe.
    
    This will cause Oops due dereference NULL pointer. I meet it, good luck:)
    
    [Rearranged the NULL check before the tracepoint and added another
     NULL check of bus->workq -- tiwai]
    Signed-off-by: default avatarWang YanQing <udknight@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    2195b063
hda_codec.c 148 KB