[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linaro-mm-sig
Subject:    [Linaro-mm-sig] [PATCH 2/3] udmabuf: check that __pad is zero
From:       Gerd Hoffmann <kraxel () redhat ! com>
Date:       2019-08-22 9:36:53
Message-ID: 20190822093654.23752-3-kraxel () redhat ! com
[Download RAW message or body]

Reported-by: Yann Droneaud <ydroneaud@opteya.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/dma-buf/udmabuf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 9635897458a0..6c3ec8fcef01 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -137,6 +137,8 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
 
 	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))
-- 
2.18.1

_______________________________________________
Linaro-mm-sig mailing list
Linaro-mm-sig@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-mm-sig

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic