Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5399112pxu; Thu, 22 Oct 2020 00:52:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqkYNVwopKdLp9XE9dEBEuXVYC5y/sO7DQFSdtcV9xKAAYTQzFnESRZeyiiH5r8+QFbASl X-Received: by 2002:a17:906:7e0e:: with SMTP id e14mr1067736ejr.238.1603353150451; Thu, 22 Oct 2020 00:52:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603353150; cv=none; d=google.com; s=arc-20160816; b=WdBRmZLUJusPhztxbjoeW6J2+6vz41Q50cVcK3xGxd+GzPROP03TTiFITvMoWGZfUV lfmwUjXa9cejOeq+WPv34z2eknnzbRi78HUW7LUNFqMId6V3/cjNTz36fkNoQbkdcPKb bWutMx4lLQBT5+b+yRWe6la3qsecolNosaDfC1NKg7gd7tRc4NVZ/spviuN8PB5lL3tA zrKsQvUhJ1/CfYspl2ld5KChOM3L/RP3kqTwHcyi5mRR/N0B+q3a25lycDn0vjgTH195 L6iWkBBI5f/E2F6FUlDnWLdXLNE0gqeSBGvFTaHZ/3BZcCh+DP2xXGRHlArwwFocdfxy SYiA== 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=QrzozL6sqW5vYMZtN3K+R9LE+6kDlJD77dyJBYxqbOI=; b=PYinAQ+wGF8aQW+Xfdp09OInZwCE13O3EdEedj+p42tJm+YkvLimHCmlrTN4L5pHYU 5fnXnecU6GqgdTN1Iu1UdISvb7aieNxzJmMoXN4xLfiAay5mQux0FKyf6JOlzm3CKOlB JEkjb5H3Vn25Ykly/OjY6hd+U3dYJJWZGSA+KYndKmbFV+R5j1w7KFX4ghGIrzOuB9bA +SfQr+S9eptjVADagzxGqJLuBFLULX1F57EvYUdqyb3F0p9wPnGeVCLymUHBZx0yGZDE KMG5N0fZ0ORZnxWxVQekbIEFge71qzdIQw8vK+hD+8Jl56MmetNPYJX3ZB+N2rtANcnf si7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gAQr0wgY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si367110eje.479.2020.10.22.00.52.08; Thu, 22 Oct 2020 00:52:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=gAQr0wgY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2894473AbgJVAtS (ORCPT + 99 others); Wed, 21 Oct 2020 20:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436950AbgJVAtS (ORCPT ); Wed, 21 Oct 2020 20:49:18 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E56DC0613CE; Wed, 21 Oct 2020 17:49:18 -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=QrzozL6sqW5vYMZtN3K+R9LE+6kDlJD77dyJBYxqbOI=; b=gAQr0wgYZsNoYp/Jxj6agcvDTx 515wMKDVLaZCnGYu1SuKbzHmqql9n3YgNNC05Hq053Ckz8OPZOOIuRYKTYzNz1bBa0XKHFVzBo06v BY+auv7WQdwFyc8/rR956Mb7tOflxn3F25od2XoCfxwYapp7OVEL5StjOLgOHgHMhBT3AWRv8oG1k pclENd55pZOwFHRzR3dueqwqHv6xVCO9jQAl2pkShBMGkO+cK15NpsZ1crZSzJGtbvsoBKC/EbNqa qe6wlh9cfBemaS/EMMK5qAmrUcwv1Wma502bIzvp7ctSSucnvbiVfIdxlO0Emlbn1L7YVWAUjQQWJ 6jZXS/xA==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVOmw-0007BB-RS; Thu, 22 Oct 2020 00:49:06 +0000 Date: Thu, 22 Oct 2020 01:49:06 +0100 From: Matthew Wilcox To: Qian Cai Cc: Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , linux-mm@kvack.org Subject: Re: kernel BUG at mm/page-writeback.c:2241 [ BUG_ON(PageWriteback(page); ] Message-ID: <20201022004906.GQ20115@casper.infradead.org> References: <645a3f332f37e09057c10bc32f4f298ce56049bb.camel@lca.pw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <645a3f332f37e09057c10bc32f4f298ce56049bb.camel@lca.pw> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 08:30:18PM -0400, Qian Cai wrote: > Today's linux-next starts to trigger this wondering if anyone has any clue. I've seen that occasionally too. I changed that BUG_ON to VM_BUG_ON_PAGE to try to get a clue about it. Good to know it's not the THP patches since they aren't in linux-next. I don't understand how it can happen. We have the page locked, and then we do: if (PageWriteback(page)) { if (wbc->sync_mode != WB_SYNC_NONE) wait_on_page_writeback(page); else goto continue_unlock; } VM_BUG_ON_PAGE(PageWriteback(page), page); Nobody should be able to put this page under writeback while we have it locked ... right? The page can be redirtied by the code that's supposed to be writing it back, but I don't see how anyone can make PageWriteback true while we're holding the page lock.