[moderation] [mm?] KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch (5)

0 views
Skip to first unread message

syzbot

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

syzbot found the following issue on:

HEAD commit: 4652b8e4f3ff Merge tag '6.7-rc-ksmbd-server-fixes' of git:..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11522940e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=561f2d77dae76e1b
dashboard link: https://syzkaller.appspot.com/bug?extid=784b3ee2508f51dc29ed
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [ak...@linux-foundation.org hu...@google.com linux-...@vger.kernel.org linu...@kvack.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6404911ced49/disk-4652b8e4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/811b8c84dc1a/vmlinux-4652b8e4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b68ddd8f7b64/bzImage-4652b8e4.xz

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

==================================================================
BUG: KCSAN: data-race in __percpu_counter_compare / percpu_counter_add_batch

read-write to 0xffff888100135b50 of 8 bytes by task 8549 on cpu 0:
percpu_counter_add_batch+0xc9/0x140 lib/percpu_counter.c:96
shmem_inode_acct_block+0x1ee/0x220
shmem_alloc_and_acct_folio mm/shmem.c:1676 [inline]
shmem_get_folio_gfp+0x4ad/0xc30 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0xa6/0x210 mm/shmem.c:2688
generic_perform_write+0x1c9/0x410 mm/filemap.c:3969
shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2865
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100135b50 of 8 bytes by task 8552 on cpu 1:
percpu_counter_read include/linux/percpu_counter.h:101 [inline]
__percpu_counter_compare+0x2b/0x1d0 lib/percpu_counter.c:262
percpu_counter_compare include/linux/percpu_counter.h:64 [inline]
shmem_inode_acct_block+0xf6/0x220 mm/shmem.c:221
shmem_alloc_and_acct_folio mm/shmem.c:1676 [inline]
shmem_get_folio_gfp+0x4ad/0xc30 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0xa6/0x210 mm/shmem.c:2688
generic_perform_write+0x1c9/0x410 mm/filemap.c:3969
shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2865
call_write_iter include/linux/fs.h:2020 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x48a/0x790 fs/read_write.c:584
ksys_write+0xeb/0x1a0 fs/read_write.c:637
__do_sys_write fs/read_write.c:649 [inline]
__se_sys_write fs/read_write.c:646 [inline]
__x64_sys_write+0x42/0x50 fs/read_write.c:646
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000000423 -> 0x0000000000000443

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 8552 Comm: syz-executor.2 Not tainted 6.6.0-syzkaller-10396-g4652b8e4f3ff #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/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

syzbot

unread,
Dec 22, 2023, 7:07:14 PM12/22/23
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