From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 18066266568; Wed, 12 Nov 2025 20:24:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762979088; cv=none; b=OhCIB2yqHgz3qB0obX6B2iB6qaeqXVe8DWd3T4JbkAvb/ydRkyAY9dbMg9Tetvbaw0neAT1sRPbgaCX2bZh3YgqIZoCKETG9kCQL2bXbfVJRQ1G7T1zFI8oJ9Aek8yae4fUKNwZ1ZAW6RqPCbpiQGs0o3m+dxIwTId9TxFPFAuE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762979088; c=relaxed/simple; bh=TW9NSBuZC0pCuqNjfj0PDRPjYM0/XDdyBFkYzlhTUz4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=O4urPvFt2zIhfjXXBYwjr9zPXBFE9yTZUx2PYgp/CDraMgu8geF7aIcSKMhmV5dqE6DNfT2xYrNAs9gi/9qJatYRUkKcVQ2+p9D5J8Tgoe/5zdtppFevgdLfWRxAMtitxwGdN86WcgNKmZ8S/9hekSzaSKAehG74Zg/Z/HltGMA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=MMV7TwLQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="MMV7TwLQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F883C4CEF1; Wed, 12 Nov 2025 20:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1762979087; bh=TW9NSBuZC0pCuqNjfj0PDRPjYM0/XDdyBFkYzlhTUz4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=MMV7TwLQJIgxVHH9Jfnn46TzH8kkfNaH3YCBvwOtvaROgcrfmaOqvv1Qxyj2a9TSq d59+NX27bhJounNl3b67AuiZlrcIpp9Pcs/XTM8FabyhC4qlmByxyR1JDVPmcsFkgf 8YB4+GRYweYr9seeG6OE4aQ5UMPKXUBln5Ehofag= Date: Wed, 12 Nov 2025 12:24:46 -0800 From: Andrew Morton To: "Liam R. Howlett" Cc: Suren Baghdasaryan , Vlastimil Babka , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Lorenzo Stoakes , Shakeel Butt , Jann Horn , stable@vger.kernel.org, syzbot+131f9eb2b5807573275c@syzkaller.appspotmail.com Subject: Re: [PATCH] mm/mmap_lock: Reset maple state on lock_vma_under_rcu() retry Message-Id: <20251112122446.e1f2c037550dc591a4d6b307@linux-foundation.org> In-Reply-To: References: <20251111215605.1721380-1-Liam.Howlett@oracle.com> <8219599b-941e-4ffd-875f-6548e217c16c@suse.cz> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 11 Nov 2025 21:18:19 -0500 "Liam R. Howlett" wrote: > > Prior to commit 0b16f8bed19c ("mm: change vma_start_read() to drop RCU > > lock on failure"), vma_start_read() would drop rcu read lock and > > return NULL, so the retry would not have happened. However, now that > > vma_start_read() drops rcu read lock on failure followed by a retry, > > we may end up using a freed maple tree node cached in the maple state. > > Yes, sounds good. > > Andrew, can you make this change and also drop Cc stable tag? Done. > This needs to be a hot fix, as Vlastimil said earlier. Yup.