The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/6] Return -ENODEV instead of -EFAULT on module-get failure
@ 2026-07-06  8:49 phucduc.bui
  2026-07-06  8:49 ` [PATCH 1/6] ALSA: control: Return -ENODEV instead of -EFAULT in snd_ctl_open() phucduc.bui
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: phucduc.bui @ 2026-07-06  8:49 UTC (permalink / raw)
  To: Cezary Rojewski, Jaroslav Kysela, Takashi Iwai,
	cassiogabrielcontato
  Cc: Kees Cook, Dan Carpenter, Cen Zhang, Len Bao, Mehul Rao,
	Sebastian Andrzej Siewior, linux-sound, linux-kernel,
	bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Hi all,

Several ALSA open/allocate paths call try_module_get() on the owning card
module and return -EFAULT when it fails. However, try_module_get() fails 
when the module is no longer live (i.e. it is going away), meaning the 
device is no longer usable.
This series updates only those paths, making the error code consistent
with the existing "device unavailable" checks in the same functions.
Other -EFAULT returns are left unchanged.
No functional change is intended.

Best regards, 
Phuc

bui duc phuc (6):
  ALSA: control: Return -ENODEV instead of -EFAULT in snd_ctl_open()
  ALSA: hwdep: Return -ENODEV instead of -EFAULT in snd_hwdep_open()
  ALSA: info: Return -ENODEV instead of -EFAULT in alloc_info_private()
  ALSA: mixer: oss: Return -ENODEV instead of -EFAULT in
    snd_mixer_oss_open()
  ALSA: pcm: oss: Return -ENODEV instead of -EFAULT in
    snd_pcm_oss_open()
  ALSA: pcm: Return -ENODEV instead of -EFAULT in snd_pcm_open()

 sound/core/control.c       | 3 +--
 sound/core/hwdep.c         | 2 +-
 sound/core/info.c          | 2 +-
 sound/core/oss/mixer_oss.c | 2 +-
 sound/core/oss/pcm_oss.c   | 2 +-
 sound/core/pcm_native.c    | 2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-07-06 13:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06  8:49 [PATCH 0/6] Return -ENODEV instead of -EFAULT on module-get failure phucduc.bui
2026-07-06  8:49 ` [PATCH 1/6] ALSA: control: Return -ENODEV instead of -EFAULT in snd_ctl_open() phucduc.bui
2026-07-06  9:35   ` Cezary Rojewski
2026-07-06  9:40     ` Bui Duc Phuc
2026-07-06  8:49 ` [PATCH 2/6] ALSA: hwdep: Return -ENODEV instead of -EFAULT in snd_hwdep_open() phucduc.bui
2026-07-06  8:49 ` [PATCH 3/6] ALSA: info: Return -ENODEV instead of -EFAULT in alloc_info_private() phucduc.bui
2026-07-06  8:49 ` [PATCH 4/6] ALSA: mixer: oss: Return -ENODEV instead of -EFAULT in snd_mixer_oss_open() phucduc.bui
2026-07-06  8:49 ` [PATCH 5/6] ALSA: pcm: oss: Return -ENODEV instead of -EFAULT in snd_pcm_oss_open() phucduc.bui
2026-07-06  8:49 ` [PATCH 6/6] ALSA: pcm: Return -ENODEV instead of -EFAULT in snd_pcm_open() phucduc.bui
2026-07-06  9:42 ` [PATCH 0/6] Return -ENODEV instead of -EFAULT on module-get failure Cezary Rojewski
2026-07-06 12:31   ` Bui Duc Phuc
2026-07-06 13:13     ` Cezary Rojewski
2026-07-06 13:26       ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox