|
@@ -25,6 +25,7 @@
|
|
|
#include <linux/time.h>
|
|
#include <linux/time.h>
|
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
|
#include <linux/device.h>
|
|
#include <linux/device.h>
|
|
|
|
|
+#include <linux/nospec.h>
|
|
|
#include <sound/core.h>
|
|
#include <sound/core.h>
|
|
|
#include <sound/minors.h>
|
|
#include <sound/minors.h>
|
|
|
#include <sound/pcm.h>
|
|
#include <sound/pcm.h>
|
|
@@ -129,6 +130,7 @@ static int snd_pcm_control_ioctl(struct snd_card *card,
|
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
if (stream < 0 || stream > 1)
|
|
if (stream < 0 || stream > 1)
|
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
+ stream = array_index_nospec(stream, 2);
|
|
|
if (get_user(subdevice, &info->subdevice))
|
|
if (get_user(subdevice, &info->subdevice))
|
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
mutex_lock(®ister_mutex);
|
|
mutex_lock(®ister_mutex);
|