diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 05:05:54 -0700 |
| commit | 720d690e3680d8ae5fcf86f8614c1a10b4ee7605 (patch) | |
| tree | 02158973d51022d7374f5b6e2f1953b530127f43 /sound/pci/asihpi/hpioctl.c | |
| parent | 72b6500c1cc68b949faa1bac76359dc601b482d6 (diff) | |
| parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
| download | blackbird-obmc-linux-720d690e3680d8ae5fcf86f8614c1a10b4ee7605.tar.gz blackbird-obmc-linux-720d690e3680d8ae5fcf86f8614c1a10b4ee7605.zip | |
Merge 4.17-rc3 into char-misc-next
We want the fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/pci/asihpi/hpioctl.c')
| -rw-r--r-- | sound/pci/asihpi/hpioctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c index 5badd08e1d69..b1a2a7ea4172 100644 --- a/sound/pci/asihpi/hpioctl.c +++ b/sound/pci/asihpi/hpioctl.c @@ -33,6 +33,7 @@ #include <linux/stringify.h> #include <linux/module.h> #include <linux/vmalloc.h> +#include <linux/nospec.h> #ifdef MODULE_FIRMWARE MODULE_FIRMWARE("asihpi/dsp5000.bin"); @@ -186,7 +187,8 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg) struct hpi_adapter *pa = NULL; if (hm->h.adapter_index < ARRAY_SIZE(adapters)) - pa = &adapters[hm->h.adapter_index]; + pa = &adapters[array_index_nospec(hm->h.adapter_index, + ARRAY_SIZE(adapters))]; if (!pa || !pa->adapter || !pa->adapter->type) { hpi_init_response(&hr->r0, hm->h.object, |

