KCSAN: data-race in tick_nohz_next_event / tick_sched_timer

5 views
Skip to first unread message

syzbot

unread,
Dec 7, 2020, 6:34:12 AM12/7/20
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 509a1542 Merge tag '5.10-rc6-smb3-fixes' of git://git.samb..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12e6f4ad500000
kernel config: https://syzkaller.appspot.com/x/.config?x=c949fed53798f819
dashboard link: https://syzkaller.appspot.com/bug?extid=718de52a970b1291af5a
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project.git 913f6005669cfb590c99865a90bc51ed0983d09d)
CC: [fwei...@gmail.com linux-...@vger.kernel.org mi...@kernel.org tg...@linutronix.de]

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+718de5...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in tick_nohz_next_event / tick_sched_timer

write to 0xffffffff86fc1910 of 4 bytes by interrupt on cpu 0:
tick_sched_do_timer kernel/time/tick-sched.c:141 [inline]
tick_sched_timer+0x1f5/0x210 kernel/time/tick-sched.c:1321
__run_hrtimer+0x133/0x420 kernel/time/hrtimer.c:1519
__hrtimer_run_queues kernel/time/hrtimer.c:1583 [inline]
hrtimer_interrupt+0x36e/0xa10 kernel/time/hrtimer.c:1645
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1080 [inline]
__sysvec_apic_timer_interrupt+0x6f/0x200 arch/x86/kernel/apic/apic.c:1097
asm_call_irq_on_stack+0xf/0x20
__run_sysvec_on_irqstack arch/x86/include/asm/irq_stack.h:37 [inline]
run_sysvec_on_irqstack_cond arch/x86/include/asm/irq_stack.h:89 [inline]
sysvec_apic_timer_interrupt+0x52/0x90 arch/x86/kernel/apic/apic.c:1091
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631
native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline]
arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline]
rmqueue_pcplist+0x161/0x190 mm/page_alloc.c:3413
rmqueue+0x100c/0x11d0 mm/page_alloc.c:3436
get_page_from_freelist+0x236/0x480 mm/page_alloc.c:3901
__alloc_pages_nodemask+0x19e/0x350 mm/page_alloc.c:4946
alloc_pages_current+0x21d/0x310 mm/mempolicy.c:2271
alloc_pages include/linux/gfp.h:547 [inline]
__page_cache_alloc+0x4d/0xf0 mm/filemap.c:977
page_cache_ra_unbounded+0x1ae/0x4c0 mm/readahead.c:216
ondemand_readahead+0x560/0x780 mm/readahead.c:267
page_cache_async_ra+0x1aa/0x1d0 mm/readahead.c:607
page_cache_async_readahead include/linux/pagemap.h:862 [inline]
generic_file_buffered_read+0x450/0x23a0 mm/filemap.c:2247
generic_file_read_iter+0x80/0x3d0 mm/filemap.c:2553
ext4_file_read_iter+0x2d0/0x420 fs/ext4/file.c:74
__kernel_read+0x307/0x560 fs/read_write.c:454
integrity_kernel_read+0x4c/0x70 security/integrity/iint.c:191
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:484 [inline]
ima_calc_file_shash security/integrity/ima/ima_crypto.c:515 [inline]
ima_calc_file_hash+0x9c7/0x1430 security/integrity/ima/ima_crypto.c:580
ima_collect_measurement+0x168/0x300 security/integrity/ima/ima_api.c:250
process_measurement+0x9f1/0x1050 security/integrity/ima/ima_main.c:330
ima_file_check+0x72/0xa0 security/integrity/ima/ima_main.c:498
do_open fs/namei.c:3254 [inline]
path_openat+0x1887/0x20a0 fs/namei.c:3369
do_filp_open+0xbd/0x1d0 fs/namei.c:3396
do_sys_openat2+0xa3/0x240 fs/open.c:1168
do_sys_open fs/open.c:1184 [inline]
__do_sys_openat fs/open.c:1200 [inline]
__se_sys_openat fs/open.c:1195 [inline]
__x64_sys_openat+0xef/0x110 fs/open.c:1195
do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffffffff86fc1910 of 4 bytes by task 0 on cpu 1:
tick_nohz_next_event+0x217/0x300 kernel/time/tick-sched.c:754
tick_nohz_get_sleep_length+0x121/0x270 kernel/time/tick-sched.c:1107
menu_select+0x2fa/0xf40 drivers/cpuidle/governors/menu.c:283
cpuidle_select+0x3d/0x50 drivers/cpuidle/cpuidle.c:322
cpuidle_idle_call kernel/sched/idle.c:232 [inline]
do_idle+0x15f/0x230 kernel/sched/idle.c:299
cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:395
secondary_startup_64_no_verify+0xb0/0xbb

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.10.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Sep 27, 2021, 6:26:22 AM9/27/21
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages