Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp332603rwb; Thu, 27 Jul 2023 13:31:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlEpKcza50Afj0qdkjmQtDt0Vv2ugWjTwfeMJ251qAKVo9Ek1HjJsBu1+J2nK2jnYFHESZQI X-Received: by 2002:a17:906:5daa:b0:98c:df38:517b with SMTP id n10-20020a1709065daa00b0098cdf38517bmr210243ejv.33.1690489892957; Thu, 27 Jul 2023 13:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690489892; cv=none; d=google.com; s=arc-20160816; b=bVgshjy8PXx8VJJeaN0pY7IcXH74hpWqsufe3FuL4qefDUfWqxRPbNZeKZEODi7CeQ t9PJF5UgtKwLPLKcUhOFrPks8RcAH9Eebyexg0JapmZ7Qux8ImUm+Xo9U1LgKpn6YY/S 7jP3qJqMN0AwlD3+epa/EbWeDr3IuCn3fONGy6kqH5H4WZy+4awqyk9DKPQKj/SL5/wH n7vqn8Hlk9ALj04AdbzCWh0Q7fe328ozsYUIZbRefoEeNXqqD5DvflkkTAJLPNY35jpI 8xsB05KkQBQlvH+IiKFU0nYt+I/nSwLY92l74y0YCxz8Fx+kdw8yonKe021QgpyhegJN KwhQ== 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=OGaxUnsaNE7ojPpCXwzAVb69Blku+f4LZSFLg2JK47E=; fh=Lu8PEqYVxCsAAyQi5qyNos5PYQdVawfDCjMWYHNjbug=; b=RCgkPmVChwZZPxRI69fs7nhBrvTdSNzOLtpj0bea1HAaZG9InXipJ+EgJvA2p7abV9 bw7lcWuDRohrVkkYzkDix323Vx+8i77wTrR7Rg73BIDZMnTmcN/KVY00x/sb//DALUd3 3DKw2ohUG7piw1i/pVCHCoByHRkrymxuVlsVQU4l8A83s+eY4hEQMBxReGgzqdscyDb7 mNhY5qoDU+ZiSVJRYFhDrsu20Ec8WaSF3vRR6hHtChlXFyaamNFHU2kEpNzvwqx2EMyp koVrdpvzVm0fN0DTgM2NZ4iY/dkuMNeAsgf4WEVR7iR6jjZpbtdtSdNNkk7JDqZKo6vS DRfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jogN2VFK; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f9-20020a170906138900b0099bd8bc3fa2si1513261ejc.530.2023.07.27.13.31.08; Thu, 27 Jul 2023 13:31:32 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=jogN2VFK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231836AbjG0SxS (ORCPT + 99 others); Thu, 27 Jul 2023 14:53:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231429AbjG0SxF (ORCPT ); Thu, 27 Jul 2023 14:53:05 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4685319A7 for ; Thu, 27 Jul 2023 11:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OGaxUnsaNE7ojPpCXwzAVb69Blku+f4LZSFLg2JK47E=; b=jogN2VFKloiT/mNQrJzt2nk5mM q8wO5F9WcwdrfSfdfTb8E7EbyzZikHHkAec2gpMXny0zIH78btqu3i8bPie4LWsyX9CHbDbtFZatA VHUb1CTEQPXwid29lNysyrXAsjEpEhfiMGqInRiHYzfq2xoTQX+ONgOYL4kHJApJFQ3A5t1yPaFVh fcqdLsSHtg2fCv/KdUCwT5yCwDLbTwQ3xEXTX7UaWootHnp1yUTaNCP8XX82caFLMgPnGwpfj3Dmb jNiYpKoh/+Dk0N1603biI3Q9+nX23C/3s10Tpvucj/AIseuW+jUA1cQHxqm/PjCkovl/tIiJB5UjX +lqCVrnw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qP66d-007mOY-MR; Thu, 27 Jul 2023 18:52:59 +0000 Date: Thu, 27 Jul 2023 19:52:59 +0100 From: Matthew Wilcox To: syzbot Cc: akpm@linux-foundation.org, liam.howlett@oracle.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [mm?] WARNING: suspicious RCU usage in mas_walk (2) Message-ID: References: <000000000000607ff905ffc8e477@google.com> <0000000000000aeb7f06015e5cbd@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0000000000000aeb7f06015e5cbd@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, Jul 25, 2023 at 11:57:22PM -0700, syzbot wrote: > syzbot has bisected this issue to: > > commit a52f58b34afe095ebc5823684eb264404dad6f7b > Author: Matthew Wilcox (Oracle) > Date: Mon Jul 24 18:54:10 2023 +0000 > > mm: handle faults that merely update the accessed bit under the VMA lock > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1783585ea80000 > start commit: [unknown] > git tree: linux-next #syz test linux-next a52f58b34afe095ebc5823684eb264404dad6f7b diff --git a/mm/memory.c b/mm/memory.c index 20a2e9ed4aeb..57b271108bdc 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3567,6 +3567,12 @@ static vm_fault_t do_wp_page(struct vm_fault *vmf) return 0; } copy: + if ((vmf->flags & FAULT_FLAG_VMA_LOCK) && !vma->anon_vma) { + pte_unmap_unlock(vmf->pte, vmf->ptl); + vma_end_read(vmf->vma); + return VM_FAULT_RETRY; + } + /* * Ok, we need to copy. Oh, well.. */