From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Oleh Kravchenko" <oleg@kaa.org.ua>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
linux-leds@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] led: triggers: Fix NULL dereference in led_trigger_set() error handling
Date: Thu, 5 Sep 2019 22:41:45 +0200 [thread overview]
Message-ID: <f6944fdb-5285-c88c-d227-88c1fef04568@gmail.com> (raw)
In-Reply-To: <20190905124641.eo4a6ld77q2f2prl@pengutronix.de>
On 9/5/19 2:46 PM, Uwe Kleine-König wrote:
> On Thu, Sep 05, 2019 at 03:23:21PM +0300, Oleh Kravchenko wrote:
>> Hello Jacek,
>>
>>> 5 вер. 2019 р. о 3:06 пп Uwe Kleine-König <u.kleine-koenig@pengutronix.de> написав(ла):
>>>
>>> Hello,
>>>
>>> On Thu, Sep 05, 2019 at 12:57:28PM +0300, Dan Carpenter wrote:
>>>> The problem is we set "led_cdev->trigger = NULL;" and then dereference
>>>> it when we call write_lock_irqsave():
>>>>
>>>> write_lock_irqsave(&led_cdev->trigger->leddev_list_lock, flags);
>>>> ^^^^^^^^^^^^^^^^^
>>>>
>>>> Fixes: 2282e125a406 ("leds: triggers: let struct led_trigger::activate() return an error code")
>>>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>>
>>> Obviously right. Thanks for catching.
>>>
>>> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
>>>
>>> Did you find this at runtime or by using some static checker?
>>
>> Let me summarize the chronology of the last activities below:
>> 1. I have sent the patch for the bugs that I have found by static analyzer at PVS-Studio
>> Date: Wed, 4 Sep 2019 00:18:19 +0300
>> https://www.spinics.net/lists/linux-leds/msg13181.html
>>
>> 2. At 5 Sep 2019 12:57:19 +0300 Time Dan Cartpen has sent the patch with the same proposal
>> 3. Uwe Kleine-König started to discuss his results of review by asking Dan on how he was found it.
>>
>> Would you mine if you will keep me as a Original author of this patch based on fact 1?
>
> I don't care much personally but it seems fair to take Oleh's version. I
> didn't see Oleh's patch before as only Dan's was Cc:d to me.
>
> Feel free to add my Reviewed-by also to Oleh's patch of course.
I've applied the patch from Oleh then, and added your Reviewed-by.
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2019-09-05 20:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 9:57 [PATCH] led: triggers: Fix NULL dereference in led_trigger_set() error handling Dan Carpenter
2019-09-05 11:22 ` Oleh Kravchenko
2019-09-05 12:06 ` Uwe Kleine-König
2019-09-05 12:23 ` Oleh Kravchenko
2019-09-05 12:46 ` Uwe Kleine-König
2019-09-05 20:41 ` Jacek Anaszewski [this message]
2019-09-05 13:32 ` Dan Carpenter
2019-09-08 9:46 ` Oleh Kravchenko
2019-09-05 12:39 ` Oleh Kravchenko
2019-09-05 13:04 ` Dan Carpenter
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=f6944fdb-5285-c88c-d227-88c1fef04568@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=dmurphy@ti.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=oleg@kaa.org.ua \
--cc=pavel@ucw.cz \
--cc=u.kleine-koenig@pengutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox