summaryrefslogtreecommitdiffstats
path: root/samples/trace_events
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 /samples/trace_events
parentrtc: sh: stop resetting time to epoch (diff)
downloadlinux-1097998d27da39578542e79ff865b4d74e755cd0.tar.xz
linux-1097998d27da39578542e79ff865b4d74e755cd0.zip
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 'samples/trace_events')
0 files changed, 0 insertions, 0 deletions