mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: linaro-mm-sig@lists.linaro.org,
	LKML <linux-kernel@vger.kernel.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	linux-media@vger.kernel.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 4/4] dma-buf: document fd flags and O_CLOEXEC requirement
Date: Mon, 19 Mar 2012 00:34:28 +0100	[thread overview]
Message-ID: <1332113668-4364-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1332113668-4364-1-git-send-email-daniel.vetter@ffwll.ch>

Otherwise subsystems will get this wrong and end up with and second
export ioctl with the flag and O_CLOEXEC support added.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 Documentation/dma-buf-sharing.txt |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 9f3aeef..087e261 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -319,6 +319,11 @@ Miscellaneous notes
 - Any exporters or users of the dma-buf buffer sharing framework must have
   a 'select DMA_SHARED_BUFFER' in their respective Kconfigs.
 
+- To avoid the wrath of userspace library writers exporting subsystems must have
+  a flag parameter in the ioctl that creates the dma-buf fd which needs to
+  support at least the O_CLOEXEC fd flag. This needs to be passed in the flag
+  parameter of dma_buf_export.
+
 References:
 [1] struct dma_buf_ops in include/linux/dma-buf.h
 [2] All interfaces mentioned above defined in include/linux/dma-buf.h
-- 
1.7.7.5


  parent reply	other threads:[~2012-03-18 23:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-18 23:34 [PATCH 1/4] dma-buf: don't hold the mutex around map/unmap calls Daniel Vetter
2012-03-18 23:34 ` [PATCH 2/4] dma-buf: add support for kernel cpu access Daniel Vetter
2012-03-19  2:00   ` Rob Clark
2012-03-19 23:02     ` [PATCH] " Daniel Vetter
2012-03-22  6:03       ` [Linaro-mm-sig] " Sumit Semwal
2012-03-18 23:34 ` [PATCH 3/4] dma_buf: Add documentation for the new cpu access support Daniel Vetter
2012-03-19  1:54   ` Rob Clark
2012-03-22  6:04     ` [Linaro-mm-sig] " Sumit Semwal
2012-03-18 23:34 ` Daniel Vetter [this message]
2012-03-19 10:51   ` [Linaro-mm-sig] [PATCH 4/4] dma-buf: document fd flags and O_CLOEXEC requirement Dave Airlie
2012-03-19 15:41     ` [PATCH] " Daniel Vetter
2012-03-19 15:44       ` Ville Syrjälä
2012-03-22  6:03 ` [Linaro-mm-sig] [PATCH 1/4] dma-buf: don't hold the mutex around map/unmap calls Sumit Semwal

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=1332113668-4364-4-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.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

all inboxes | Powered by JetHome®