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: <51E41B1B.7000100@metafoo.de>
Date:	Mon, 15 Jul 2013 17:54:03 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Oleksandr Kravchenko <o.v.kravchenko@...ballogic.com>
CC:	Oleksandr Kravchenko <x0199363@...com>, linux-iio@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <rob.herring@...xeda.com>,
	Rob Landley <rob@...dley.net>, jic23@....ac.uk,
	Peter Meerwald <pmeerw@...erw.net>, holler@...oftware.de,
	srinivas.pandruvada@...el.com, devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH] iio: add APDS9300 ambilent light sensor driver

On 07/15/2013 04:54 PM, Oleksandr Kravchenko wrote:
> I can't to find devm_iio_device_alloc() in my kernel v3.11-rc1
> 

It doesn't exist yet, but it should be too hard to implement one.

- Lars

> On Mon, Jul 15, 2013 at 3:35 PM, Lars-Peter Clausen <lars@...afoo.de> wrote:
>> On 07/15/2013 02:27 PM, Oleksandr Kravchenko wrote:
>>> Thank you for review! But I don't completely understand one of your comment:
>>>
>>>>> +static int als_probe(struct i2c_client *client, const struct i2c_device_id *id)
>>> [...]
>>>>> +     if (client->irq) {
>>>>> +             ret = devm_request_threaded_irq(&client->dev, client->irq,
>>>>> +                             NULL, als_interrupt_handler,
>>>>> +                             IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
>>>>> +                             ALS_IRQ_NAME, indio_dev);
>>>>
>>>> This is a bit racy, you access memory in the irq handler that is freed
>>>> before the irq is freed.
>>>
>>> Do you mean than that indio_dev may be used in interrupt handler after
>>> iio_device_free(indio_dev) called in als_remove() function?
>>>
>>> If so, can I use disable_irq() in als_remove() before iio_device_free()
>>> to avoid this problem?
>>>
>>
>> Just add a devm_iio_device_alloc() and use that, instead of trying to bodch
>> around the issue.
>>
> 
> 
> 

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