From: Oleh Kravchenko <oleg@kaa.org.ua>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.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 15:23:21 +0300 [thread overview]
Message-ID: <BC1CA967-2B9F-44A4-A1A9-FD9C6E874991@kaa.org.ua> (raw)
In-Reply-To: <20190905120626.hyegecmy6hf5lvhj@pengutronix.de>
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?
Best regards,
Oleh Kravchenko
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K. | Uwe Kleine-König |
> Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2019-09-05 12:23 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 [this message]
2019-09-05 12:46 ` Uwe Kleine-König
2019-09-05 20:41 ` Jacek Anaszewski
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=BC1CA967-2B9F-44A4-A1A9-FD9C6E874991@kaa.org.ua \
--to=oleg@kaa.org.ua \
--cc=dan.carpenter@oracle.com \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).