mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
ALSA: pcm: Notify disconnected state at mmap data fault, too
When a device gets disconnected, the driver waits until the all opened file descriptors are closed before releasing the device. Although PCM core emits an error to any further syscalls (except for close), some applications don't notice the disconnected state because they mainly access only via mmap, and it may block the device release unnecessarily too long. This patch is an attempt to improve the behavior by adding the notification of the PCM disconnected state at mmap data faulting. When the device is disconnected, it now returns VM_FAULT_SIGBUS, so that the application can notice the invalid PCM state. Reported-and-tested-by: Ai Chao <aichao@kylinos.cn> Link: https://lore.kernel.org/20260615132657.2097213-1-aichao@kylinos.cn> Link: https://patch.msgid.link/20260619150035.1560937-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
3213bf9885
commit
f199040982
1 changed files with 2 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue