Skip to content

Commit aea3493

Browse files
takaswietiwai
authored andcommitted
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
The ALSA HwDep character device of the firewire-motu driver incorrectly returns EPOLLOUT in poll(2), even though the driver implements no operation for write(2). This misleads userspace applications to believe write() is allowed, potentially resulting in unnecessarily wakeups. This issue dates back to the driver's initial code added by a commit 71c3797 ("ALSA: firewire-motu: add hwdep interface"), and persisted when POLLOUT was updated to EPOLLOUT by a commit a9a0884 ('vfs: do bulk POLL* -> EPOLL* replacement("").'). This commit fixes the bug. Signed-off-by: Takashi Sakamoto <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 78811dd commit aea3493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/firewire/motu/motu-hwdep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file,
111111
events = 0;
112112
spin_unlock_irq(&motu->lock);
113113

114-
return events | EPOLLOUT;
114+
return events;
115115
}
116116

117117
static int hwdep_get_info(struct snd_motu *motu, void __user *arg)

0 commit comments

Comments
 (0)