Skip to contentSkip to conversation

ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported

PATCH Applied Takashi Sakamoto 2 participants 2 messages Aug 29, 2025 – Aug 30, 2025

Subsystems (2)
lore
Share & tools
lore

Takashi Sakamoto

author maintainer
#0 lore raw

PATCH 1/1 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 71c3797779d3 ("ALSA: firewire-motu: add hwdep interface"), and persisted when POLLOUT was updated to EPOLLOUT by a commit a9a08845e9ac ('vfs: do bulk POLL* -> EPOLL* replacement("").').

This commit fixes the bug.

---
 sound/firewire/motu/motu-hwdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/firewire/motu/motu-hwdep.c +1 -1
index 1ed60618220d..fa2685665db3 100644
@@ -111,7 +111,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file,
 		events = 0;
 	spin_unlock_irq(&motu->lock);
 
-	return events | EPOLLOUT;
+	return events;
 }
 
 static int hwdep_get_info(struct snd_motu *motu, void __user *arg)
Signature · 1 line
2.48.1
Applied
#1 lore raw
Quoted 6 lines · Takashi Sakamoto

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.

Quoted 8 lines

This issue dates back to the driver's initial code added by a commit 71c3797779d3 ("ALSA: firewire-motu: add hwdep interface"), and persisted when POLLOUT was updated to EPOLLOUT by a commit a9a08845e9ac ('vfs: do bulk POLL* -> EPOLL* replacement("").').

This commit fixes the bug.

Thanks, applied now.

Takashi