[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180604123124.ix5iql3wfgjqymsv@flea>
Date: Mon, 4 Jun 2018 14:31:24 +0200
From: Maxime Ripard <maxime.ripard@...tlin.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
Chen-Yu Tsai <wens@...e.org>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] rtc: sunxi: fix possible race condition
On Mon, Jun 04, 2018 at 02:05:40PM +0200, Alexandre Belloni wrote:
> The IRQ is requested before the struct rtc is allocated and registered, but
> this struct is used in the IRQ handler. This may lead to a NULL pointer
> dereference.
>
> Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc
> before requesting the IRQ.
>
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
Acked-by: Maxime Ripard <maxime.ripard@...tlin.com>
Maxime
--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists