Skip to content

Commit 3a72494

Browse files
committed
ALSA: timer: Fix broken compat timer user status ioctl
The timer user status compat ioctl returned the bogus struct used for 64bit architectures instead of the 32bit one. This patch addresses it to return the proper struct. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 2251fbb commit 3a72494

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎sound/core/timer_compat.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ static int snd_timer_user_status_compat(struct file *file,
7070
struct snd_timer_status32 __user *_status)
7171
{
7272
struct snd_timer_user *tu;
73-
struct snd_timer_status status;
73+
struct snd_timer_status32 status;
7474

7575
tu = file->private_data;
7676
if (snd_BUG_ON(!tu->timeri))
7777
return -ENXIO;
7878
memset(&status, 0, sizeof(status));
79-
status.tstamp = tu->tstamp;
79+
status.tstamp.tv_sec = tu->tstamp.tv_sec;
80+
status.tstamp.tv_nsec = tu->tstamp.tv_nsec;
8081
status.resolution = snd_timer_resolution(tu->timeri);
8182
status.lost = tu->timeri->lost;
8283
status.overrun = tu->overrun;

0 commit comments

Comments
 (0)