From: Gerd Hoffmann <kraxel@redhat.com>
To: dri-devel@lists.freedesktop.org
Cc: laurent.pinchart@ideasonboard.com, daniel@ffwll.ch,
Gerd Hoffmann <kraxel@redhat.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
linux-media@vger.kernel.org (open list:DMA BUFFER SHARING
FRAMEWORK),
linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER
SHARING FRAMEWORK), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 3/3] udmabuf: check that flags has no unsupported bits set
Date: Thu, 22 Aug 2019 11:36:54 +0200 [thread overview]
Message-ID: <20190822093654.23752-4-kraxel@redhat.com> (raw)
In-Reply-To: <20190822093654.23752-1-kraxel@redhat.com>
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
prev parent reply other threads:[~2019-08-22 9:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190822093654.23752-1-kraxel@redhat.com>
2019-08-22 9:36 ` [PATCH 1/3] udmabuf: add documentation Gerd Hoffmann
2019-08-22 9:36 ` [PATCH 2/3] udmabuf: check that __pad is zero Gerd Hoffmann
2019-08-22 9:36 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190822093654.23752-4-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).