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 F27DE36308B; Sun, 12 Apr 2026 17:59:40 +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=1776016781; cv=none; b=jMEziKeEsFRgrAOHWDVntBlEdiuYAL1/KngQJ1ctBkFzTIFDchl5VntW+RXm64RCgAMnv0sRMYsCzW0T9lVuQN9twHMPVLiXBug3c5+IoshnKjhQ5Bt8sZ7bPyIvvQ91rMQJwORZ5NlB2tB14yCrqhvlrncND8td09NaJ893tj4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776016781; c=relaxed/simple; bh=exVNphoftEq/DGXatpQR/6gB/O9CtE8L96Kx+D2XufI=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=jZkloBHuLwHcw/aek6lhEt9FiEoxXMelRCh9RPTwRKYhkwo3X+jstKzAxVokg1furzbt1Sk4vb0WPYanX5mip/rJ18v5Xl5UN3mE0FZyFF3d9/SMuvGVAUEMLhu7H7rWiEfh/X5PwnP9u9MafGBOxJoyJO2yycD9K/H+huCNqGk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=vX5UrLSP; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="vX5UrLSP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85AA4C19424; Sun, 12 Apr 2026 17:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1776016780; bh=exVNphoftEq/DGXatpQR/6gB/O9CtE8L96Kx+D2XufI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vX5UrLSPnARMXIX/mQM4uvVK8eB3MjSMjjqX7C0qIf7l5+GlOdecSGatxLiVysej4 UiFvVcaKGLgtzPXekd868HrxInxdfvChWUWJ1uQg7G5aBmNOCYUAFTKXj5RpDsQiCC HXWEYedmXBXK+9QGKMUNHwqteybGaznIrdeox5kI= Date: Sun, 12 Apr 2026 10:59:34 -0700 From: Andrew Morton To: Zi Yan Cc: Lance Yang , lgs201920130244@gmail.com, david@kernel.org, lorenzo.stoakes@oracle.com, baolin.wang@linux.alibaba.com, Liam.Howlett@oracle.com, npache@redhat.com, ryan.roberts@arm.com, dev.jain@arm.com, baohua@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: thp: Fix refcount leak in thpsize_create() error path Message-Id: <20260412105934.50892a9988df0403c209c886@linux-foundation.org> In-Reply-To: <75F536FE-6710-4AE7-B6DB-2997D846237E@nvidia.com> References: <20260411062152.2092967-1-lgs201920130244@gmail.com> <20260411142858.85496-1-lance.yang@linux.dev> <848180C7-F98C-44B2-AB1F-579BF9EEA28E@nvidia.com> <3e688ea1-05ba-4e75-9d92-2751ff6f3b7b@linux.dev> <75F536FE-6710-4AE7-B6DB-2997D846237E@nvidia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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-Transfer-Encoding: 7bit On Sun, 12 Apr 2026 09:33:29 -0400 Zi Yan wrote: > > wording, especially: > > > > "resulting in a refcount leak and potentially leading to a use-after-free" > > > > The old code does skip the required kobject cleanup path, but is > > a UAF actually possible there? > > That is my question too. The original code might not cause any real issue. > > Guangshuo, let us know if we get it wrong. Thanks. Thanks, all. I queued this for testing and added a note that a changlog update is expected.