Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7046513rdb; Wed, 3 Jan 2024 02:49:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjcQGCXI9/gM7r9Anl+kgNQqL2EX/U2L2wGHQy1rO/nZwtUaCycZgWL5eheUCl2U4pafSM X-Received: by 2002:a17:907:718d:b0:9e3:fbab:e091 with SMTP id zv13-20020a170907718d00b009e3fbabe091mr5240169ejb.15.1704278984422; Wed, 03 Jan 2024 02:49:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704278984; cv=none; d=google.com; s=arc-20160816; b=CIY5zQkbN6zIZsM6crlcSijTq0ofug78A5sG7L4lzwTpKv1u2xPs/AztsIETWjTcnQ eWbJlEZE1C1oUAMo+0VFdgvbTZper/o3VRAwD2ekPAurfx5KMg1p0Wg5WGCl5/fT2ux/ 7gXaGCUac0b7N/f/HF8WXamAR3yILGy/bWLNNAhIQaNHek+OO+KynEhd1jhayKdttwI8 znbPWwY13u2OuKsRePEFmY7rF4SaAoAAskMzAjGpKhjhxNNpJhG13NxMTiwMyNg55+Qv 8Iu6AHBQ02q8dfv3Als2qGIRCOR6HxSZ+rOIcF2eP4V3M4z6xbNIV+5IyqH5PAOt/XrP odVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=uPXXGZLs5IIgEZFBg2tw2MQtwvdpYyw829YihYX2Wpo=; fh=9E48kTFwclmSO8TcqRIv6Wby2EsVvfwXPxpyACCtUVg=; b=e9xoQcm9RS6uBBRW+bkWeQH2XZ0nUdN1B5t7JdQcMGEeD5Lyw4UrsOL2+RsVoVqM7P BbsQ9ISzbqWlhMoiTruMibpLzu7zCfqG8O22whvz0oIYBHcZ0lWSqntrzqVWf4bcv+mM +2vbKXPczWrmUxILMllQdZxj3RLYrqHbzh0KXPZYbA8Ywm5/RvGiG66O8v/PZG3EXB6z aHTHExLdUIfJA08Q2XLrVjTO7DGZ/C+Qr0IBpwEe1dvSSWgicyQjOQxeXLr+BDLT1WSj kn06sip6FQCoyjughxa1QNfniO8PIzwRUhiwD8Iu+DMSzQzSCNCq4Ml53l3iSJ0DdYJh dVOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15408-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lm3-20020a170906980300b00a27c5d135c3si3264337ejb.855.2024.01.03.02.49.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 02:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-15408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15408-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2EBF01F22B9A for ; Wed, 3 Jan 2024 10:49:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D57F418E07; Wed, 3 Jan 2024 10:49:33 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail115-79.sinamail.sina.com.cn (mail115-79.sinamail.sina.com.cn [218.30.115.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D12C18C2A for ; Wed, 3 Jan 2024 10:49:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sina.com X-SMAIL-HELO: localhost.localdomain Received: from unknown (HELO localhost.localdomain)([113.88.51.3]) by sina.com (10.75.12.45) with ESMTP id 65953BAD00004F0F; Wed, 3 Jan 2024 18:49:20 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com Authentication-Results: sina.com; spf=none smtp.mailfrom=hdanton@sina.com; dkim=none header.i=none; dmarc=none action=none header.from=hdanton@sina.com X-SMAIL-MID: 77753331457868 X-SMAIL-UIID: CDA513BA0B8741509C75670EC74D7D86-20240103-184920-1 From: Hillf Danton To: Matthew Wilcox Cc: Genes Lists , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: 6.6.8 stable: crash in folio_mark_dirty Date: Wed, 3 Jan 2024 18:49:07 +0800 Message-Id: <20240103104907.2657-1-hdanton@sina.com> In-Reply-To: References: <8bb29431064fc1f70a42edef75a8788dd4a0eecc.camel@sapience.com> <20231231012846.2355-1-hdanton@sina.com> <20240101015504.2446-1-hdanton@sina.com> <20240101113316.2595-1-hdanton@sina.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, 1 Jan 2024 14:11:02 +0000 Matthew Wilcox > > From an mm point of view, what is implicit is that truncate calls > unmap_mapping_folio -> unmap_mapping_range_tree -> > unmap_mapping_range_vma -> zap_page_range_single -> unmap_single_vma -> > unmap_page_range -> zap_p4d_range -> zap_pud_range -> zap_pmd_range -> > zap_pte_range -> pte_offset_map_lock() > > So a truncate will take the page lock, then spin on the pte lock > until the racing munmap() has finished (ok, this was an exit(), not > a munmap(), but exit() does an implicit munmap()). > But ptl fails to explain the warning reported, while the sequence in __block_commit_write() mark_buffer_dirty(); folio_mark_uptodate(); hints the warning is bogus.