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

2022-05-04 Thread Javier Martinez Canillas
Hello Thomas, On 5/4/22 13:08, Thomas Zimmermann wrote: [snip] >>> So something similar to fb_file_fb_info() is needed to check if >>> the vm_private_data is still valid. I guess that could be done >>> by using the vmf->vma->vm_file and attempting the same trick that >>> fb_file_fb_info() does

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

2022-05-04 Thread Thomas Zimmermann
Hi Am 04.05.22 um 12:55 schrieb Daniel Vetter: On Wed, May 04, 2022 at 11:28:07AM +0200, Javier Martinez Canillas wrote: Hello Daniel, On 5/4/22 11:02, Daniel Vetter wrote: On Tue, May 03, 2022 at 10:19:34PM +0200, Javier Martinez Canillas wrote: A reference to the framebuffer device struct

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

2022-05-04 Thread Daniel Vetter
On Wed, May 04, 2022 at 11:28:07AM +0200, Javier Martinez Canillas wrote: > Hello Daniel, > > On 5/4/22 11:02, Daniel Vetter wrote: > > On Tue, May 03, 2022 at 10:19:34PM +0200, Javier Martinez Canillas wrote: > >> A reference to the framebuffer device struct fb_info is stored in the file > >>

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

2022-05-04 Thread Javier Martinez Canillas
Hello Daniel, On 5/4/22 11:02, Daniel Vetter wrote: > On Tue, May 03, 2022 at 10:19:34PM +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

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

2022-05-04 Thread Thomas Zimmermann
Hi Am 04.05.22 um 11:02 schrieb Daniel Vetter: On Tue, May 03, 2022 at 10:19:34PM +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.

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

2022-05-04 Thread Daniel Vetter
On Tue, May 03, 2022 at 10:19:34PM +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 function must

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

2022-05-04 Thread Javier Martinez Canillas
Hello Thomas, On 5/4/22 10:15, Thomas Zimmermann wrote: > Hi > > Am 03.05.22 um 22:19 schrieb 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.

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

2022-05-04 Thread Thomas Zimmermann
Hi Am 03.05.22 um 22:19 schrieb 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

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

2022-05-03 Thread Sam Ravnborg
On Tue, May 03, 2022 at 10:19:34PM +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 function must

[PATCH v2] 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.