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 DFF5C364931; Wed, 30 Sep 2026 16:44:27 +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=1790786668; cv=none; b=nJqPCpWEMPwjJEOKKB+U7ljtcxiYe5KmwHBfYgMqUlU+rTEgdgIAUPxV7TE0hl9m8EbJqoQpgQ+14uPUofO5oUIXyE8HACj3bpVVK1voDBj79WuTJ4m9+K1qJcGKp97HgiNC4+thvVPegq74V36ZaWcDOr7oDxOZsK9jb5yXyRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790786668; c=relaxed/simple; bh=bk6sPfJGBnYw1kYbLZ0zyoFgXymlItkX2dm6eyFWkj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AvIP6tikDydFF+vM6PuG2aSw9La3EPGH1yGBhaknOBWkK6VSUDPxQNPy3X0t5vY3YONtcJ8qJ9WAiBJ7zupkEuPf2CjLTS6j+g3mtlVhWDsOSr9ni74yOYmzbRtz+QHhK+f+khNvcEcAUpKyEdq5YVkqzwX1YC3JxlVh4az+Rvs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=j6OXFPgF; 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="j6OXFPgF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44C5B1F000FF; Wed, 30 Sep 2026 16:44:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790786667; bh=xLQKfORjlCyVdTuCfHr2Ea2BU0KbUvd2OzFYcINUwfM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=j6OXFPgFoWYwrnxG6wyFB/L97nTf3WqUPMxOnuKwTUytqpeOzWAP5KyB1fbYBRXVN tr0KXViSXjsAgOWDqHrcJBDO9/m2lSbDIfwiA08rJB/86gZfcxETNYsXFaHVdY4Uji cCZqO8X/1HKtU5Y8IHAy6lS9kZTy6WlRjYRFPdzc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Wentao Liang , Lyude Paul Subject: [PATCH 6.1 944/982] drm/nouveau: Fix bridge reference leak in nv1a_ram_new() Date: Wed, 30 Sep 2026 17:28:00 +0200 Message-ID: <20260930152437.015240212@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@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.1-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); }