[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56C588DC.1040909@posteo.net>
Date: Thu, 18 Feb 2016 10:03:24 +0100
From: Valentin Rothberg <valentin.rothberg@...teo.net>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>, ldewangan@...dia.com
Cc: kbuild-all@...org, alexandre.belloni@...e-electrons.com,
javier@....samsung.com, cw00.choi@...sung.com,
a.zummo@...ertech.it, linux-kernel@...r.kernel.org,
rtc-linux@...glegroups.com,
kbuild test robot <fengguang.wu@...el.com>
Subject: Re: [PATCH] rtc: max77686: fix irqf_oneshot.cocci warnings
Hi Krzysztof,
On 2/18/16 9:50 AM, Krzysztof Kozlowski wrote:
> On 18.02.2016 17:46, Valentin Rothberg wrote:
>>
>>
>> Hi Krzysztof,
>>
>> On 2/18/16 9:13 AM, Krzysztof Kozlowski wrote:
>>> On 18.02.2016 17:06, Valentin Rothberg wrote:
>>>> From: kbuild test robot <fengguang.wu@...el.com>
>>>>
>>>> Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
>>>> threaded IRQs without a primary handler need to be requested with
>>>> IRQF_ONESHOT, otherwise the request will fail.
>>>>
>>>> So pass the IRQF_ONESHOT flag in this case.
>>>>
>>>> Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci
>>>>
>>>> CC: Laxman Dewangan <ldewangan@...dia.com>
>>>> Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
>>>> Signed-off-by: Valentin Rothberg <valentin.rothberg@...teo.net>
>>>> ---
>>>> drivers/rtc/rtc-max77686.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>
>>> Nack, because:
>>> 1. AFAIR this is a false positive.
>>
>> Looking at kernel/irq/manage.c +1250 such requests will be rejected
>> unconditionally when the primary handler is NULL, except when the chip
>> is marked to be oneshot safe.
>>
>> Is there another semantic that I am not aware of? In case the script
>> produces false positives, I will change it immediately.
>
> The handler is "irq_nested_primary_handler".
>
>>> 2. Was it tested? Was it reproduced? Was the bug actually spotted or
>>> just coccicheck pointed this and you assumed that "request will fail"?
>>>
>>> Coccicheck is a great tool... but not necessarily for pointing run-time
>>> bugs.
>>
>> I did not test it. To me the issue rather seems seems like something
>> where Coccinelle is really good at, static analysis.
>
> Yet, this is somehow subtle (device inter-dependencies) so it falls out
> of static into runtime (I mean runtime analysis is needed).
Thanks for your answer. I wasn't aware of this at all.
Best regards,
Valentin
Powered by blists - more mailing lists