mbox series

[0/2] fbdev: Fix a NULL pointer dereference in fb_release()

Message ID 20220502130944.363776-1-javierm@redhat.com
Headers show
Series fbdev: Fix a NULL pointer dereference in fb_release() | expand

Message

Javier Martinez Canillas May 2, 2022, 1:09 p.m. UTC
Hello,

This small series contains fixes for two bugs I found in fbmem.c, that may
explain a bug reported in the rpi4 [0] when using simplefb and vc4 drivers.

I was not able to reproduce the mentioned bug, but looking at the code I
think that it might explain the issue.

I've tested these patches in a rpi4 with both simplefb and vc4 drivers
built-in and did not find any regression.

[0]: https://github.com/raspberrypi/linux/issues/5011

Best regards,
Javier


Javier Martinez Canillas (2):
  fbdev: Check in file_fb_info() if the fb_info was already been freed
  fbdev: Make fb_release() return -ENODEV if fbdev was unregistered

 drivers/video/fbdev/core/fbmem.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)