diff options
author | Dave Airlie <airlied@redhat.com> | 2022-02-14 01:52:27 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-02-14 01:52:27 +0100 |
commit | b9c7babe2c2e37a50aa42401b38d597ea78f506e (patch) | |
tree | dd6ec30f2583f8860e69a74e4779ac20e3f53bff /drivers/dma-buf | |
parent | Merge tag 'amd-drm-next-5.18-2022-02-11-1' of https://gitlab.freedesktop.org/... (diff) | |
parent | Linux 5.17-rc4 (diff) | |
download | linux-b9c7babe2c2e37a50aa42401b38d597ea78f506e.tar.xz linux-b9c7babe2c2e37a50aa42401b38d597ea78f506e.zip |
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]; |