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

0 views
Skip to first unread message

syzbot

unread,
Jun 27, 2024, 10:51:27 PM (2 days ago) Jun 27
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 66e55ff12e73 Merge tag 'for-6.10-rc5-tag' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16778081980000
kernel config: https://syzkaller.appspot.com/x/.config?x=7e87b541dc1fc960
dashboard link: https://syzkaller.appspot.com/bug?extid=6be51af9cf4d528bfd02
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/bf21f8e58486/disk-66e55ff1.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/480012b06f5d/vmlinux-66e55ff1.xz
kernel image: https://storage.googleapis.com/syzbot-assets/2c8c3b8aab4c/bzImage-66e55ff1.xz

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

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

write to 0xffff888103101770 of 8 bytes by task 15865 on cpu 0:
mem_cgroup_track_foreign_dirty_slowpath+0x3b3/0x440
mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1695 [inline]
folio_account_dirtied mm/page-writeback.c:2705 [inline]
__folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2748
mark_buffer_dirty+0x148/0x250 fs/buffer.c:1207
__block_commit_write fs/buffer.c:2200 [inline]
block_write_end+0x158/0x2e0 fs/buffer.c:2276
ext4_da_do_write_end fs/ext4/inode.c:2952 [inline]
ext4_da_write_end+0x1ad/0x860 fs/ext4/inode.c:3025
generic_perform_write+0x276/0x410 mm/filemap.c:4026
ext4_buffered_write_iter+0x1f6/0x380 fs/ext4/file.c:299
ext4_file_write_iter+0x29f/0xe30
__kernel_write_iter+0x24f/0x4d0 fs/read_write.c:523
dump_emit_page fs/coredump.c:893 [inline]
dump_user_range+0x3a7/0x550 fs/coredump.c:954
elf_core_dump+0x1aeb/0x1c30 fs/binfmt_elf.c:2083
do_coredump+0xff6/0x1860 fs/coredump.c:767
get_signal+0xdc1/0x1080 kernel/signal.c:2894
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0x94/0x130 kernel/entry/common.c:231
irqentry_exit+0x12/0x50 kernel/entry/common.c:334
exc_general_protection+0x33d/0x4d0 arch/x86/kernel/traps.c:644
asm_exc_general_protection+0x26/0x30 arch/x86/include/asm/idtentry.h:617

read to 0xffff888103101770 of 8 bytes by task 14696 on cpu 1:
mem_cgroup_track_foreign_dirty_slowpath+0x2fc/0x440 mm/memcontrol.c:5111
mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1695 [inline]
folio_account_dirtied mm/page-writeback.c:2705 [inline]
__folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2748
mark_buffer_dirty+0x148/0x250 fs/buffer.c:1207
__block_commit_write fs/buffer.c:2200 [inline]
block_write_end+0x158/0x2e0 fs/buffer.c:2276
ext4_da_do_write_end fs/ext4/inode.c:2952 [inline]
ext4_da_write_end+0x1ad/0x860 fs/ext4/inode.c:3025
generic_perform_write+0x276/0x410 mm/filemap.c:4026
ext4_buffered_write_iter+0x1f6/0x380 fs/ext4/file.c:299
ext4_file_write_iter+0x29f/0xe30
__kernel_write_iter+0x24f/0x4d0 fs/read_write.c:523
dump_emit_page fs/coredump.c:893 [inline]
dump_user_range+0x3a7/0x550 fs/coredump.c:954
elf_core_dump+0x1aeb/0x1c30 fs/binfmt_elf.c:2083
do_coredump+0xff6/0x1860 fs/coredump.c:767
get_signal+0xdc1/0x1080 kernel/signal.c:2894
arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0x94/0x130 kernel/entry/common.c:231
irqentry_exit+0x12/0x50 kernel/entry/common.c:334
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x0000000100001d66 -> 0x0000000100001dce

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14696 Comm: syz.4.3102 Tainted: G W 6.10.0-rc5-syzkaller-00155-g66e55ff12e73 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
==================================================================


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