]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rtc: add data_race() in rtc_dev_poll()
authorMauricio Faria de Oliveira <mfo@igalia.com>
Tue, 17 Mar 2026 23:22:16 +0000 (20:22 -0300)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 18 Mar 2026 21:27:04 +0000 (22:27 +0100)
commitb47bcab6ee92d5ca6ba55c06b9a503e2663e942f
treed242ef4fea2cb2f828486bb3f4fb6e909ca0b587
parent5827fe59745dc717e878177f104f0c1a96cfcb7f
rtc: add data_race() in rtc_dev_poll()

The unlocked read of rtc->irq_data in rtc_dev_poll() can race with
the write in rtc_handle_legacy_irq() and also, theoretically, with
the write in rtc_dev_read().

These races should be safe (see inline comment), thus annotate the
read with data_race() for KCSAN.

Reported-by: syzbot+2d4127acca35ed7b31ad@syzkaller.appspotmail.com
Closes: https://syzbot.org/bug?extid=2d4127acca35ed7b31ad
Signed-off-by: Mauricio Faria de Oliveira <mfo@igalia.com>
Link: https://patch.msgid.link/20260317-irq_data-v1-1-a2741002be60@igalia.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/dev.c