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

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



> 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.

As you said, the issue is easily reproduced after adding extra delay.
And the problem is solved completely with your patch.
Thanks for your help!


Thanks.
Shinhyung Kang.




[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