From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796149257; b=OKroFUkpMER7bS/XY/ZQxM+Dlw6KPiqog7rl9OlJMTL/FXnNfIlzGwdrEDl1W6RrHCdE 7l6j0laEcJGA/d1oGSmhc0+2CqoiCNzxpjTPVgq+h0D1KvvHr/E/ERaGi+VKOnrHbqZRS kD5S1iJK8UGI25caZuydfQzct7wOZhWnJemW6ka4Tr6UwJBjpWPctEG8jKlmlND+9DVkp BTeN1UwFw3ONBGVQXpNaGVV7RrvpJ4UUe6SfTC4mhvdliM1BQg/pw8AIRbvpHDtmdobbY l/q6huIIZG0V1Tov12BANiBTnOlYqH/dNz0GZsC48MONOB/9InsBGp+T/hl8V2tfpEQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796149257; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=d4bH+ryVyioMabalAKnaFEv/NbIsCZ95VynSsr5Igio=; b=eKpstw7jzdnPcGy5PLv6L3yLb607wScpXUG3Haji6e6Sj9m5bav7vxB/GMg5jgWD+TEl BPOylP9ZFYdhwDMzPrnQgsf5SG6Vl2YHLnXhE711uMmzX4ECyfslSbZlwSQin0uUK0oyW s2ulUZX0/8xlTzm0gm4XMNZFOINbNsl4MK27j59Mlzz1urPSeCyzeLz/H9tOUCrAyVnFx f0KLGsdkvBVdlVTfN3Km8EDizhU6GIbCIP+wOLvaNqPt48NnKoR8n6XVK0XNM646L5wJr Zmi5JbQmRCoGCrNttBTHXQ4t33PmpFGmOaBAnhJcjCzAhV6tSoAnjTnZ0MVqHmWEZjQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b="LeFN/efP"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BDDA606A31A; Tue, 1 Dec 2026 18:20:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=LeFN/efP Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3798A1F000C1; Tue, 1 Dec 2026 18:20:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796149257; bh=d4bH+ryVyioMabalAKnaFEv/NbIsCZ95VynSsr5Igio=; h=Date:To:From:In-Reply-To:References:Subject; b=LeFN/efP4mO16dRcKqCCZodTfl+PnKwlwf8rhzlz34fIitDutlxljuieun2DGjdwC 2GSTWJphJBs22Qbbxe8BTJZ3YVy4QDS1hRLJSmfizBP2qJ7SYE1l28wuY1zIbLJQCh sVKA/rtqIHH4s1AHKI/tnW4wSIAmJxzzLdLdUsMo= Date: Tue, 01 Dec 2026 10:20:56 -0800 To: mm-commits@vger.kernel.org,stable@vger.kernel.org,david@kernel.org, baoquan.he@linux.dev,urezki@gmail.com,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20261026102503.30860-1-urezki@gmail.com> References: <20261026102503.30860-1-urezki@gmail.com> Subject: [to-be-updated] mm-vmalloc-bail-out-if-in-softirq-context.patch removed from -mm tree Message-Id: <20261201182057.3798A1F000C1@smtp.kernel.org> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list The quilt patch titled Subject: mm/vmalloc: bail out if in softirq context has been removed from the -mm tree. Its filename was mm-vmalloc-bail-out-if-in-softirq-context.patch This patch was dropped because an updated version will be issued ------------------------------------------------------ From: "Uladzislau Rezki (Sony)" Subject: mm/vmalloc: bail out if in softirq context Date: Mon, 26 Oct 2026 11:25:03 +0100 vmalloc() is not allowed to be invoked from the NMI, hard-irq and softirq contexts because doing so may deadlock on internal locks. Commit 04aa71da5f35 ("mm/vmalloc: do not trigger BUG() on BH disabled context") replaced the deprecated in_interrupt() macro with explicit in_nmi() and in_hardirq() checks, but unintentionally dropped the softirq context check. Example: vzalloc() in a task spin_lock(&vn->busy.lock) <------ Hard irq irq_exit() process softirq on the same CPU vmalloc() spin_lock(&vn->busy.lock) spins forever Restore the check by checking the caller's context with the in_serving_softirq() helper. Note that, it is still allowed to invoke vmalloc() with disabled bottom halves. Replace BUG_ON() with WARN_ON_ONCE() for in_nmi() and in_hardirq() case. Link: https://patch.msgid.link/20261026102503.30860-1-urezki@gmail.com Fixes: 04aa71da5f35 ("mm/vmalloc: do not trigger BUG() on BH disabled context") Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: David Hildenbrand (Arm) Cc: mm/vmalloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/mm/vmalloc.c~mm-vmalloc-bail-out-if-in-softirq-context +++ a/mm/vmalloc.c @@ -3266,7 +3266,13 @@ struct vm_struct *__get_vm_area_node(uns struct vm_struct *area; unsigned long requested_size = size; - BUG_ON(in_nmi() || in_hardirq()); + /* IRQ re-entrancy -> irq_exit() -> process softirq. */ + if (in_serving_softirq()) + return NULL; + + if (WARN_ON_ONCE(in_nmi() || in_hardirq())) + return NULL; + size = ALIGN(size, 1ul << shift); if (unlikely(!size)) return NULL; _ Patches currently in -mm which might be from urezki@gmail.com are mm-vmalloc-use-dedicated-unbound-workqueues-for-vmap-drain.patch