[moderation] [mm?] [fs?] KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu (10)

4 views
Skip to first unread message

syzbot

unread,
Dec 9, 2023, 7:01:32 PM12/9/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: f2e8a57ee903 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14c20fdae80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=620fa4217f31efcc73bc
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org linu...@kvack.org wi...@infradead.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e81f2b8d4585/disk-f2e8a57e.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/614fba6a34bb/vmlinux-f2e8a57e.xz
kernel image: https://storage.googleapis.com/syzbot-assets/01cf31246ce8/bzImage-f2e8a57e.xz

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

==================================================================
BUG: KCSAN: data-race in fprop_new_period / fprop_reflect_period_percpu

read-write to 0xffffffff86ef7d60 of 4 bytes by interrupt on cpu 1:
fprop_new_period+0xaa/0xe0 lib/flex_proportions.c:79
writeout_period+0x59/0xe0 mm/page-writeback.c:613
call_timer_fn+0x37/0x2f0 kernel/time/timer.c:1700
expire_timers kernel/time/timer.c:1751 [inline]
__run_timers+0x46c/0x650 kernel/time/timer.c:2022
run_timer_softirq+0x31/0x40 kernel/time/timer.c:2037
__do_softirq+0xc4/0x279 kernel/softirq.c:553
do_softirq+0x5e/0x90 kernel/softirq.c:454
__local_bh_enable_ip+0x64/0x70 kernel/softirq.c:381
__raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline]
_raw_spin_unlock_bh+0x36/0x40 kernel/locking/spinlock.c:210
spin_unlock_bh include/linux/spinlock.h:396 [inline]
batadv_nc_purge_paths+0x217/0x260 net/batman-adv/network-coding.c:471
batadv_nc_worker+0x3db/0xac0 net/batman-adv/network-coding.c:720
process_one_work kernel/workqueue.c:2627 [inline]
process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2700
worker_thread+0x525/0x730 kernel/workqueue.c:2781
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read to 0xffffffff86ef7d60 of 4 bytes by task 11 on cpu 0:
fprop_reflect_period_percpu+0x22/0x1a0 lib/flex_proportions.c:188
__fprop_add_percpu lib/flex_proportions.c:219 [inline]
__fprop_add_percpu_max+0x58/0x180 lib/flex_proportions.c:277
wb_domain_writeout_add mm/page-writeback.c:560 [inline]
__wb_writeout_add+0x7e/0x1d0 mm/page-writeback.c:584
__folio_end_writeback+0x21b/0x4a0 mm/page-writeback.c:2963
folio_end_writeback+0x74/0x1f0 mm/filemap.c:1598
ext4_finish_bio+0x45c/0x8c0 fs/ext4/page-io.c:145
ext4_release_io_end+0x8c/0x1e0 fs/ext4/page-io.c:160
ext4_end_io_end fs/ext4/page-io.c:194 [inline]
ext4_do_flush_completed_IO fs/ext4/page-io.c:259 [inline]
ext4_end_io_rsv_work+0x2d3/0x360 fs/ext4/page-io.c:273
process_one_work kernel/workqueue.c:2627 [inline]
process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2700
worker_thread+0x525/0x730 kernel/workqueue.c:2781
kthread+0x1d7/0x210 kernel/kthread.c:388
ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

value changed: 0x0000001d -> 0x0000001e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11 Comm: kworker/u4:0 Not tainted 6.7.0-rc4-syzkaller-00358-gf2e8a57ee903 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
Workqueue: ext4-rsv-conversion ext4_end_io_rsv_work
==================================================================


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages