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 7FAD951E447; Wed, 30 Sep 2026 17:31:16 +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=1790789477; cv=none; b=hnQoC+5Cvv+vfGbotwGlWigVDnOD5DSunifxSjpYm0Zo2NGd0gP7piu2NgwWOeKBufbn9c8hjRKGalzaYzCh+v/O8aRCCLmJEgOKenlDf4XLJnJbpqeAvv361I71W59SLJ0RV5x7aP6jjtmO17MDtQIzmgCsdlaDeRNgQOabOlA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790789477; c=relaxed/simple; bh=zm8/OER4qTdhA9vLcoGZA+R2PVMV957psOYYBD+X0DM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LRZLw6q0F/dVL3FRNb6aie0jtES+9WRUvxNJ8dQs+WFjEx3SBulyVck0R45DX91ocgdfbpu+VUAfEr5ckJRYvqwq9ORnDuYo1hbxUMJu1HoGsI98WfwRLQt6kkqckhEWadZR/BiQeOVNU0AuKkdOb8QR4QJZ3hW85jrUtrLwRDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QhfhN0JS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QhfhN0JS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA1271F000FF; Wed, 30 Sep 2026 17:31:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790789476; bh=+m3N9X6hZIfO9dUoEAUb3rn7b/u03GHUpsve33epi/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QhfhN0JSdEcs2wgOj8m0nG/wP91mwzc7tNKzZLJ2D56vQTCCnrxOMYuiYHrlsiZ5Y NLHla8cxcedvlXELOzWYWFnsIe9Hgumw5U5Y+ZV0eY+yGmvxQbDGhoLt+8oarLfi5T bux8I0BbQH35eJZtmlYYUsUHPc20QnDBf78IJq8o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Lyude Paul Subject: [PATCH 6.12 489/877] drm/nouveau: Fix bridge reference leak in nv1a_ram_new() Date: Wed, 30 Sep 2026 17:23:20 +0200 Message-ID: <20260930152425.212893250@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152414.738996857@linuxfoundation.org> References: <20260930152414.738996857@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wentao Liang commit 67b4411538c8341692548429d43256f25be99f7a upstream. pci_get_domain_bus_and_slot() takes a reference to the PCI device, which is never released once the memory size has been read from its config space. Drop the reference before returning. Fixes: 2fa6d6cdaf283c05 ("drm/nouveau: deprecate pci_get_bus_and_slot()") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patch.msgid.link/20260916180036.2090118-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv1a.c @@ -51,6 +51,8 @@ nv1a_ram_new(struct nvkm_fb *fb, struct mib = ((mem >> 4) & 127) + 1; } + pci_dev_put(bridge); + return nvkm_ram_new_(&nv04_ram_func, fb, NVKM_RAM_TYPE_STOLEN, mib * 1024 * 1024, pram); }