diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2019-07-16 15:18:58 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-07 18:59:30 +0200 |
commit | 1a5f22226ad004e670048b073a935be76b711a49 (patch) | |
tree | 29f5080f26ea552526968b130364b0afc9192c02 /kernel/audit_watch.c | |
parent | 6edfcbdc24beca6426228826516439675508d0d0 (diff) | |
download | linux-stable-1a5f22226ad004e670048b073a935be76b711a49.tar.gz linux-stable-1a5f22226ad004e670048b073a935be76b711a49.tar.bz2 linux-stable-1a5f22226ad004e670048b073a935be76b711a49.zip |
rtc: snvs: fix possible race condition
[ Upstream commit 6fd4fe9b496d9ba3382992ff4fde3871d1b6f63d ]
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>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Link: https://lore.kernel.org/r/20190716071858.36750-1-Anson.Huang@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel/audit_watch.c')
0 files changed, 0 insertions, 0 deletions