diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2022-02-10 17:29:56 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-10 17:29:56 -0800 |
| commit | 5b91c5cc0e7be4e41567cb2a6e21a8bb682c7cc5 (patch) | |
| tree | ed284edec0db783dfa80366ae8df078b02f35be9 /drivers/dma-buf/dma-heap.c | |
| parent | 4f5e483b8c7a644733db941a1ae00173baa7b463 (diff) | |
| parent | f1baf68e1383f6ed93eb9cff2866d46562607a43 (diff) | |
| download | linux-5b91c5cc0e7be4e41567cb2a6e21a8bb682c7cc5.tar.gz linux-5b91c5cc0e7be4e41567cb2a6e21a8bb682c7cc5.tar.bz2 linux-5b91c5cc0e7be4e41567cb2a6e21a8bb682c7cc5.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/dma-buf/dma-heap.c')
| -rw-r--r-- | drivers/dma-buf/dma-heap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c index 56bf5ad01ad5..8f5848aa144f 100644 --- a/drivers/dma-buf/dma-heap.c +++ b/drivers/dma-buf/dma-heap.c @@ -14,6 +14,7 @@ #include <linux/xarray.h> #include <linux/list.h> #include <linux/slab.h> +#include <linux/nospec.h> #include <linux/uaccess.h> #include <linux/syscalls.h> #include <linux/dma-heap.h> @@ -135,6 +136,7 @@ static long dma_heap_ioctl(struct file *file, unsigned int ucmd, if (nr >= ARRAY_SIZE(dma_heap_ioctl_cmds)) return -EINVAL; + nr = array_index_nospec(nr, ARRAY_SIZE(dma_heap_ioctl_cmds)); /* Get the kernel ioctl cmd that matches */ kcmd = dma_heap_ioctl_cmds[nr]; |
