From: Valentin Rothberg <valentin.rothberg@posteo.net>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>, ldewangan@nvidia.com
Cc: kbuild-all@01.org, alexandre.belloni@free-electrons.com,
javier@osg.samsung.com, cw00.choi@samsung.com,
a.zummo@towertech.it, linux-kernel@vger.kernel.org,
rtc-linux@googlegroups.com,
kbuild test robot <fengguang.wu@intel.com>
Subject: [rtc-linux] Re: [PATCH] rtc: max77686: fix irqf_oneshot.cocci warnings
Date: Thu, 18 Feb 2016 10:03:24 +0100 [thread overview]
Message-ID: <56C588DC.1040909@posteo.net> (raw)
In-Reply-To: <56C585EF.6030509@samsung.com>
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@intel.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@nvidia.com>
>>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>> Signed-off-by: Valentin Rothberg <valentin.rothberg@posteo.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
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
WARNING: multiple messages have this Message-ID (diff)
From: Valentin Rothberg <valentin.rothberg@posteo.net>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>, ldewangan@nvidia.com
Cc: kbuild-all@01.org, alexandre.belloni@free-electrons.com,
javier@osg.samsung.com, cw00.choi@samsung.com,
a.zummo@towertech.it, linux-kernel@vger.kernel.org,
rtc-linux@googlegroups.com,
kbuild test robot <fengguang.wu@intel.com>
Subject: Re: [PATCH] rtc: max77686: fix irqf_oneshot.cocci warnings
Date: Thu, 18 Feb 2016 10:03:24 +0100 [thread overview]
Message-ID: <56C588DC.1040909@posteo.net> (raw)
In-Reply-To: <56C585EF.6030509@samsung.com>
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@intel.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@nvidia.com>
>>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>>> Signed-off-by: Valentin Rothberg <valentin.rothberg@posteo.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
next prev parent reply other threads:[~2016-02-18 9:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 8:06 [rtc-linux] [PATCH] rtc: max77686: fix irqf_oneshot.cocci warnings Valentin Rothberg
2016-02-18 8:06 ` Valentin Rothberg
2016-02-18 8:13 ` [rtc-linux] " Krzysztof Kozlowski
2016-02-18 8:13 ` Krzysztof Kozlowski
2016-02-18 8:46 ` [rtc-linux] " Valentin Rothberg
2016-02-18 8:46 ` Valentin Rothberg
2016-02-18 8:50 ` [rtc-linux] " Krzysztof Kozlowski
2016-02-18 8:50 ` Krzysztof Kozlowski
2016-02-18 9:03 ` Valentin Rothberg [this message]
2016-02-18 9:03 ` Valentin Rothberg
2016-02-18 8:51 ` [rtc-linux] " Alexandre Belloni
2016-02-18 8:51 ` Alexandre Belloni
2016-02-18 9:23 ` [rtc-linux] " Valentin Rothberg
2016-02-18 9:23 ` Valentin Rothberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C588DC.1040909@posteo.net \
--to=valentin.rothberg@posteo.net \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=cw00.choi@samsung.com \
--cc=fengguang.wu@intel.com \
--cc=javier@osg.samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kbuild-all@01.org \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.