From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,FROM_LOCAL_HEX, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C5AAC4338F for ; Mon, 9 Aug 2021 22:51:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B6FE660FDA for ; Mon, 9 Aug 2021 22:51:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B6FE660FDA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 096C96B0072; Mon, 9 Aug 2021 18:51:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 044ED6B0073; Mon, 9 Aug 2021 18:51:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E75ED8D0002; Mon, 9 Aug 2021 18:51:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id CB9026B0072 for ; Mon, 9 Aug 2021 18:51:23 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7AA32181FA8C0 for ; Mon, 9 Aug 2021 22:51:23 +0000 (UTC) X-FDA: 78457040046.26.4F94452 Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199]) by imf06.hostedemail.com (Postfix) with ESMTP id 36D8F801B0E1 for ; Mon, 9 Aug 2021 22:51:23 +0000 (UTC) Received: by mail-il1-f199.google.com with SMTP id x7-20020a92b0070000b0290223c30afe67so1705840ilh.21 for ; Mon, 09 Aug 2021 15:51:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:in-reply-to:message-id:subject :from:to:cc; bh=ar7510uPsZS2CDiJZAUudQtRn9csYi/4vAIPTZ+i4Us=; b=VSEXoyUo5ZLRhIsO3yJjO6AHB/jbv5nR/2rpj3K4E8ndwWYKA5Ca1S8YmNwqWHwwR0 J23DA56p//fFCG1YzIpfeTdsGPKx9VBCnr2yKVX2LoLkFGwhAKIn9x/rSyYHuK37D31m iC2IP0loVbaJuR8aqdAEDYFFklcO04XhBbkkH0V9F0ct2hqEmZbi4Q37Kv7R5LXC8KUb 4lhIs9Hi4AfFUFoakJNfqeVZU5ExfxbLULR7e6yIZO1Ex6cxkbzZUjmzRIkMp8FzHE/i wOlNlQiWTBYzgDBALAGKsCmk/loJtjEVFRtgEIjR61mnZZ5E5SXkS7MUGcXRR6f2r7/j fG+w== X-Gm-Message-State: AOAM530bwNNSMoBJiBCFFjI5hzKhbMvd2DSIkE1DvSPD4qmXkjvijxZJ C8YawDq9x/Zhm0KXsdtxiM65OTj2zAZNG1VULs7sKFKiMjNd X-Google-Smtp-Source: ABdhPJyWwg+XodjDCutfk8UULLv3kKlpbBwiMBoGdg54lYYRl5oHV1U1ybvHFx8fU08YtLmrSlffKjJIMM0khfAjLer/mhqw+sMi MIME-Version: 1.0 X-Received: by 2002:a6b:8ec6:: with SMTP id q189mr79318iod.169.1628549482694; Mon, 09 Aug 2021 15:51:22 -0700 (PDT) Date: Mon, 09 Aug 2021 15:51:22 -0700 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000006a51e205c928399f@google.com> Subject: Re: [syzbot] kernel BUG in find_lock_entries From: syzbot To: Matthew Wilcox Cc: akpm@linux-foundation.org, bp@alien8.de, frederic@kernel.org, hpa@zytor.com, jmattson@google.com, joro@8bytes.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mark.rutland@arm.com, masahiroy@kernel.org, mingo@redhat.com, npiggin@gmail.com, pbonzini@redhat.com, peterz@infradead.org, rafael.j.wysocki@intel.com, rostedt@goodmis.org, seanjc@google.com, sedat.dilek@gmail.com, syzkaller-bugs@googlegroups.com, tglx@linutronix.de, vitor@massaru.org, vkuznets@redhat.com, wanpengli@tencent.com, will@kernel.org, willy@infradead.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 36D8F801B0E1 Authentication-Results: imf06.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=appspotmail.com (policy=none); spf=pass (imf06.hostedemail.com: domain of 3arERYQkbACMRXYJ9KKDQ9OOHC.FNNFKDTRDQBNMSDMS.BNL@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com designates 209.85.166.199 as permitted sender) smtp.mailfrom=3arERYQkbACMRXYJ9KKDQ9OOHC.FNNFKDTRDQBNMSDMS.BNL@M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com X-Stat-Signature: c7z6ym6rg55e8f7netw9tra8i6pqcy1m X-HE-Tag: 1628549483-193170 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Mon, Aug 09, 2021 at 02:02:22PM -0700, syzbot wrote: >> The issue was bisected to: >> >> commit 997acaf6b4b59c6a9c259740312a69ea549cc684 >> Author: Mark Rutland >> Date: Mon Jan 11 15:37:07 2021 +0000 >> >> lockdep: report broken irq restoration > > That's just a bogus bisection. The correct bad commit is 5c211ba29deb. > >> kernel BUG at mm/filemap.c:2041! >> invalid opcode: 0000 [#1] PREEMPT SMP KASAN >> CPU: 1 PID: 24786 Comm: syz-executor626 Not tainted 5.14.0-rc4-syzkaller #0 >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 >> RIP: 0010:find_lock_entries+0x10d5/0x1110 mm/filemap.c:2041 > > This patch should fix it. It's not just removing the warning; this > warning duplicates the warning a few lines down (after taking the > lock). It's not safe to make this assertion without holding the page > lock as the page can move between the page cache and the swap cache. > > #syz test want 2 args (repo, branch), got 4 > > diff --git a/mm/filemap.c b/mm/filemap.c > index d1458ecf2f51..34de0b14aaa9 100644 > --- a/mm/filemap.c > +++ b/mm/filemap.c > @@ -2038,7 +2038,6 @@ unsigned find_lock_entries(struct address_space *mapping, pgoff_t start, > if (!xa_is_value(page)) { > if (page->index < start) > goto put; > - VM_BUG_ON_PAGE(page->index != xas.xa_index, page); > if (page->index + thp_nr_pages(page) - 1 > end) > goto put; > if (!trylock_page(page))