diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-12 06:46:48 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2023-01-06 06:30:53 +0100 |
commit | 4e0898f30f13c1d492b86a5404b73d8b6baa40af (patch) | |
tree | d213e3cd026cc0194947cc834c4de8c6c36727df | |
parent | 4c00ac500d0edd1a6730c4e8293834a694c1b304 (diff) | |
download | linux-4e0898f30f13c1d492b86a5404b73d8b6baa40af.tar.gz |
udmabuf: check that __pad is zero
Reported-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | drivers/dma-buf/udmabuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 740d6e426ee9..c35c7cd5516f 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -219,6 +219,8 @@ static long udmabuf_create(struct miscdevice *device, pglimit = (size_limit_mb * 1024 * 1024) >> PAGE_SHIFT; for (i = 0; i < head->count; i++) { + if (list[i].__pad) + goto err; if (!IS_ALIGNED(list[i].offset, PAGE_SIZE)) goto err; if (!IS_ALIGNED(list[i].size, PAGE_SIZE)) |