From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 053524028F0 for ; Tue, 26 May 2026 14:54:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779807290; cv=none; b=L7kt9B73KsNJD31NtzGQJgQVx+mOSlJN7QXmyaVWDfiYmjok+gc6XhQavty4WT0G2Hv3YjvgWgoQDhayehdk+YSbcGdx5SC5R7aE29yFtlsYuyoT0KRBje6NzbxOMUMhS+9nGs71krbvKKbDq9p3hsqNF3htS2Gi4ceFsZC0wTc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779807290; c=relaxed/simple; bh=Q8vhFNckkJMTdupQpVlTxEr88o5tGrKGCVUdJfGdQ9E=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=T1DpOAMGo3djoYm/ETpwm98vvBorn+hmUTD6/tsWib9D7f1yPoNJPqjw9aPBssJ07Yd8zfFblXC8zjl72FAp8Qute10OXjrv0LG+r5svSxawQu8uPYZCTNtUkIyQsUJUxhsjay4X1zKs/+I21lG7OHWKi+30Y8TuDrp3vBeZlds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DeJM3QJJ; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DeJM3QJJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47F8E1F000E9; Tue, 26 May 2026 14:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779807288; bh=06L5SCeiHyhtjlUSRZFcTn8L92AVzkUKBwCUzeMt7cU=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=DeJM3QJJJrDqxLmlk1PZ+7gd9k1/0xWciaHngJWKxIi5no0Z8FcDcTFc/pwgwHLwG T2nKJAqIPgq17WLjhaC+VcVccqcWDggbp+7nuxa1r2Ri4R2ARfLih66jmVTGjqK5jc yQkS/uvquBkMlDLDUNnCwv0YlZYCNd3rCr9nGgYRYXvBdcTi2PdgUZI07nRjWULw4O JjcJptD/ucpDlxQb7NIaxaGC/U2UlV1NvzoiCE/IeovQGSpvR+wXa2bdG9m4+eWOGA HH7c0md8duEukRI/08LbmYfnST0BSLG0f4o3p3UnLZEbduEjGedpzNDDJ6ipVDSKeV cuaIULTgYXIVg== Message-ID: <6e123037-e677-4f6a-95cf-a065c646a602@kernel.org> Date: Tue, 26 May 2026 09:54:47 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1] ARM: socfpga: Fix OF node refcount leak in SMP setup Content-Language: en-US To: Yuho Choi , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260525024709.1336252-1-dbgh9129@gmail.com> From: Dinh Nguyen In-Reply-To: <20260525024709.1336252-1-dbgh9129@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Yuho, On 5/24/26 21:47, Yuho Choi wrote: > socfpga_smp_prepare_cpus() looks up the Cortex-A9 SCU node with > of_find_compatible_node(), which returns a node reference that must be > released with of_node_put(). > > The function maps the SCU registers and then returns without dropping > that reference, leaking the node on both the success path and the > of_iomap() failure path. > > Drop the reference once the mapping attempt is complete. The returned > MMIO mapping does not depend on keeping the device node reference held. > > Fixes: 122694a0c712 ("ARM: socfpga: use of_iomap to map the SCU") > Signed-off-by: Yuho Choi I'll add "Cc: stable@vger.kernel.org" here, but please remember to add this for future patches that have the Fixes tag. Thanks, Dinh