]> Git Repo - J-linux.git/commitdiff
ALSA: rawmidi - fix the uninitalized user_pversion
authorJaroslav Kysela <[email protected]>
Sat, 18 Dec 2021 12:39:25 +0000 (13:39 +0100)
committerTakashi Iwai <[email protected]>
Wed, 22 Dec 2021 19:18:27 +0000 (20:18 +0100)
The user_pversion was uninitialized for the user space file structure
in the open function, because the file private structure use
kmalloc for the allocation.

The kernel ALSA sequencer code clears the file structure, so no additional
fixes are required.

Cc: [email protected]
Cc: [email protected]
BugLink: https://github.com/alsa-project/alsa-lib/issues/178
Fixes: 09d23174402d ("ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION")
Reported-by: [email protected]
Signed-off-by: Jaroslav Kysela <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
sound/core/rawmidi.c

index 6f30231bdb88454c0d6c279f557965c1083608c4..befa9809ff001ec514a0512d560ce079041d86cc 100644 (file)
@@ -447,6 +447,7 @@ static int snd_rawmidi_open(struct inode *inode, struct file *file)
                err = -ENOMEM;
                goto __error;
        }
+       rawmidi_file->user_pversion = 0;
        init_waitqueue_entry(&wait, current);
        add_wait_queue(&rmidi->open_wait, &wait);
        while (1) {
This page took 0.048847 seconds and 4 git commands to generate.