]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fbdev: defio: Keep module reference from VMAs
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 24 Feb 2026 08:25:55 +0000 (09:25 +0100)
committerHelge Deller <deller@gmx.de>
Mon, 9 Mar 2026 12:06:48 +0000 (13:06 +0100)
commitd460a54fd321997a3a4703816cfb8fb4a520af29
tree982ee2aed33e1b289ff83ce615bed1cf63b5f50b
parent9ded47ad003f09a94b6a710b5c47f4aa5ceb7429
fbdev: defio: Keep module reference from VMAs

Acquire a module reference on each mmap and VMA open; hold it until
the kernel closes the VMA. Protects against unloading the module
while user space still has a mapping of the graphics memory. The
VMA page-fault handling would then call into undefined code.

This situation can happen if the underlying device has been unplugged
and the driver has been unloaded. It would then be possible to trigger
the bug by unloading the fbdev core module.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/core/fb_defio.c