Re: [PATCH v2 4/4] fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove

2022-05-05 Thread Javier Martinez Canillas
Hello Daniel, On 5/5/22 15:02, Daniel Vetter wrote: [snip] >> static void vesafb_destroy(struct fb_info *info) >> { >> struct vesafb_par *par = info->par; >> @@ -187,7 +191,13 @@ static void vesafb_destroy(struct fb_info *info) >> arch_phys_wc_del(par->wc_cookie); >> if (info->s

Re: [PATCH v2 4/4] fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove

2022-05-05 Thread Daniel Vetter
On Thu, May 05, 2022 at 01:31:27PM +0200, Javier Martinez Canillas wrote: > The driver is calling framebuffer_release() in its .remove callback, but > this will cause the struct fb_info to be freed too early. Since it could > be that a reference is still hold to it if user-space opened the fbdev. >

Re: [PATCH v2 4/4] fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove

2022-05-05 Thread Thomas Zimmermann
Am 05.05.22 um 13:31 schrieb Javier Martinez Canillas: The driver is calling framebuffer_release() in its .remove callback, but this will cause the struct fb_info to be freed too early. Since it could be that a reference is still hold to it if user-space opened the fbdev. This would lead to a

[PATCH v2 4/4] fbdev: vesafb: Cleanup fb_info in .fb_destroy rather than .remove

2022-05-05 Thread Javier Martinez Canillas
The driver is calling framebuffer_release() in its .remove callback, but this will cause the struct fb_info to be freed too early. Since it could be that a reference is still hold to it if user-space opened the fbdev. This would lead to a use-after-free error if the framebuffer device was unregist