Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp887038rdg; Wed, 11 Oct 2023 08:11:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqG7LVaILZ3RNgYGB9IzGLTSWiTUnd94tx7DlJpzc0NvqMamb4h8e76nUulh6QGnMbTOhf X-Received: by 2002:a05:6a00:1d09:b0:692:6417:728a with SMTP id a9-20020a056a001d0900b006926417728amr21408583pfx.14.1697037102089; Wed, 11 Oct 2023 08:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697037102; cv=none; d=google.com; s=arc-20160816; b=MNXWshrxxTtz06cDoR1+Ik5CsYej9A+QVZcA04fSIdhAFUVIGgHQIJiLcMvxjEWjES KzJ4lKnqi9/lCP+r500xyXbABRr8RfmF/+XbQhoPjF9L5gg0M9wAloKfZatjCiHMjrX2 jLF7boWLP3xCbVbTyU9H4bwvCKyaqvFnLFdIYP+SPsgVX8+CYXei23nGcRtqcHtkwaof tNqvVWryPn0ZU6Ihcbnauj3p7m+MbFtdEJNg0LurnjrAer2ls2Kk68KXQhBpmnrkee2O j142jU24nJ+P3XvcQW1IRo2BIAqGGRTBwi6HG9QadirkEJ5GvQA07mOpDFbPlgkz1b0H NE2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Ysq39f+RxeDX0QxC2g4cZxAZIgMWhz132Glg6XcD8zQ=; fh=vZPEcc2Ue1Mjbe6eAazTgeyFABKNGluzTpSHo8Xe3z4=; b=BIRNudKXm6IIJza/JCLfNJE0poDQ0GFjqG9vq6z0yCGgNENmZEmuW/5iQ+cVr3QGD+ hw23DHnbotJZzXFVaPoZm4w60qr6ihOalAaYl8yDvFpGiNBqKHtSEyjfuQxxIj/nJL4n NOHrRvTJ69ZOPZUF49RusuBxo/F5uliViKu+mBJ0FVOxgUYF9dDjZU0qxKs9A3LktB5y p3xADTC5d676hj5ezbJmy0ZtWY+DHe9KyZtMCXAa9X8UcRjbDT2GvA3VhP9bkHoZgJ8r cccSbCMVMJ36lDjuhW/Dv4Pd/rHR1bhFA9U6BMMjt6BifRqGukNhR/8nILDyCm7bFzGA ZJyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1+XlyBtv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s16-20020a63af50000000b005a1d88169casi384303pgo.189.2023.10.11.08.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 08:11:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=1+XlyBtv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 113EE80AD093; Wed, 11 Oct 2023 08:11:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232748AbjJKPLW (ORCPT + 99 others); Wed, 11 Oct 2023 11:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232659AbjJKPLV (ORCPT ); Wed, 11 Oct 2023 11:11:21 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F00C2B0 for ; Wed, 11 Oct 2023 08:11:18 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1c9d4f08d7cso60195ad.0 for ; Wed, 11 Oct 2023 08:11:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1697037078; x=1697641878; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ysq39f+RxeDX0QxC2g4cZxAZIgMWhz132Glg6XcD8zQ=; b=1+XlyBtvlLoKGwmtBONU4oGiB3nbY3ZkaSIc6DrJsXlozmjgauAuKB9/VfZmP279Lf NmAjve4A+YsfP9P3x6Z6zeayx0TRWAMEiaItASA9rStC442xFjhlEFSlcXibhZDgTY7T FUEiml5OhDE8rX2RWqCE45O5FWG3eOaSkyOm5f7Giay9w+DbxxmE+1vXOBvUzBHFIEnd s3c0Xm7LqupOXFobMF8SKpdwEmSdVavv80w1LSncTxuvq7kzNvI+HzEg9eINhGIm7Ncp 6oUJhPvc2JfvOc0jKPLovblnh88XWRVQFsAnVov4ip9ZDoiZtU7TGrKR9qfitlGaGeaD FEkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697037078; x=1697641878; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ysq39f+RxeDX0QxC2g4cZxAZIgMWhz132Glg6XcD8zQ=; b=F/Vb9ujUclX6ubW4z22Pl07R5ebSrE9ZJpQvrz/ZBqUFaiMDkwPqkuT1G3YccHqcOx zFiWXgmjy1LnyjJr7BbV0giU15lWOzATiTPJyvDxm0/d2RDNTNMpwZf4r0yKTmsOAubO IMa954UXpU0eb6r3SJn1Ov6SxLvnMuNNV3rpUFjtrt5XeWVPH00y2d2pp0McEmRkNMtG 3frktiJ/I/uOlxXgcWv5On324th6Bs8dRud1mx9zTmEy+ZiRImCbgT6ou5EiCEorTVh/ qwSspMIvThV8yb9do2/Q4OQzJykU0Zos1JICwz/jGRITyUGH3/vZHBmzqoEcWf34Ko1w M8bQ== X-Gm-Message-State: AOJu0Ywvh9/CMkYBAsxioejDMVq9lhMFh/oCkpIqcxPoiF8w8ZSR7u/G Hem+RT0vQF3sJ3TJpzPC4t6nclQPdbRVPwVQbIdRcQ== X-Received: by 2002:a17:902:c641:b0:1c7:47ca:f075 with SMTP id s1-20020a170902c64100b001c747caf075mr197756pls.15.1697037078136; Wed, 11 Oct 2023 08:11:18 -0700 (PDT) MIME-Version: 1.0 References: <0000000000001db97f06075bf98b@google.com> <20231010142050.GA128254@cmpxchg.org> In-Reply-To: <20231010142050.GA128254@cmpxchg.org> From: Aleksandr Nogikh Date: Wed, 11 Oct 2023 17:11:06 +0200 Message-ID: Subject: Re: [syzbot] [cgroups?] [mm?] WARNING in mem_cgroup_migrate To: Johannes Weiner Cc: syzbot , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 11 Oct 2023 08:11:33 -0700 (PDT) On Tue, Oct 10, 2023 at 4:20=E2=80=AFPM Johannes Weiner wrote: > > 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 fol= io. > 7549 * It could have been allocated when memory_hugetlb_accou= nting 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 fol= io. > 7541 * For e.g, itt could have been allocated when memory_hug= etlb_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-202310= 05-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:00000000000= 00000 > > 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 > Thanks for sharing the info and updating the issue! If there's no fixing commit (the faulty series is dropped or replaced), it's better to just invalidate the report: #syz invalid Otherwise, as in this case, syzbot would start looking for the "next-20231010" commit (and won't find it because it's a tag) and, after some time, start complaining that no such commit is reachable from any of the master branches of the tested trees. --=20 Aleksandr