diff options
author | Mark Brown <broonie@kernel.org> | 2021-10-18 13:51:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-10-18 13:51:43 +0100 |
commit | ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480 (patch) | |
tree | 15fe5f3dc395c3b1e713ad52bcd529b1a343cfe2 /sound/core/rawmidi.c | |
parent | 72bf80cf09c4693780ad93a31b48fa5a4e17a946 (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | linux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.tar.gz linux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.tar.bz2 linux-stable-ed96f35cecb0a7d1d95bbba8b9f212e60d0f7480.zip |
Merge tag 'v5.15-rc6' into regulator-5.16
Linux 5.15-rc6
Diffstat (limited to 'sound/core/rawmidi.c')
-rw-r--r-- | sound/core/rawmidi.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 6c0a4a67ad2e..6f30231bdb88 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -873,12 +873,21 @@ static long snd_rawmidi_ioctl(struct file *file, unsigned int cmd, unsigned long return -EINVAL; } } + case SNDRV_RAWMIDI_IOCTL_USER_PVERSION: + if (get_user(rfile->user_pversion, (unsigned int __user *)arg)) + return -EFAULT; + return 0; + case SNDRV_RAWMIDI_IOCTL_PARAMS: { struct snd_rawmidi_params params; if (copy_from_user(¶ms, argp, sizeof(struct snd_rawmidi_params))) return -EFAULT; + if (rfile->user_pversion < SNDRV_PROTOCOL_VERSION(2, 0, 2)) { + params.mode = 0; + memset(params.reserved, 0, sizeof(params.reserved)); + } switch (params.stream) { case SNDRV_RAWMIDI_STREAM_OUTPUT: if (rfile->output == NULL) |