aboutsummaryrefslogtreecommitdiff
path: root/include/linux/rtc.h
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-20 12:30:09 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-04 10:07:09 +0200
commit1097998d27da39578542e79ff865b4d74e755cd0 (patch)
treedbaf06cbb95fd81e353363c4a45c3bd8bb50f9c5 /include/linux/rtc.h
parent9852023d204b97324e7fa84f50f28a9d602b79fb (diff)
rtc: sh: fix possible race condition
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 struct before requesting the IRQ. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc.h')
0 files changed, 0 insertions, 0 deletions