]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: 6fire: Cover the whole probe and disconnect calls with register_mutex
authorTakashi Iwai <tiwai@suse.de>
Tue, 14 Apr 2026 13:22:11 +0000 (15:22 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 15 Apr 2026 12:27:26 +0000 (14:27 +0200)
commitf3c80e76a0e94c7c9771997de90f6a284b4f10d9
tree4fe21b9c4fb1d74537eff568afcea218a0581602
parent28abd224db4a49560b452115bca3672a20e45b2f
ALSA: 6fire: Cover the whole probe and disconnect calls with register_mutex

In 6fire driver, we protect the concurrent calls against probe and
disconnect with the register_mutex, but it's applied only partially.
Since we handle two global pointers in devices[] and chips[] pairs,
the assignment of the latter can be inconsistent upon concurrent
interface probes, and the refcount handling isn't properly protected
at disconnect, either.

This patch extends the mutex application range to the whole probe and
disconnect functions.  It makes the code safer against potential
concurrent probles and disconnects, while it makes the code easier to
read, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-2-tiwai@suse.de
sound/usb/6fire/chip.c