[prev in list] [next in list] [prev in thread] [next in thread]
List: linaro-mm-sig
Subject: [Linaro-mm-sig] [PATCH 3/3] udmabuf: check that flags has no unsupported bits set
From: Gerd Hoffmann <kraxel () redhat ! com>
Date: 2019-08-22 9:36:54
Message-ID: 20190822093654.23752-4-kraxel () redhat ! com
[Download RAW message or body]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Yann Droneaud <ydroneaud@opteya.com>
---
drivers/dma-buf/udmabuf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c
index 6c3ec8fcef01..ca1364102b18 100644
--- a/drivers/dma-buf/udmabuf.c
+++ b/drivers/dma-buf/udmabuf.c
@@ -131,6 +131,9 @@ static long udmabuf_create(const struct udmabuf_create_list *head,
int seals, ret = -EINVAL;
u32 i, flags;
+ if (head->flags & ~UDMABUF_FLAGS_CLOEXEC)
+ return -EINVAL;
+
ubuf = kzalloc(sizeof(*ubuf), GFP_KERNEL);
if (!ubuf)
return -ENOMEM;
--
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