ALSA: hda - Flush the pending probe work at remove
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Jan 2016 16:19:02 +0000 (17:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2016 19:28:57 +0000 (11:28 -0800)
commitf5b62074b31a2844579831499defca2cf2264df2
tree3b8a3b4859e8074add329c40bde241583a1f36d8
parent5833733480affc449af06426c22dba0c05a44ec2
ALSA: hda - Flush the pending probe work at remove

commit 991f86d7ae4e1f8c15806e62f97af519e3cdd860 upstream.

As HD-audio driver does deferred probe internally via workqueue, the
driver might go into the mixed state doing both probe and remove when
the module gets unloaded during the probe work.  This eventually
triggers an Oops, unsurprisingly.

For avoiding this race, we just need to flush the pending probe work
explicitly before actually starting the resource release.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=960710
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_intel.c