From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 1B626348C66 for ; Wed, 22 Jul 2026 06:19:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784701156; cv=none; b=BejCdTi7P+NxlkG2v0O7AY8yh4mjrUX7IHFrMCWD7KMUduCgbEW2RPfjTQZQD+ZMmB33FMkr63JVCm1u2SV4nkTOd/Q23HDtQkpAfmBuhy6E40iqGHNSHdJIoVap0+TUwhvQaQsM9/1dgp07/4chE/Ipz1CK6Di1gDyjDsTZ8TA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784701156; c=relaxed/simple; bh=GGiX++7YAUJeyvCrXZm01phSETb13inLegYM7jjxggU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nCMO+TH9y3EW7kciZz42CePfcNQ1K8QeZwa39YS+HVTmaaGckKtbcqGfBoV7SPiowEup146SMTLyQGehDgqp4gCdi0h4Nw0yW2n+ZZsitSphhbQ5VzsunW7EiVYUyPTtdyktWNRMD0AmchMVbBGDgfkAZJaZ/Bib6mMyisHHvY4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=oiJXS3Rv; arc=none smtp.client-ip=95.215.58.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="oiJXS3Rv" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784701150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sBd1yNpCs6DEPDiy6QcCkhl56XpCygWXGY0ZmzMftW8=; b=oiJXS3RvBmLpkZ70nE/CNG3Ili7NzzGOWR5nSd9eF7xCldoEix/xiKw9+pfYK9hOcCjz3X O4ccwmjZPXzo0kzzBonMYDy5a3aLhVhFyCz+onuvBBKWrbERF2RPPXYSfndNWIAHNquZ+t WLcVpTGTZYjXE56y+jkUHpkmCw4XzSY= From: Hongfu Li To: akpm@linux-foundation.org Cc: cgroups@vger.kernel.org, hannes@cmpxchg.org, hongfu.li@linux.dev, lihongfu@kylinos.cn, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, muchun.song@linux.dev, roman.gushchin@linux.dev, shakeel.butt@linux.dev Subject: Re: [PATCH] mm/memcg: check kzalloc_node() return in memcg1_init() Date: Wed, 22 Jul 2026 14:18:26 +0800 Message-ID: <20260722061826.43420-1-hongfu.li@linux.dev> In-Reply-To: <20260721171351.ec213c13afab38b89c14f849@linux-foundation.org> References: <20260721171351.ec213c13afab38b89c14f849@linux-foundation.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT > > rtpn = kzalloc_node(sizeof(*rtpn), GFP_KERNEL, node); > > + if (!rtpn) > > + continue; > > > > rtpn->rb_root = RB_ROOT; > > rtpn->rb_rightmost = NULL; > > Thanks. We assume that mamory allocations cannot fail within __init > code. Because if they do, the kernel has some ghastly problem and it > cannot possibly run. Understood, thanks for the clarification. I'll drop this patch. Best regards, Hongfu