aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/cpu.c
diff options
context:
space:
mode:
authorChenyuan Yang <[email protected]>2025-07-24 03:25:34 +0000
committerHelge Deller <[email protected]>2025-07-27 17:56:51 +0000
commitda11e6a30e0bb8e911288bdc443b3dc8f6a7cac7 (patch)
treef1409108f47118965dcaf8d772a16c9903e21c32 /rust/helpers/cpu.c
parentfbdev: svgalib: Clean up coding style (diff)
downloadkernel-da11e6a30e0bb8e911288bdc443b3dc8f6a7cac7.tar.gz
kernel-da11e6a30e0bb8e911288bdc443b3dc8f6a7cac7.zip
fbdev: imxfb: Check fb_add_videomode to prevent null-ptr-deref
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 17186f1f90d3 ("fbdev: Fix do_register_framebuffer to prevent null-ptr-deref in fb_videomode_to_var"). Fixes: 1b6c79361ba5 ("video: imxfb: Add DT support") Signed-off-by: Chenyuan Yang <[email protected]> Signed-off-by: Helge Deller <[email protected]>
Diffstat (limited to 'rust/helpers/cpu.c')
0 files changed, 0 insertions, 0 deletions