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]
Date:   Thu, 7 Dec 2017 18:10:23 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Sinan Kaya <okaya@...eaurora.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Timur Tabi <timur@...eaurora.org>,
        linux-arm-msm@...r.kernel.org,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI / GED: unregister interrupts during shutdown

On Thu, Dec 7, 2017 at 3:52 PM, Sinan Kaya <okaya@...eaurora.org> wrote:
> Rafael,
>
> On 12/7/2017 8:00 AM, Rafael J. Wysocki wrote:
>>> Just don't use devm_request_threaded_irq()?  :)
>>>
>>> Seriously, those are just "helper" functions if your code happens to
>>> follow the pattern they provide, if not, then don't use them, it's not
>>> that hard to provide the correct code to unwind things properly by "open
>>> coding" this logic as needed.
>>>
>>> The devm_*irq() functions are known for not being able to be used all of
>>> the time for lots of shutdown and cleanup issues, this isn't the first
>>> time it has happened, which is why we are very careful when taking
>>> "cleanup" patches that use those functions.
>> I see, thanks for the clarification.
>>
>> OK, we'll need to rework the driver somewhat, then.
>
> Even if we got rid of devm_*irq() functions, I see that the free_irq() function
> requires dev_id argument.
>
>          * There can be multiple actions per IRQ descriptor, find the right
>          * one based on the dev_id:
>
> I still need to keep track of the dev_ids attached to request_irq() functions.

Right.

> My take away from the discussion is:
> 1. don't use devm family of functions for IRQ registration/free
> 2. still keep track of the events
> 3. call free_irq on shutdown.

Yes.  And on remove too.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ