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:   Wed, 6 Dec 2017 18:16:04 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Sinan Kaya <okaya@...eaurora.org>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Timur Tabi <timur@...eaurora.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        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 Wed, Dec 6, 2017 at 5:55 PM, Sinan Kaya <okaya@...eaurora.org> wrote:
> On 12/6/2017 11:41 AM, Rafael J. Wysocki wrote:
>> On Wed, Dec 6, 2017 at 5:11 PM, Sinan Kaya <okaya@...eaurora.org> wrote:
>>> On 12/6/2017 9:57 AM, Sinan Kaya wrote:
>>>>> Yes, it should, so I'm not sure why you need the list in the first place.
>>>>>
>>>>> Also it looks like something along the lines of devres_release_all()
>>>>> should be sufficient.
>>>> Good suggestion, let me test this.
>>>>
>>>
>>> I tried to pull the code into GED but the API is not public. I also looked
>>> at how it is used. I was afraid to mess up with the internals of base.c by
>>> calling devres_release_all() externally first and by the driver framework
>>> next. I moved away from this approach.
>>
>> Are you sure it is called by the core in the shutdown path?
>
> Sorry, I was thinking about a general case not the shutdown path. If we open
> this API and have device drivers call it from arbitrary places; then we could
> be opening a new can of worms that show up during device driver removal.
>
> If you feel confident (I'm not), I can pursue this approach too.
>
>>
>>> I just fixed the function rename and changed the dev_info() to dev_dbg().
>>
>> And why do you need the list?
>>
>> ged_shutdown() will be called for every device for which ged_probe()
>> has been called.
>
> The problem I had here is that =the last argument is the context pointer when I
> call devm_free_irq().
>
> If I don't pass the same context I used during IRQ registration, then the IRQ
> free API fails. That's why, I needed to keep the event pointer around until the
> IRQ free is called.

OK

Anyway, it looks like something is missing in the core.

You shouldn't really need to do all that dance in a driver.

Powered by blists - more mailing lists