Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp276340rwb; Thu, 27 Jul 2023 12:32:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlEzq+ICV6+SQ6yW1UgrtnaCS/ThsfKauYXxeQJ9vMVHVUqAgQTHX3UZsHUlZKZpRghjUGrd X-Received: by 2002:a17:906:73d8:b0:993:d5bd:a757 with SMTP id n24-20020a17090673d800b00993d5bda757mr150529ejl.19.1690486375467; Thu, 27 Jul 2023 12:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690486375; cv=none; d=google.com; s=arc-20160816; b=I0IM1XAfaaaucZirXBPGl1d7P2scSvky5jjRi1BuM4mU19vSddxaHh+hN7Mpehn2Gm EiOWge6aEQWrFzElUVlLjLlUp1bUKbwvSRvQIjliJeN77TkhRcsLY3WCaYI++ON+Z56L Qm7RbsmxcEPlsmc8T1alMY8A2yTrS2RCHPw+vVmcnnpJ4n696Kyx52U9IpRbY4fBbS+s 1TVaNB7gXkqvsGK4jF/3t4JBHSU9zU/dA6jV3GIfXY35ZBzTLclQ/aZ6YYe36ib5PEID RK4whVcGWir9Mnab4zPSfpfTLZK+rqCnyI2JOnBbBiAnYHNWlI8N3URUjq+aCx+GJjA5 t4Iw== 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=mftvSSVwDcOe5K0U7hS294Xt1J2OKrrHIwMeWQQT6Ks=; fh=Lu8PEqYVxCsAAyQi5qyNos5PYQdVawfDCjMWYHNjbug=; b=QfAr5UT8SNoRqszJN3NXrM5l+7G7T4WURhddWVwVuXNvP+Abb3ANqdz0FMwcwpWCey 3UVbYWzs4gPwohXWGH77pomK/kC37xE0eSJMGAennJjY20uYWSEhEJTeD1pK2DErcb7i OhdU2px1Jm4t/5AOX8eAz1WV5mAcC4oHfQEUKwgQUShZjCoxns2nJJe2HmqK7VvaKkvp 4zeEKB3YaQ4teYneww1kmMLnIq8s1v1X/RkphJe3Iv+Sv4DAPE49Biqd3kXJm5NopDIK I8uzypSjbKsI38faO/lFjb8CNV2ZzOtT3WMnGlc96bqlNT2+lREozgm7UpCXreBuORkb hGTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=tMWDQtiU; 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 jo16-20020a170906f6d000b00992ac6d8893si1525615ejb.792.2023.07.27.12.32.28; Thu, 27 Jul 2023 12:32:55 -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=tMWDQtiU; 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 S231397AbjG0S4Z (ORCPT + 99 others); Thu, 27 Jul 2023 14:56:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbjG0S4Y (ORCPT ); Thu, 27 Jul 2023 14:56:24 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22B4BE47 for ; Thu, 27 Jul 2023 11:56:23 -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=mftvSSVwDcOe5K0U7hS294Xt1J2OKrrHIwMeWQQT6Ks=; b=tMWDQtiUGJpgDlpF3S7U6o1KY9 JYKtSpaA183F63l7Kgp9WUflGgKHQZR9uymSpooxgAaPt2EwH5NQQsS/EN4+ejDQamfGmZD8spSVc md3Xltr1X1PgyyPqCdsDTcBfqrn0WXLWL5EShzmG/TYuN0jhqzkA/Jhj9qGyMWBBry8k0F8krfgQB BqrMp9AKFK6iTDMsl6j/YPUlhqoi2lZzHoFY3K82eJrtEaghXb9xKBWkXZuhVPGEu1+qsu+/f1XbH jGtMRQkPl8Wtvf+Omuaq6CydhcPKIgkVLDgkqBnV9ZoECNU6U5pfycWrekk4iIcAOwLx3yn6E1M4S Xq+ZQxag==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qP69s-007mZw-6K; Thu, 27 Jul 2023 18:56:20 +0000 Date: Thu, 27 Jul 2023 19:56:20 +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 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next next-20230727 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.. */