Re: [PATCH] fbdev: Use helper to get fb_info in all file operations

2022-05-03 Thread Javier Martinez Canillas
Hello Sam, On 5/3/22 19:14, Sam Ravnborg wrote: > Hi Javier, > [snip] >> >> int fb_deferred_io_fsync(struct file *file, loff_t start, loff_t end, int >> datasync) >> { >> -struct fb_info *info = file->private_data; >> +struct fb_info *info = fb_file_fb_info(file->private_data); >

Re: [PATCH] fbdev: Use helper to get fb_info in all file operations

2022-05-03 Thread Sam Ravnborg
Hi Javier, On Tue, May 03, 2022 at 06:46:16PM +0200, Javier Martinez Canillas wrote: > A reference to the framebuffer device struct fb_info is stored in the file > private data, but this reference could no longer be valid and must not be > accessed directly. Instead, the file_fb_info() accessor

[PATCH] fbdev: Use helper to get fb_info in all file operations

2022-05-03 Thread Javier Martinez Canillas
A reference to the framebuffer device struct fb_info is stored in the file private data, but this reference could no longer be valid and must not be accessed directly. Instead, the file_fb_info() accessor function must be used since it does sanity checking to make sure that the fb_info is valid.