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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <5023CF31.4010209@samsung.com>
Date:	Thu, 09 Aug 2012 16:54:41 +0200
From:	Tomasz Stanislawski <t.stanislaws@...sung.com>
To:	Greg KH <gregkh@...uxfoundation.org>
Cc:	linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
	airlied@...hat.com, m.szyprowski@...sung.com,
	kyungmin.park@...sung.com, laurent.pinchart@...asonboard.com,
	sumit.semwal@...aro.org, inki.dae@...sung.com,
	daniel.vetter@...ll.ch, rob@...com, pawel@...iak.com,
	linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org,
	jy0922.shim@...sung.com, sw0312.kim@...sung.com,
	dan.j.williams@...el.com, linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dma-buf: add reference counting for exporter module

Hi Greg,

On 08/09/2012 04:23 PM, Greg KH wrote:
> On Thu, Aug 09, 2012 at 11:36:21AM +0200, Tomasz Stanislawski wrote:
>> This patch adds reference counting on a module that exported dma-buf and
>> implements its operations. This prevents the module from being unloaded while
>> DMABUF file is in use.
> 
> Why force all of the modules to be changed "by hand", and not just do
> this automatically by changing the register function to include the
> THIS_MODULE macro in it?  Much like the pci_register_driver() function
> is implemented in include/linux/pci.h?

Thank you for the hint.

The owner field belongs to dma_buf_ops structure that is often a 'const'
entity. Therefore owner field would have to be moved to 'struct dma_buf'
to avoid 'deconstification' issues.

Regards,
Tomasz Stanislawski

> 
> That makes it impossible for driver authors to get it wrong, which is
> always a good sign of a correct api.
> 
> thanks,
> 
> greg k-h
> 

--
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