Files
linux-stable-mirror/drivers/video/fbdev
Chenyuan Yang 40f0a51f6c fbdev: imxfb: Check fb_add_videomode to prevent null-ptr-deref
[ Upstream commit da11e6a30e ]

fb_add_videomode() can fail with -ENOMEM when its internal kmalloc() cannot
allocate a struct fb_modelist.  If that happens, the modelist stays empty but
the driver continues to register.  Add a check for its return value to prevent
poteintial null-ptr-deref, which is similar to the commit 17186f1f90 ("fbdev:
Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var").

Fixes: 1b6c79361b ("video: imxfb: Add DT support")
Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:13:57 +02:00
..
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:08:23 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00
2024-10-15 10:07:32 +02:00