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 1C52534846A for ; Sun, 3 May 2026 11:49:52 +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=1777808993; cv=none; b=nzenrpvXmScI9v6N3B+0j25M5Zvs9lM7L1sUVXgFpFBNl1ZUjY3caDvtucKidz3B1jxDZExHG5lXo9lhh4Wn0tfjbxqkYdF8HF5SGq3D9WeRTzZncO5hHYK5mL9YVgDhN3ujrX+ykokeE2IRToGZsuIp0R0ofq47C3Bay7UtAXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777808993; c=relaxed/simple; bh=VvywJ5Uv7e98Fm+SAfGynw4EaVrBk6ga4+LS+lNz/X4=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=oFQhN0Ad+LZ9N7y4VzxCZ2ul6uvU2jOOIjALBWZvQnOAKvZG3hGZaWR9YI7qkUpKK3b4NoUT5KVFA34yyW2JVRAMw0mnmPyVwssKSNvZ8SqGGlNo1ULd9Rhpz1g+wHUm998/QzRA5TCWBvZScwLbwermBjrS/4ECeaKSv/suLCY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=07fGq9Oe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="07fGq9Oe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63EF3C2BCB4; Sun, 3 May 2026 11:49:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777808992; bh=VvywJ5Uv7e98Fm+SAfGynw4EaVrBk6ga4+LS+lNz/X4=; h=Subject:To:Cc:From:Date:From; b=07fGq9OebYJr1cZeMXUeMoXn5Q45jefxiTwuMGtCYH036R09wzgeuQZdcq0yHO9k1 IlW8VRxb/fEFrq5iwfxK6rJgAStNQqN9nF3tNLHMuaqLTj6NbJaSlL9jDwoxxf/Xso 6tThuR9SfMgjllEo28zb9o8P5O8+M/pcLsScGF3A= Subject: FAILED: patch "[PATCH] mm/vmalloc: take vmap_purge_lock in shrinker" failed to apply to 6.12-stable tree To: urezki@gmail.com,akpm@linux-foundation.org,baoquan.he@linux.dev,chenyichong@uniontech.com,stable@vger.kernel.org Cc: From: Date: Sun, 03 May 2026 13:49:50 +0200 Message-ID: <2026050349-operation-curled-2359@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x ec05f51f1e65bce95528543eb73fda56fd201d94 # git commit -s git send-email --to '' --in-reply-to '2026050349-operation-curled-2359@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ec05f51f1e65bce95528543eb73fda56fd201d94 Mon Sep 17 00:00:00 2001 From: "Uladzislau Rezki (Sony)" Date: Mon, 13 Apr 2026 21:26:46 +0200 Subject: [PATCH] mm/vmalloc: take vmap_purge_lock in shrinker decay_va_pool_node() can be invoked concurrently from two paths: __purge_vmap_area_lazy() when pools are being purged, and the shrinker via vmap_node_shrink_scan(). However, decay_va_pool_node() is not safe to run concurrently, and the shrinker path currently lacks serialization, leading to races and possible leaks. Protect decay_va_pool_node() by taking vmap_purge_lock in the shrinker path to ensure serialization with purge users. Link: https://lore.kernel.org/20260413192646.14683-1-urezki@gmail.com Fixes: 7679ba6b36db ("mm: vmalloc: add a shrinker to drain vmap pools") Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Baoquan He Cc: chenyichong Cc: Signed-off-by: Andrew Morton diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 61caa55a4402..676851d5cfe7 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -5416,6 +5416,7 @@ vmap_node_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) { struct vmap_node *vn; + guard(mutex)(&vmap_purge_lock); for_each_vmap_node(vn) decay_va_pool_node(vn, true);