From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6B3F44331F for ; Wed, 15 Jul 2026 11:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784113427; cv=none; b=rBiCegk00GU0n7RgOJ7b9ihqdKyIW/KLBGhFKNwmCjeqi3Su+i203WR50mBMpeEgy70iLmsh3Zfg5As83X9VTnfzSbmzrp3VAynSIrFz5kNAxL5suldma2uE8zlOPuDgkjHKVbjkvKPBOU3OldFSnfc0+pQ1SKICqcJ0zTaX3do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784113427; c=relaxed/simple; bh=J6H+FoeqiU5MQFbzUvf2h1acD2Gc0AUhstmNBmOjGho=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=hVG9P1Fmmg1Bkwijcm3Sj0aJVgqmw2BUO5c1ZCxHyglFNoNXy1boQw4+aN6BHlWT9CxGJPrZxBC/4AEdUL57Wrvh+txzSdzq5Rmd0akxcU3bE7MH0MrtopMzTf+/CiA3GFvuRtAFJGEu24ByIJeNrUQ+BK+9HTErT5isNAf2iVE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=i3lNIw2x; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="i3lNIw2x" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-493fa6e28a7so30319835e9.1 for ; Wed, 15 Jul 2026 04:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784113422; x=1784718222; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=dz86EwLqIg9rsRKy2+oVo0cZ8RAfDlpYQ8xyeR+GWfk=; b=i3lNIw2xeMpxYwYzM8naVyRgQp5PAXiLHUy9V2K3GirLBocN7FuHOV6gTAti6kTAKH G08pbVe0UvruAdcd13goBm1+Ztg2tTfSHAw3mUc6ze++QCSKQb42yIdcWdIfOi34kOGF DfpiMyE3/aDfd7MoFj5VZdI9LLsD5BjQhDKUU83SuHdWW2hUFh29iCisakKMfuppuYM9 EaPki2aK+TR0zt+PHgkYk5ku/e0wZJ5doD9fZPk9rfwbVAxL4ngGvp7+Mr5OvL6pAMtt qoC/bxOCSlhs9cRTS+yC6NSS6IFlqicq6nZeChJ/blBhdZXURLGZ2nKbaOTDAzCu0qP3 9goQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784113422; x=1784718222; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dz86EwLqIg9rsRKy2+oVo0cZ8RAfDlpYQ8xyeR+GWfk=; b=MTpY/I1u8KfAUnLa1T1VQzhprB0EGprzI4dRNiJezscjlTw4C0Dn+RgLxfWU4tDNzT yGUvvSpBqmHhOosBZkLke6CpdB3N160dkPhod95c4dLq+CV9TsXg64DlJMx3fU09TuUO 1ntGN+6SMrQz8vTvGb49rC8OPBe3d/R2DJJx9y9maNl2Yo5EzxHQ4IyWIdhHIHwtz6EZ utxwQ1nZKECYhuLoKb5KZoLUMH7qDTxa/xdbB03u2hj0uktXl0NBnnBjxKSwJkiIq8ka 6FgtlG4a80C/tlhNDs4IAhbEXboBvBUys4NRISxvTDQV4ZJQh2CW0swkcAmoYCt+A23Z xIfQ== X-Forwarded-Encrypted: i=1; AHgh+RrKndohhSVoowZqkVSw0+cyHVIWhgD81JYySt4CjoePlMdGx6OqOfrrglu7xYeYsVGznvfCIYCzmTXkjtU=@vger.kernel.org X-Gm-Message-State: AOJu0YwOv//TduVONln+1cW09WZ5NumAMd3uz7eCZWQxWPC+fAAQGsaL nFND8NdV82hV3xQfuZJEcelONjBJbS6BzpRyEXPfhoBWY7vhtNH6K7DoIXRxEPnh7VFiIyEz8U1 ZawDJtT4wu/LzXw== X-Received: from wmoh4.prod.google.com ([2002:a05:600c:3144:b0:490:b2a6:e6f5]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3e0d:b0:493:b499:3ef2 with SMTP id 5b1f17b1804b1-4953c299474mr25989985e9.37.1784113421736; Wed, 15 Jul 2026 04:03:41 -0700 (PDT) Date: Wed, 15 Jul 2026 11:03:21 +0000 In-Reply-To: <20260715-spin-trylock-followup-v3-0-fc4d246f705d@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260715-spin-trylock-followup-v3-0-fc4d246f705d@google.com> X-Mailer: b4 0.15.2 Message-ID: <20260715-spin-trylock-followup-v3-4-fc4d246f705d@google.com> Subject: [PATCH v3 4/4] mm/page_alloc: remove a couple of VM_BUG_ON()st From: Brendan Jackman To: Andrew Morton , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Waiman Long , Ridong Chen , Tejun Heo , "=?utf-8?q?Michal_Koutn=C3=BD?=" , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Mike Rapoport Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-rt-devel@lists.linux.dev Content-Type: text/plain; charset="utf-8" VM_BUG_ON() is out of favour and on the way to removal, since I recently touched alloc_pages_node_noprof() I am removing that invocation, and also removing the __folio_alloc_node_noprof() one for consistency. If this precondition is violated, the system will soon crash anyway. Suggested-by: Zi Yan Link: https://lore.kernel.org/all/7F866265-3F2E-4765-B9D4-9AB898A9C4AC@nvidia.com/ Acked-by: Zi Yan Signed-off-by: Brendan Jackman --- include/linux/gfp.h | 1 - mm/page_alloc.c | 1 - 2 files changed, 2 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 4d57e9c0bf204..872bc53f32ec8 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -255,7 +255,6 @@ static inline void warn_if_node_offline(int this_node, gfp_t gfp_mask) static inline struct folio *__folio_alloc_node_noprof(gfp_t gfp, unsigned int order, int nid) { - VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); warn_if_node_offline(nid, gfp); return __folio_alloc_noprof(gfp, order, nid, NULL); diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 25a83a57aab66..4c6815f84adc6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5427,7 +5427,6 @@ struct page *alloc_pages_node_noprof(int nid, gfp_t gfp_mask, unsigned int order if (nid == NUMA_NO_NODE) nid = numa_mem_id(); - VM_BUG_ON(nid < 0 || nid >= MAX_NUMNODES); warn_if_node_offline(nid, gfp_mask); return __alloc_pages_noprof(gfp_mask, order, nid, NULL, ALLOC_DEFAULT); -- 2.54.0