Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2339764rwr; Fri, 21 Apr 2023 07:38:22 -0700 (PDT) X-Google-Smtp-Source: AKy350ZL65FAKc6R4PKLMtkGPN83C9MSFVZPyrL5rWU1riPWefHPF4f65JPWMV58ICQBbQi3xUca X-Received: by 2002:a05:6a20:394c:b0:f0:69de:6165 with SMTP id r12-20020a056a20394c00b000f069de6165mr5769833pzg.4.1682087902005; Fri, 21 Apr 2023 07:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682087901; cv=none; d=google.com; s=arc-20160816; b=uUgyVs6DylhSwaGRQgrNC7DCSF7hW4SgS1ZdoL00K0/drX/OlDk8RdMdRNOwY1CnG9 Fc1maK9oJtzblP8vILxoVu+7pRkje/ad/0OnDKKEP3vG8i+RfstLduU0MhSJ/jlhEwGA 15ftBU923wmrkbOZEvsMc0aq509YRCKGXvpQgty4mb5Bbb124KtK5iIl6ic/5Gb3kQJU xpGl7/oHVmbdRGKjs2j5q5aR7kUdss9ALfY7Jaf765qaesOltBoBj9CjLzHmRI8hBPEb CnvoGB/377GJhGdfs6jnllMr2VXwPk/ndadVZ7EoGj/WVkFrTqapjtEi/fJRE2Q0tGOF Izdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=MrFEuF/VNq5g9FqzV/mufM217urn03OllWFFKpr3C0U=; b=d3CZp5Gqlp7jkyofhWYmggw1ZNufiFlFIgbAyIq9K8kqsRjA4k3jscQd9h+wFaMdRT e/IQYI4QEyq40baxhvhGKTCme1Y86qVr10moroF6Sx9i0Zs059J4poCmQ0YraFcRJMCF X8EmCLTziUCMHCxywIiFQFjUGH8Lq4e4IpyVxXr0jomjqoKd/+H/1XtsQVJJGIEnoCWz 6YeFAD8wpnQLWLAc1P5xaZppc1fn0orT8qeVV7OVXDZUmUlUcnuu1FoGSJo7/wqsvPtU p2eRpf3JHVPe1UXMSEky2Bt2ZYvnWYJMzQ9Ln8Vc7Y78uLvYwjGn5hAeWYyh2aS1EZWO UFkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mj10-20020a17090b368a00b00246a75f49desi4699268pjb.112.2023.04.21.07.38.07; Fri, 21 Apr 2023 07:38:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232666AbjDUOdc (ORCPT + 99 others); Fri, 21 Apr 2023 10:33:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232196AbjDUOda (ORCPT ); Fri, 21 Apr 2023 10:33:30 -0400 Received: from mail-il1-f206.google.com (mail-il1-f206.google.com [209.85.166.206]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29CA514451 for ; Fri, 21 Apr 2023 07:32:54 -0700 (PDT) Received: by mail-il1-f206.google.com with SMTP id e9e14a558f8ab-329614db215so14599515ab.2 for ; Fri, 21 Apr 2023 07:32:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682087574; x=1684679574; h=to:from:subject:message-id:date:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MrFEuF/VNq5g9FqzV/mufM217urn03OllWFFKpr3C0U=; b=fo6GeijpudYzY/8hJqo0n6oxD3IYM3P+qWJqdEnO6g2sOWO0aVHXpJP/k00BZUyY7l j20OElCc2VzduEVX+YR6qSHB815ib2fruxr0gG5zoLlJi2G75oOzKpkRSMR7TdSViNAZ K6NdoUi0olj9ysV5PiOR9paVCOMJIa/oyT5kZraUP6+vr6OnUSG9+6L8QVvdksxFVtcx nULzKMuLkQAwVnbvfC7EgO2uYlGLI9a1RdhxdW2MnAagPI5QOIycbgTt8M+e9AeyPb+Y LM65bLHKg+982wxJCQ1+1LdxtAwLORIU862AicutfbM6P3QoLYKjyE02ZW9gdLts1MUW Eh1A== X-Gm-Message-State: AAQBX9c6QYrcno+Vpq+nfZPdqeLNL1InydrQArB6PQQ0SOztBThCZo3O FUoefKTsrmXdQEHac76LXYGJBwvoM7vuyaqym2dqnCRTqi5W MIME-Version: 1.0 X-Received: by 2002:a05:6e02:6cb:b0:329:654a:1231 with SMTP id p11-20020a056e0206cb00b00329654a1231mr2866845ils.5.1682087574284; Fri, 21 Apr 2023 07:32:54 -0700 (PDT) Date: Fri, 21 Apr 2023 07:32:54 -0700 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000058b63f05f9d98811@google.com> Subject: [syzbot] [cgroups?] [mm?] KCSAN: data-race in drain_all_stock / drain_obj_stock (4) From: syzbot To: akpm@linux-foundation.org, bpf@vger.kernel.org, cgroups@vger.kernel.org, hannes@cmpxchg.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, muchun.song@linux.dev, roman.gushchin@linux.dev, shakeelb@google.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SORTED_RECIPS, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 534293368afa Merge tag 'kbuild-fixes-v6.3' of git://git.ke.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11a0c26ec80000 kernel config: https://syzkaller.appspot.com/x/.config?x=85fa20c996a2e46d dashboard link: https://syzkaller.appspot.com/bug?extid=774c29891415ab0fd29d compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/ec0e584af797/disk-53429336.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/423a67f52f94/vmlinux-53429336.xz kernel image: https://storage.googleapis.com/syzbot-assets/8409b9716faa/bzImage-53429336.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+774c29891415ab0fd29d@syzkaller.appspotmail.com ================================================================== BUG: KCSAN: data-race in drain_all_stock / drain_obj_stock write to 0xffff888237c2a2f8 of 8 bytes by task 19625 on cpu 0: drain_obj_stock+0x408/0x4e0 mm/memcontrol.c:3306 refill_obj_stock+0x9c/0x1e0 mm/memcontrol.c:3340 obj_cgroup_uncharge+0xe/0x10 mm/memcontrol.c:3408 memcg_slab_free_hook mm/slab.h:587 [inline] __cache_free mm/slab.c:3373 [inline] __do_kmem_cache_free mm/slab.c:3577 [inline] kmem_cache_free+0x105/0x280 mm/slab.c:3602 __d_free fs/dcache.c:298 [inline] dentry_free fs/dcache.c:375 [inline] __dentry_kill+0x422/0x4a0 fs/dcache.c:621 dentry_kill+0x8d/0x1e0 dput+0x118/0x1f0 fs/dcache.c:913 __fput+0x3bf/0x570 fs/file_table.c:329 ____fput+0x15/0x20 fs/file_table.c:349 task_work_run+0x123/0x160 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xcf/0xe0 kernel/entry/common.c:171 exit_to_user_mode_prepare+0x6a/0xa0 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:296 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff888237c2a2f8 of 8 bytes by task 19632 on cpu 1: obj_stock_flush_required mm/memcontrol.c:3319 [inline] drain_all_stock+0x174/0x2a0 mm/memcontrol.c:2361 try_charge_memcg+0x6d0/0xd10 mm/memcontrol.c:2703 try_charge mm/memcontrol.c:2837 [inline] mem_cgroup_charge_skmem+0x51/0x140 mm/memcontrol.c:7290 sock_reserve_memory+0xb1/0x390 net/core/sock.c:1025 sk_setsockopt+0x800/0x1e70 net/core/sock.c:1525 udp_lib_setsockopt+0x99/0x6c0 net/ipv4/udp.c:2692 udp_setsockopt+0x73/0xa0 net/ipv4/udp.c:2817 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3668 __sys_setsockopt+0x1c3/0x230 net/socket.c:2271 __do_sys_setsockopt net/socket.c:2282 [inline] __se_sys_setsockopt net/socket.c:2279 [inline] __x64_sys_setsockopt+0x66/0x80 net/socket.c:2279 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0xffff8881382d52c0 -> 0xffff888138893740 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 19632 Comm: syz-executor.0 Not tainted 6.3.0-rc2-syzkaller-00387-g534293368afa #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/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 syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot.