diff options
| author | Myeonghun Pak <mhun512@gmail.com> | 2026-09-14 20:54:47 -0400 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-09-15 09:19:34 +0200 |
| commit | bbc472d08ae751cae5d6c0030d2c6cd7592c5e9b (patch) | |
| tree | 8f3f83791de038dbfe47a79ff1b41e27feae14dc | |
| parent | 24bebfdb76ecdf52ebe63cba4cf5913dbce3439d (diff) | |
| download | linux-next-bbc472d08ae751cae5d6c0030d2c6cd7592c5e9b.tar.gz linux-next-bbc472d08ae751cae5d6c0030d2c6cd7592c5e9b.zip | |
fbdev: nvidia: Release write-combining handle on probe failure
Failures in nvidia_set_fbinfo() or register_framebuffer() leave the handle
from arch_phys_wc_add() allocated. Release it in the shared error path,
as nvidiafb_remove() already does on normal removal.
The missing cleanup was already present in the initial Git import,
when the driver used mtrr_add() directly.
This issue was identified during our ongoing static-analysis research
while reviewing kernel code.
Cc: stable@vger.kernel.org
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
| -rw-r--r-- | drivers/video/fbdev/nvidia/nvidia.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c index 4ef7a5ba43cc..395f5d0455fa 100644 --- a/drivers/video/fbdev/nvidia/nvidia.c +++ b/drivers/video/fbdev/nvidia/nvidia.c @@ -1423,6 +1423,7 @@ static int nvidiafb_probe(struct pci_dev *pd, const struct pci_device_id *ent) return 0; err_out_iounmap_fb: + arch_phys_wc_del(par->wc_cookie); fb_destroy_modelist(&info->modelist); err_out_free_base1: fb_destroy_modedb(info->monspecs.modedb); |
