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] [thread-next>] [day] [month] [year] [list]
Message-ID: <54AFF9D3.7000007@metafoo.de>
Date:	Fri, 09 Jan 2015 16:54:59 +0100
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>
CC:	Jonathan Cameron <jic23@...nel.org>,
	Hartmut Knaack <knaack.h@....de>,
	Peter Meerwald <pmeerw@...erw.net>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: Simplify IIO provider access locking mechanism

On 01/09/2015 04:50 PM, Ivan T. Ivanov wrote:
>
> On Fri, 2015-01-09 at 16:41 +0100, Lars-Peter Clausen wrote:
>> On 01/09/2015 04:38 PM, Ivan T. Ivanov wrote:
>>> Instead of checking whether provider module is still
>>> loaded on every access to device just lock module to
>>> memory when client get reference to provider device.
>>>
>>
>> This has nothing to do with the module, it's about the device. In the Linux
>> device driver model as device can be unbound at any time and the IIO
>> framework needs to handle this.
>>
>
> Hm. Probably i am missing something here, but is this
> still true if we have reference to device structure?

Yes, that only prevents the memory of device from being freed. But the 
device can still be unbound from the driver.

Think of e.g. a USB device that is pulled from the USB connector. Nothing 
you can do in software about having the device disappear.

- Lars

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