Re: [PATCH] ALSA: timer: Handle userspace-driven timer ioctls from 32-bit tasks
From: Takashi Iwai
Date: Tue Sep 29 2026 - 01:34:49 EST
On Mon, 28 Sep 2026 20:23:52 +0200,
Danish Khateeb wrote:
>
> 32-bit tasks on a 64-bit kernel can't use userspace-driven timers. The
> compat handler for /dev/snd/timer doesn't list SNDRV_TIMER_IOCTL_CREATE,
> so creating a timer fails with -ENOTTY. The file returned for a timer
> has no .compat_ioctl either, so SNDRV_TIMER_IOCTL_TRIGGER fails with
> -ENOTTY too.
>
> struct snd_timer_uinfo has the same layout for 32-bit and 64-bit tasks,
> and SNDRV_TIMER_IOCTL_TRIGGER takes no argument, so both commands can
> be passed through unchanged.
>
> The utimer selftest doesn't catch this when built with -m32: it takes
> -ENOTTY from SNDRV_TIMER_IOCTL_CREATE to mean CONFIG_SND_UTIMER=n and
> skips.
>
> Fixes: 37745918e0e7 ("ALSA: timer: Introduce virtual userspace-driven timers")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Danish Khateeb <danishkhateeb03@xxxxxxxxx>
Applied to for-next branch now. Thanks.
Takashi