[PATCH 2/2] fbdev: fbmem: Fix double free of 'fb_info->pixmap.addr'

Sam Ravnborg sam at ravnborg.org
Sun Oct 10 07:57:40 UTC 2021


Hi Zheyu,

On Sun, Oct 10, 2021 at 06:42:28AM +0000, Zheyu Ma wrote:
> savagefb and some other drivers call kfree to free 'info->pixmap.addr'
> even after calling unregister_framebuffer, which may cause double free.
> 
> Fix this by setting 'fb_info->pixmap.addr' to NULL after kfree in
> unregister_framebuffer.

This is a nice general way to fix it that benefits all drivers.
Applied to drm-misc-next as this is not an urgent fix.

	Sam


More information about the dri-devel mailing list