Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp175191rdg; Tue, 10 Oct 2023 07:21:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgN6LFGGWRycGR0yQPsx+h38B0l+28tVRxwz+5BFZVBV8TSJwfc2ScxBUUhZnabAdPVynv X-Received: by 2002:a17:902:be03:b0:1c4:c5d:d7fa with SMTP id r3-20020a170902be0300b001c40c5dd7famr14370115pls.45.1696947682761; Tue, 10 Oct 2023 07:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696947682; cv=none; d=google.com; s=arc-20160816; b=nTQbTAC3OI6UJibeozFRJrdxVbNJeh2yduIyELqzi0mC7Rg4YeowiWnIwr1RevkLkn JEsi1CRzESVbQXGDNmGSXGMKO6NLAWsazCuAv3kOI4mibnbC3qrfPh8AZ12nLVJvgH5O 6YAPtvBkHvbTTSN13CsUMe+wOQT3iDB3nNhPoFMiTSOBRFQ5Pzwox5H5gr3EEzL6EU4z Ec8W2UJSOk9sve92rnsuUrxTSJzlo6Rg/GENpyBGAN6BqbEZwl23kz8qlOqpbmEcRQsZ pJs8PtExK6CgmobLzcyPCDImJeQs7s8ykF5dLNwNszt02NTkDLYaJlCgFwVXBIsy4Hla p5qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RauVDwCZ6u0rcUr+gmJviY5+pWPqnBMyOCfnWtt3YIs=; fh=74cHeVy79VkbaykBTI+7zu22uWsQ4WPKotuKzSZ6CQQ=; b=zy0mZppXo+fpYhcjX/7WST+Ovun2926tn/3SUdEkRShb0JTyzdH2gEuBmAwSbvZfe9 A/9uQe743Zkq6TiBF0e0yGgdoqnvv/NKRDTcxLjJ3xlSBXY0l7VL4ayz13ILAU8Q7gCg 0sKZVmvqJ8UBv2dELIoU81gL/MYHii4lnM41L4xDHZD17MuhxCczzWHZZgsp89SyTl2p Qi6Dy+2J/ZUSiVviYS6a8cmLHnI1iX7PAYQi5rkVXgQEjCbPlRttfHD2oUrI+4Y3FREY MzLMHQZSjHQ1vyx6lvdDGnwuHnJQyViKr1QQJYFagFohHrq/fnO/wPKYMGK3APTgHG/R q1rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=ig5K0gMl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id d10-20020a170903230a00b001c5db1e47c3si12718416plh.553.2023.10.10.07.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=ig5K0gMl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id A9DE78023A30; Tue, 10 Oct 2023 07:21:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232663AbjJJOVB (ORCPT + 99 others); Tue, 10 Oct 2023 10:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232878AbjJJOU6 (ORCPT ); Tue, 10 Oct 2023 10:20:58 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5A81101 for ; Tue, 10 Oct 2023 07:20:52 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id d75a77b69052e-4180adafdc6so36234471cf.2 for ; Tue, 10 Oct 2023 07:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1696947652; x=1697552452; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RauVDwCZ6u0rcUr+gmJviY5+pWPqnBMyOCfnWtt3YIs=; b=ig5K0gMlG6fJxAPuwdhBMEEeN8Ai8RQC4EBAr6jXEZ+4Zm1kQ6IqhAbaXOb8pc81/O CnyifNI5WWjMqCkk83otepqaLXsONwYeat6o5MVZLm52pLGdBFnZPDJWwh/ecK4Vo8a2 AXw/CvHe3YcdjQ8B6W9CHUgnHU62Y617mrsfM6qV6pd8H2MtM002yPhyy2OQI/1E06/L jDB25klQp843QYF3MpD21Q2Nq48G7/w2Yc/dh6VLmObp3mi7R6npOAvBQK1vbWrM3Hdm ogzSk48iDrUylQrzQC8uzfIyTrgPcNnPyJmDeNMSLjHr52GsPyIrT60cjNEiaTY9U9PO Lgyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696947652; x=1697552452; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=RauVDwCZ6u0rcUr+gmJviY5+pWPqnBMyOCfnWtt3YIs=; b=MhjcHu5XFz+IyzgsQYF/Y6dnHMrx9NiWCpNm1XWNYJg7CcHMYLVRvjeagxVM67yRdx xvIHNGmXfLFUkD8zApNfNgwJ3H8bz9GaGaFZIgMDhagV0ZapGusdWWmKN/bmzi8zdxQ6 1U8cBo2s6EJZ56BcLtkd/IzhIl0jtOnEqMOcG+l2ugnTDqE2YQ0t0YW+x1lAxIdRiAgs sFzdFIW0LIzpKTkRdxKH8utEB659E8XVFw9nKBmYkhWphSTloQO96KxVTm/dOAW4Psiz 91GW8k4mVZM8kJH/YJk9HfF9Gj7mFI5B4hAcVjIy5qaKe0YzRA6aa+g0t334gwA9Wiel Mn+g== X-Gm-Message-State: AOJu0YzFIiSsbAR2uNbWhz8o3LTBIYwKi4A8L6kB7qu4S1zbmRa3iW+B D7o/k3Y+8YSYX54DCGk0OPVGkg== X-Received: by 2002:ac8:1383:0:b0:418:11de:ce1 with SMTP id h3-20020ac81383000000b0041811de0ce1mr16506979qtj.24.1696947651775; Tue, 10 Oct 2023 07:20:51 -0700 (PDT) Received: from localhost ([2620:10d:c091:400::5:66a6]) by smtp.gmail.com with ESMTPSA id q5-20020ac84505000000b0041b0a7d1872sm3563448qtn.70.2023.10.10.07.20.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 07:20:51 -0700 (PDT) Date: Tue, 10 Oct 2023 10:20:50 -0400 From: Johannes Weiner To: syzbot Cc: akpm@linux-foundation.org, bpf@vger.kernel.org, cgroups@vger.kernel.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 Subject: Re: [syzbot] [cgroups?] [mm?] WARNING in mem_cgroup_migrate Message-ID: <20231010142050.GA128254@cmpxchg.org> References: <0000000000001db97f06075bf98b@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0000000000001db97f06075bf98b@google.com> X-Spam-Status: Yes, score=5.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 07:21:19 -0700 (PDT) X-Spam-Report: * 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was * blocked. See * http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block * for more information. * [URIs: googleapis.com] * 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS * [2620:137:e000:0:0:0:3:0 listed in] [zen.spamhaus.org] * 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level * mail domains are different * -0.0 SPF_PASS SPF: sender matches SPF record * 2.5 SORTED_RECIPS Recipient list is sorted by address * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature * -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list * manager X-Spam-Level: ***** On Tue, Oct 10, 2023 at 05:37:43AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 7d730f1bf6f3 Add linux-next specific files for 20231005 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1716036e680000 > kernel config: https://syzkaller.appspot.com/x/.config?x=f532286be4fff4b5 > dashboard link: https://syzkaller.appspot.com/bug?extid=831ba898b5db8d5617ea > compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 > > Unfortunately, I don't have any reproducer for this issue yet. > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/1d7f28a4398f/disk-7d730f1b.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/d454d124268e/vmlinux-7d730f1b.xz > kernel image: https://storage.googleapis.com/syzbot-assets/dbca966175cb/bzImage-7d730f1b.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+831ba898b5db8d5617ea@syzkaller.appspotmail.com > > kernel_init+0x1c/0x2a0 init/main.c:1437 > ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 > ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 5208 at mm/memcontrol.c:7552 mem_cgroup_migrate+0x2fa/0x390 mm/memcontrol.c:7552 This is the earlier version of the hugetlb cgroup accounting patches that trigger on an uncharged hugetlbfs: 7547 /* 7548 * Note that it is normal to see !memcg for a hugetlb folio. 7549 * It could have been allocated when memory_hugetlb_accounting was not 7550 * selected, for e.g. 7551 */ 7552 VM_WARN_ON_ONCE_FOLIO(!memcg, old); It's been fixed in the revision that's in the latest next release: 7539 /* 7540 * Note that it is normal to see !memcg for a hugetlb folio. 7541 * For e.g, itt could have been allocated when memory_hugetlb_accounting 7542 * was not selected. 7543 */ 7544 VM_WARN_ON_ONCE_FOLIO(!folio_test_hugetlb(old) && !memcg, old); 7545 if (!memcg) 7546 return; > Modules linked in: > CPU: 1 PID: 5208 Comm: syz-executor.1 Not tainted 6.6.0-rc4-next-20231005-syzkaller #0 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 > RIP: 0010:mem_cgroup_migrate+0x2fa/0x390 mm/memcontrol.c:7552 > Code: f7 ff e9 36 ff ff ff 80 3d 84 b2 d1 0c 00 0f 85 54 ff ff ff 48 c7 c6 a0 9e 9b 8a 48 89 ef e8 0d 5c df ff c6 05 68 b2 d1 0c 01 <0f> 0b e9 37 ff ff ff 48 c7 c6 e0 9a 9b 8a 48 89 df e8 f0 5b df ff > RSP: 0018:ffffc90004b2fa38 EFLAGS: 00010246 > RAX: 0000000000040000 RBX: ffffea0005338000 RCX: ffffc90005439000 > RDX: 0000000000040000 RSI: ffffffff81e76463 RDI: ffffffff8ae96da0 > RBP: ffffea0001d98000 R08: 0000000000000000 R09: fffffbfff1d9db9a > R10: ffffffff8ecedcd7 R11: 0000000000000000 R12: 0000000000000000 > R13: 0000000000000200 R14: 0000000000000000 R15: ffffea0001d98018 > FS: 00007fc15e89d6c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 0000001b31820000 CR3: 000000007f5e1000 CR4: 00000000003506f0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > Call Trace: > > hugetlbfs_migrate_folio fs/hugetlbfs/inode.c:1066 [inline] > hugetlbfs_migrate_folio+0xd0/0x120 fs/hugetlbfs/inode.c:1049 > move_to_new_folio+0x183/0x690 mm/migrate.c:966 > unmap_and_move_huge_page mm/migrate.c:1428 [inline] > migrate_hugetlbs mm/migrate.c:1546 [inline] > migrate_pages+0x16ac/0x27c0 mm/migrate.c:1900 > migrate_to_node mm/mempolicy.c:1072 [inline] > do_migrate_pages+0x43e/0x690 mm/mempolicy.c:1171 > kernel_migrate_pages+0x59b/0x780 mm/mempolicy.c:1682 > __do_sys_migrate_pages mm/mempolicy.c:1700 [inline] > __se_sys_migrate_pages mm/mempolicy.c:1696 [inline] > __x64_sys_migrate_pages+0x96/0x100 mm/mempolicy.c:1696 > do_syscall_x64 arch/x86/entry/common.c:51 [inline] > do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:81 > entry_SYSCALL_64_after_hwframe+0x63/0xcd > RIP: 0033:0x7fc15da7cae9 > Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007fc15e89d0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000100 > RAX: ffffffffffffffda RBX: 00007fc15db9bf80 RCX: 00007fc15da7cae9 > RDX: 0000000020000340 RSI: 0000000000000080 RDI: 0000000000000000 > RBP: 00007fc15dac847a R08: 0000000000000000 R09: 0000000000000000 > R10: 00000000200003c0 R11: 0000000000000246 R12: 0000000000000000 > R13: 000000000000000b R14: 00007fc15db9bf80 R15: 00007ffd87d7c058 > > > > --- > 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. > > If the bug is already fixed, let syzbot know by replying with: > #syz fix: exact-commit-title #syz fix: next-20231010