mirror of
https://github.com/torvalds/linux.git
synced 2026-09-28 20:12:01 +02:00
drm/nouveau: Fix bridge reference leak in nv1a_ram_new()
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: 2fa6d6cdaf ("drm/nouveau: deprecate pci_get_bus_and_slot()")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20260916180036.2090118-1-vulab@iscas.ac.cn
This commit is contained in:
parent
1fca688e94
commit
67b4411538
|
|
@ -51,6 +51,8 @@ nv1a_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user