ALSA: Add a reference counter to card instance
authorTakashi Iwai <tiwai@suse.de>
Tue, 16 Oct 2012 11:05:59 +0000 (13:05 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 Oct 2012 10:07:10 +0000 (11:07 +0100)
For more strict protection for wild disconnections, a refcount is
introduced to the card instance, and let it up/down when an object is
referred via snd_lookup_*() in the open ops.

The free-after-last-close check is also changed to check this refcount
instead of the empty list, too.

Reported-by: Matthieu CASTET <matthieu.castet@parrot.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

No differences found