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 A7E0E368D42 for ; Thu, 14 May 2026 09:48:14 +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=1778752094; cv=none; b=CjMVLFmZvbJ7w5FwTTdGqMKmMJnacOpuQ4jZfpMgr8UhlYtL3m4mABalbG0w1ooz3B9wO2jGbpLNUZTRqfvcMdSkxtjHwcqpmurSdZv3FOfDjIP87oRITMQbcAXQiQVP1G7VeZnIHrxdZYcGqY9TWpBpnI0hKhrz61dk7bblXVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778752094; c=relaxed/simple; bh=AEHi4W1KYEHg5rYUZUzuQLRkxgrazZRzZEYJFbF7s0M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RTDZxaBueGMA+k95lryGLivm/wORU9A2sRetSIqtluWud2JBu1Ko1I/NYDO4h6YXbmaSodxNMIq+uWf/NFBpy3tcFpnxPlGwP+UPEl8dKyYLZjkp6k1XP/84xPHyurQabaK9+X+wRuIjc/7B1ccVm8LprHiivALNaX8aWLGxAj8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N5P1tf1z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N5P1tf1z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6D0FC2BCB3; Thu, 14 May 2026 09:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778752094; bh=AEHi4W1KYEHg5rYUZUzuQLRkxgrazZRzZEYJFbF7s0M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=N5P1tf1zc+VnBLRoPwRM0m3YsEvODOJnOvibUMU1l4XpRtPV282SDJZ/UzrQ3pqPc sra/P9xVOfTy9VyMXR/GpDCQFisxTIkZl+lLttjCwKB7BWkSQd7VH8LzyKTSgh+8a8 1yqPznsu3JPJ4zbSyyQIXfsW26ci1DRpAagv94golItxIAVrIv5itLSNpLtFPUqLnI 8Ajw3u/npObg+junqsF6VXGIxHcIZ9+3g7svaveRjlPk3yVJORvtWjB22ftzparr9P oqEL46psrgIebXIqi+FqLw0TVULOEIn4fVex7e5CsUsj8eaN+xy1anVuvUMEq/BhMZ G3IGWGDHLjcbQ== Date: Thu, 14 May 2026 10:48:11 +0100 From: Lorenzo Stoakes To: Andrew Morton Cc: Muchun Song , Oscar Salvador , David Hildenbrand , Jann Horn , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH mm-hotfixes] mm/hugetlb: avoid false positive lockdep assertion Message-ID: References: <20260513085658.45264-1-ljs@kernel.org> 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-Disposition: inline In-Reply-To: <20260513085658.45264-1-ljs@kernel.org> Hi Andrew, Could you apply the below fix-patch to this? I had forgotten to account for the !CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING case. Thanks, Lorenzo ----8<---- >From e7f25943f72bfa224508ffe2bff526d3daab23fb Mon Sep 17 00:00:00 2001 From: Lorenzo Stoakes Date: Thu, 14 May 2026 10:45:38 +0100 Subject: [PATCH] fixup Signed-off-by: Lorenzo Stoakes --- mm/hugetlb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index cfb7cb2e9806..4b3849d9a3f3 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -118,6 +118,9 @@ static int hugetlb_acct_memory(struct hstate *h, long delta); static void hugetlb_vma_lock_free(struct vm_area_struct *vma); static void hugetlb_vma_lock_alloc(struct vm_area_struct *vma); static void __hugetlb_vma_unlock_write_free(struct vm_area_struct *vma); +static int __huge_pmd_unshare(struct mmu_gather *tlb, + struct vm_area_struct *vma, unsigned long addr, pte_t *ptep, + bool check_locks); static void hugetlb_unshare_pmds(struct vm_area_struct *vma, unsigned long start, unsigned long end, bool take_locks); static struct resv_map *vma_resv_map(struct vm_area_struct *vma); @@ -6971,6 +6974,13 @@ pte_t *huge_pmd_share(struct mm_struct *mm, struct vm_area_struct *vma, return NULL; } +static int __huge_pmd_unshare(struct mmu_gather *tlb, + struct vm_area_struct *vma, unsigned long addr, pte_t *ptep, + bool check_locks) +{ + return 0; +} + int huge_pmd_unshare(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long addr, pte_t *ptep) { -- 2.54.0