From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CB13C00A5A for ; Tue, 17 Jan 2023 23:48:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbjAQXr6 (ORCPT ); Tue, 17 Jan 2023 18:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbjAQXrU (ORCPT ); Tue, 17 Jan 2023 18:47:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5133E4A1C6 for ; Tue, 17 Jan 2023 14:55:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E34A661518 for ; Tue, 17 Jan 2023 22:55:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 159F0C433D2; Tue, 17 Jan 2023 22:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1673996133; bh=ruz2A/4YTpx7OPy42aBIYAuAK+3AVNnrNmXTqZhAjSw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=y/ZuQQ+p4hfhGFe69OrMaDXIxXOokePloiIt8MOIBxTvN/X+vyXL5rhQec1Pzm04+ gcdtWeEbgYuzL8dWjHGim2Y0ieXi8BTCLiW1odv162eAAjFcLBfLHRL7mXCbQ9w9mF yXOz2S3kJUauib96LWDIOZtj1rULvC2hyVwYNOA4= Date: Tue, 17 Jan 2023 14:55:32 -0800 From: Andrew Morton To: Jann Horn Cc: "Kirill A. Shutemov" , "Zach O'Keefe" , linux-kernel@vger.kernel.org, David Hildenbrand , Yang Shi , linux-mm@kvack.org Subject: Re: [PATCH] mm/khugepaged: Fix ->anon_vma race Message-Id: <20230117145532.94132510f8bc538d5465fd43@linux-foundation.org> In-Reply-To: References: <20230111133351.807024-1-jannh@google.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Jan 2023 20:12:49 +0100 Jann Horn wrote: > On Wed, Jan 11, 2023 at 2:33 PM Jann Horn wrote: > > If an ->anon_vma is attached to the VMA, collapse_and_free_pmd() requires > > it to be locked. retract_page_tables() bails out if an ->anon_vma is > > attached, but does this check before holding the mmap lock (as the comment > > above the check explains). > > @akpm please replace the commit message with the following, and maybe > also add a "Link:" entry pointing to > https://lore.kernel.org/linux-mm/CAG48ez3434wZBKFFbdx4M9j6eUwSUVPd4dxhzW_k_POneSDF+A@mail.gmail.com/ > for the reproducer. Done, thanks.