diff options
author | Dave Airlie <airlied@redhat.com> | 2022-02-14 03:52:27 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-02-14 03:52:27 +0300 |
commit | b9c7babe2c2e37a50aa42401b38d597ea78f506e (patch) | |
tree | dd6ec30f2583f8860e69a74e4779ac20e3f53bff /drivers/dma-buf | |
parent | 123db17ddff007080d464e785689fb14f94cbc7a (diff) | |
parent | 754e0b0e35608ed5206d6a67a791563c631cec07 (diff) | |
download | linux-b9c7babe2c2e37a50aa42401b38d597ea78f506e.tar.xz |
Backmerge tag 'v5.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Daniel asked for this for some intel deps, so let's do it now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/dma-buf')
-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]; |