linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
@ 2025-08-29 23:37 Takashi Sakamoto
  2025-08-30  7:33 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Takashi Sakamoto @ 2025-08-29 23:37 UTC (permalink / raw)
  To: tiwai; +Cc: linux-sound

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.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
---
 sound/firewire/motu/motu-hwdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/firewire/motu/motu-hwdep.c b/sound/firewire/motu/motu-hwdep.c
index 1ed60618220d..fa2685665db3 100644
--- a/sound/firewire/motu/motu-hwdep.c
+++ b/sound/firewire/motu/motu-hwdep.c
@@ -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)
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
  2025-08-29 23:37 [PATCH] ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported Takashi Sakamoto
@ 2025-08-30  7:33 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2025-08-30  7:33 UTC (permalink / raw)
  To: Takashi Sakamoto; +Cc: tiwai, linux-sound

On Sat, 30 Aug 2025 01:37:49 +0200,
Takashi Sakamoto wrote:
> 
> 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.
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

Thanks, applied now.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-30  7:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 23:37 [PATCH] ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported Takashi Sakamoto
2025-08-30  7:33 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).