[moderation] [mm?] KCSAN: data-race in __percpu_counter_limited_add / percpu_counter_add_batch

6 views
Skip to first unread message

syzbot

unread,
Dec 19, 2023, 6:04:25 AM12/19/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 2cf4f94d8e86 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1452fe06e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=989a728d0f884055
dashboard link: https://syzkaller.appspot.com/bug?extid=b92f561e7cb379085568
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/eab343f2d1a0/disk-2cf4f94d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3222d147aacc/vmlinux-2cf4f94d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/81f4502c659f/bzImage-2cf4f94d.xz

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

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

read-write to 0xffff888100139b50 of 8 bytes by task 11055 on cpu 1:
percpu_counter_add_batch+0xc9/0x140 lib/percpu_counter.c:96
percpu_counter_add include/linux/percpu_counter.h:71 [inline]
percpu_counter_sub include/linux/percpu_counter.h:277 [inline]
shmem_inode_unacct_blocks mm/shmem.c:251 [inline]
shmem_recalc_inode+0x130/0x1b0 mm/shmem.c:442
shmem_undo_range+0xa04/0xa40 mm/shmem.c:1108
shmem_truncate_range+0x27/0x70 mm/shmem.c:1113
shmem_setattr+0x792/0x830 mm/shmem.c:1196
notify_change+0x866/0x8e0 fs/attr.c:499
do_truncate+0x116/0x150 fs/open.c:66
handle_truncate fs/namei.c:3280 [inline]
do_open fs/namei.c:3626 [inline]
path_openat+0x19b6/0x1d70 fs/namei.c:3779
do_filp_open+0xf6/0x200 fs/namei.c:3809
do_sys_openat2+0xab/0x110 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_openat fs/open.c:1468 [inline]
__se_sys_openat fs/open.c:1463 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1463
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff888100139b50 of 8 bytes by task 11039 on cpu 0:
__percpu_counter_limited_add+0xfa/0x460
percpu_counter_limited_add include/linux/percpu_counter.h:77 [inline]
shmem_inode_acct_blocks+0xf4/0x230 mm/shmem.c:220
shmem_alloc_and_add_folio mm/shmem.c:1695 [inline]
shmem_get_folio_gfp+0x59f/0xb40 mm/shmem.c:2054
shmem_get_folio mm/shmem.c:2136 [inline]
shmem_write_begin+0xa0/0x1b0 mm/shmem.c:2719
generic_perform_write+0x1c9/0x410 mm/filemap.c:3918
shmem_file_write_iter+0xc8/0xe0 mm/shmem.c:2895
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:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x0000000000015ced -> 0x0000000000011cf0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 11039 Comm: syz-executor.5 Not tainted 6.7.0-rc6-syzkaller-00010-g2cf4f94d8e86 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/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,
Jan 23, 2024, 6:04:12 AM1/23/24
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