Re: [PATCH] ALSA: info: Fix potential deadlock at disconnection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 09. 11. 23 15:19, Takashi Iwai wrote:
As reported recently, ALSA core info helper may cause a deadlock at
the forced device disconnection during the procfs operation.

The proc_remove() (that is called from the snd_card_disconnect()
helper) has a synchronization of the pending procfs accesses via
wait_for_completion().  Meanwhile, ALSA procfs helper takes the global
mutex_lock(&info_mutex) at both the proc_open callback and
snd_card_info_disconnect() helper.  Since the proc_open can't finish
due to the mutex lock, wait_for_completion() never returns, either,
hence it deadlocks.

Really nice fix. Thanks Takashi.

Reviewed-by: Jaroslav Kysela <perex@xxxxxxxx>

(maybe Cc: to stable?)

					Jaroslav

--
Jaroslav Kysela <perex@xxxxxxxx>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux