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 49F212686BC; Tue, 8 Apr 2025 12:19:25 +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=1744114765; cv=none; b=FYw8ATaZCUFxotLVfeMo21z59yUEY2yWnXDeVNtOjya4+9AN1Xq6eJqhjcuaSF1a8bC0yGm3o0LzJMstD6LBv5CgvmMFKpBVUOsgIioL0Aa/QJERiOoEhbHCKi3xygEw3ttdYDfmjNF79NmcWNwozROzjUgdxguMW5PBzXVYx4E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744114765; c=relaxed/simple; bh=n1++BejQaiEtu2Sa2N8jjCSjJBlMcuiQc32ZVM0pDwc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OeSLeyB4Tf/vDKLU0nIQn3ofAgUQQ8UREz13uJ30/dp+6Qs5nJ9ue8vppgXkfm8ufaITZUQs04g9XG3JuGLjRImd2q/n5pp1443FEliOGxc1Owz1nJVnCgK2yWAzzj4Aq2c4ndiY5vf7Xd6msfTocokSi4EuGsCyHC5wqYKAR48= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zgLEc/CH; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zgLEc/CH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE3FDC4CEE7; Tue, 8 Apr 2025 12:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744114765; bh=n1++BejQaiEtu2Sa2N8jjCSjJBlMcuiQc32ZVM0pDwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zgLEc/CHq9/DciCKbTSY56btohad9F2ueoeQAlKKdoByfsk1eXQlOhV3o1aPBv+Kk zQHcmJYjPCJ5sNejkVuGrVIaL7lNgsMbfMSAEWqXOv3/KB2mCAItSG9WSg7aNezMl0 QN6jX+uruh1ps7hlLjPsk7ox/FNK3UqAZ7fUFs+o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Joe Hattori , Krzysztof Kozlowski , Vinod Koul , Sasha Levin Subject: [PATCH 6.13 210/499] soundwire: slave: fix an OF node reference leak in soundwire slave device Date: Tue, 8 Apr 2025 12:47:02 +0200 Message-ID: <20250408104856.445485703@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104851.256868745@linuxfoundation.org> References: <20250408104851.256868745@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joe Hattori [ Upstream commit aac2f8363f773ae1f65aab140e06e2084ac6b787 ] When initializing a soundwire slave device, an OF node is stored to the device with refcount incremented. However, the refcount is not decremented in .release(), thus call of_node_put() in sdw_slave_release(). Fixes: a2e484585ad3 ("soundwire: core: add device tree support for slave devices") Signed-off-by: Joe Hattori Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20241205034844.2784964-1-joe@pf.is.s.u-tokyo.ac.jp Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/soundwire/slave.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index 4869b073b11c2..d2d99555ec5a5 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -13,6 +13,7 @@ static void sdw_slave_release(struct device *dev) { struct sdw_slave *slave = dev_to_sdw_dev(dev); + of_node_put(slave->dev.of_node); mutex_destroy(&slave->sdw_dev_lock); kfree(slave); } -- 2.39.5