From: Daniel Vetter <daniel@ffwll.ch>
To: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
devel@driverdev.osuosl.org, Pawel Osciak <pawel@osciak.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jerome Glisse <jglisse@redhat.com>,
Vinod Koul <vinod.koul@intel.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Rob Landley <rob@landley.net>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Alex Deucher <alexander.deucher@amd.com>, Rob Clark <rob@ti.com>,
Dan Williams <dan.j.williams@intel.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: add reference counting for exporter module
Date: Wed, 8 Aug 2012 16:06:38 +0200 [thread overview]
Message-ID: <20120808140638.GK5490@phenom.ffwll.local> (raw)
In-Reply-To: <50226F46.3080800@samsung.com>
On Wed, Aug 08, 2012 at 03:53:10PM +0200, Tomasz Stanislawski wrote:
> Hi Laurent,
>
> On 08/08/2012 03:35 PM, Laurent Pinchart wrote:
> > Hi Tomasz,
> >
> > Thanks for the patch.
> >
> > On Wednesday 08 August 2012 12:17:41 Tomasz Stanislawski wrote:
> >> This patch adds reference counting on a module that exports dma-buf and
> >> implements its operations. This prevents the module from being unloaded
> >> while DMABUF file is in use.
> >>
> >> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
> >> ---
> >> Documentation/dma-buf-sharing.txt | 3 ++-
> >> drivers/base/dma-buf.c | 10 +++++++++-
> >> drivers/gpu/drm/exynos/exynos_drm_dmabuf.c | 1 +
> >> drivers/gpu/drm/i915/i915_gem_dmabuf.c | 1 +
> >> drivers/gpu/drm/nouveau/nouveau_prime.c | 1 +
> >> drivers/gpu/drm/radeon/radeon_prime.c | 1 +
> >> drivers/staging/omapdrm/omap_gem_dmabuf.c | 1 +
> >> include/linux/dma-buf.h | 2 ++
> >> 8 files changed, 18 insertions(+), 2 deletions(-)
> >>
> [snip]
>
> >> @@ -96,6 +98,7 @@ struct dma_buf *dma_buf_export(void *priv, const struct
> >> dma_buf_ops *ops, struct file *file;
> >>
> >> if (WARN_ON(!priv || !ops
> >> + || !ops->owner
>
> Thank you for spotting this.
> I didn'y know that try_get_module returned true is module was NULL.
>
> BTW. Is it worth to add ".owner = THIS_MODULE," to all dma_buf
> exporters in this patch?
Yeah, I think that makes sense. Otherwise it might get lost somewhere,
i.e. you can smash my Ack on this.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-08-08 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 10:17 [PATCH] dma-buf: add reference counting for exporter module Tomasz Stanislawski
2012-08-08 13:35 ` Laurent Pinchart
2012-08-08 13:53 ` Tomasz Stanislawski
2012-08-08 14:06 ` Daniel Vetter [this message]
2012-08-09 5:32 ` 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=20120808140638.GK5490@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=alexander.deucher@amd.com \
--cc=dan.j.williams@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jglisse@redhat.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=pawel@osciak.com \
--cc=rob@landley.net \
--cc=rob@ti.com \
--cc=sumit.semwal@linaro.org \
--cc=t.stanislaws@samsung.com \
--cc=vinod.koul@intel.com \
/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