Files
kernel/drivers/mfd
Alexandre Belloni 128b1b38a6 mfd: menelaus: Fix possible race condition and leak
[ Upstream commit 9612f8f503804d2fd2f63aa6ba1e58bba4612d96 ]

The IRQ work is added 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 calling menelaus_add_irq_work.

Also, this solves a possible leak as the RTC is never released.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13 11:08:38 -08:00
..
2018-07-04 07:17:13 +01:00
2018-01-08 11:03:35 +00:00
2018-06-12 16:19:22 -07:00
2017-07-18 08:27:18 +01:00
2017-04-27 09:25:04 +01:00
2017-11-29 16:29:36 +00:00