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, 29 Sep 2022 00:37:14 -0700
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        Krzysztof Opasiak <k.opasiak@...sung.com>
CC:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 1/2] nfc: s3fwrn5: fix order of freeing resources

On September 29, 2022 12:27:19 AM PDT, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org> wrote:
>On 29/09/2022 09:26, Krzysztof Kozlowski wrote:
>> On 29/09/2022 07:04, Dmitry Torokhov wrote:
>>> Caution needs to be exercised when mixing together regular and managed
>>> resources. In case of this driver devm_request_threaded_irq() should
>>> not be used, because it will result in the interrupt being freed too
>>> late, and there being a chance that it fires up at an inopportune
>>> moment and reference already freed data structures.
>> 
>> Non-devm was so far recommended only for IRQF_SHARED, not for regular
>> ones.

If we are absolutely sure there is no possibility of interrupts firing then devm
should be ok, but it is much safer not to use it. Or use custom devm actions
to free non-managed resources.

>> Otherwise you have to fix half of Linux kernel drivers... 

Yes, if they are doing the wrong thing.

>> why is s3fwrn5 special?
>> 

I simply happened to look at it.

>
>> Please use scripts/get_maintainers.pl to Cc also netdev folks.
>
>Ah, they are not printed for NFC drivers. So never mind last comment.
>
>Best regards,
>Krzysztof
>

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ