From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Anson.Huang@nxp.com
Cc: a.zummo@towertech.it, linux-rtc@vger.kernel.org,
linux-kernel@vger.kernel.org, Linux-imx@nxp.com
Subject: Re: [PATCH] rtc: snvs: fix possible race condition
Date: Thu, 29 Aug 2019 17:39:42 +0200 [thread overview]
Message-ID: <20190829153942.GK21922@piout.net> (raw)
In-Reply-To: <20190716071858.36750-1-Anson.Huang@nxp.com>
On 16/07/2019 15:18:58+0800, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
>
> The RTC IRQ is requested before the struct rtc_device is allocated,
> this may lead to a NULL pointer dereference in IRQ handler.
>
> To fix this issue, allocating the rtc_device struct before requesting
> the RTC IRQ using devm_rtc_allocate_device, and use rtc_register_device
> to register the RTC device.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
> drivers/rtc/rtc-snvs.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
Applied, thanks.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2019-08-29 15:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 7:18 [PATCH] rtc: snvs: fix possible race condition Anson.Huang
2019-07-17 10:54 ` Aisheng Dong
2019-07-17 13:57 ` Anson Huang
2019-07-18 3:08 ` Aisheng Dong
2019-07-18 16:32 ` Trent Piepho
2019-07-19 2:57 ` Anson Huang
2019-07-19 19:04 ` Trent Piepho
2019-07-20 19:55 ` Alexandre Belloni
2019-08-13 9:22 ` Anson Huang
2019-08-29 15:39 ` Alexandre Belloni [this message]
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=20190829153942.GK21922@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=Anson.Huang@nxp.com \
--cc=Linux-imx@nxp.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/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).