lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAO_48GF+5tV_24R1NeqRDLh1S3+LQUFDN9B4cAg1HJrP5ZGcRA@mail.gmail.com>
Date:	Thu, 9 Aug 2012 11:02:08 +0530
From:	Sumit Semwal <sumit.semwal@...aro.org>
To:	Tomasz Stanislawski <t.stanislaws@...sung.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	devel@...verdev.osuosl.org, Pawel Osciak <pawel@...iak.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jerome Glisse <jglisse@...hat.com>,
	Vinod Koul <vinod.koul@...el.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Rob Landley <rob@...dley.net>,
	Alex Deucher <alexander.deucher@....com>,
	Rob Clark <rob@...com>,
	Dan Williams <dan.j.williams@...el.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Sumit Semwal <sumit.semwal@...aro.org>,
	linux-media@...r.kernel.org
Cc:	Daniel Vetter <daniel.vetter@...ll.ch>
Subject: Re: [PATCH] dma-buf: add reference counting for exporter module

Hi Tomasz,

On 8 August 2012 19:36, Daniel Vetter <daniel@...ll.ch> wrote:
> 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.
Thanks for the patch; may I ask you to split it into 2 patches (1
dma-buf and 1 drm) and submit? That ways, either Dave or I can take
the patches for either pull request.
With that, please feel free to add my Acked-by as well.
>> >
>> > 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@...sung.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@...ll.ch
> Mobile: +41 (0)79 365 57 48



-- 
Thanks and regards,
Sumit Semwal.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ