[moderation] [fs?] [mm?] KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (4)

3 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 7:09:29 PM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: bee0e7762ad2 Merge tag 'for-linus-iommufd' of git://git.ke..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14b65e22e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=8a50de146f4034d6607c
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/233be5f65dd2/disk-bee0e776.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/94423738a289/vmlinux-bee0e776.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0b977463fa9a/bzImage-bee0e776.xz

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

==================================================================
BUG: KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath

write to 0xffff88811c4de770 of 8 bytes by task 3728 on cpu 1:
mem_cgroup_track_foreign_dirty_slowpath+0x3b3/0x440
mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1710 [inline]
folio_account_dirtied mm/page-writeback.c:2629 [inline]
__folio_mark_dirty+0x3fc/0x4e0 mm/page-writeback.c:2669
mark_buffer_dirty+0x148/0x240 fs/buffer.c:1200
__block_commit_write fs/buffer.c:2191 [inline]
block_write_end+0x158/0x2e0 fs/buffer.c:2267
ext4_da_do_write_end fs/ext4/inode.c:2961 [inline]
ext4_da_write_end+0x1fc/0x9c0 fs/ext4/inode.c:3033
generic_perform_write+0x267/0x410 mm/filemap.c:3929
ext4_buffered_write_iter+0x1f6/0x370 fs/ext4/file.c:299
ext4_file_write_iter+0x297/0xe10
__kernel_write_iter+0x162/0x390 fs/read_write.c:517
dump_emit_page fs/coredump.c:888 [inline]
dump_user_range+0x25d/0x480 fs/coredump.c:915
elf_core_dump+0x1a85/0x1ba0 fs/binfmt_elf.c:2077
do_coredump+0x102a/0x1890 fs/coredump.c:764
get_signal+0xdb5/0x10a0 kernel/signal.c:2890
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309
irqentry_exit+0x12/0x40 kernel/entry/common.c:412
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

read to 0xffff88811c4de770 of 8 bytes by task 3686 on cpu 0:
mem_cgroup_track_foreign_dirty_slowpath+0x2fc/0x440 mm/memcontrol.c:4860
mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1710 [inline]
folio_account_dirtied mm/page-writeback.c:2629 [inline]
__folio_mark_dirty+0x3fc/0x4e0 mm/page-writeback.c:2669
mark_buffer_dirty+0x148/0x240 fs/buffer.c:1200
__block_commit_write fs/buffer.c:2191 [inline]
block_write_end+0x158/0x2e0 fs/buffer.c:2267
ext4_da_do_write_end fs/ext4/inode.c:2961 [inline]
ext4_da_write_end+0x1fc/0x9c0 fs/ext4/inode.c:3033
generic_perform_write+0x267/0x410 mm/filemap.c:3929
ext4_buffered_write_iter+0x1f6/0x370 fs/ext4/file.c:299
ext4_file_write_iter+0x297/0xe10
__kernel_write_iter+0x162/0x390 fs/read_write.c:517
dump_emit_page fs/coredump.c:888 [inline]
dump_user_range+0x25d/0x480 fs/coredump.c:915
elf_core_dump+0x1a85/0x1ba0 fs/binfmt_elf.c:2077
do_coredump+0x102a/0x1890 fs/coredump.c:764
get_signal+0xdb5/0x10a0 kernel/signal.c:2890
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
irqentry_exit_to_user_mode+0x9/0x20 kernel/entry/common.c:309
irqentry_exit+0x12/0x40 kernel/entry/common.c:412
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570

value changed: 0x0000000100005e24 -> 0x0000000100005e89

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 3686 Comm: syz-executor.1 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


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