drm-misc-next-fixes for v5.15:

- Make some dma-buf config options depend on DMA_SHARED_BUFFER.
 - Handle multiplication overflow of fbdev xres/yres in the core.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAmE5xMwACgkQ/lWMcqZw
 E8NQbQ//c5+SsAlaU53S/1vV/8UG25g7OEzlQrcrBTskwuGMbtVJGW1NbcgNChwg
 NQopniuni59pqHYawrcxJiIOEzJWVl62Uhbzokw3BCrPNUQFxFylA+sL59r2i5iJ
 g7FutB1vGuHvIySyQTWcqEj/hp/1gemIaeDw910bploQV6Kf2WE1WX5G5s6O+Je3
 5KUsZUUGDarhdDUNfXCMCSuv3yvY6EBDOhHwF6Hlr/jBQyVJUibB9RrT6zIHDpw8
 e0FDoDcgy6SpGE5pwYRrkRhHum1nKN8vh3EPfxUFU4rEjIyOyL6J3mtSojb4qr7H
 I0hrq3x/FK30bD5uqc+2zep7Nuovtcj0wLd/Td4Ef0ZHQ6t6qWx4eKjexkThwt7N
 BEYM6Nl9IbIdSLiEGlcTqpqjw2UHIlwybxqHq5WDq6N+FUb2YjCWHx1lJdCZQ+78
 jt0Q4vKPdi/aihRsfPRp+kLZ38583NL+AjQrtQ1rnoQkN4m+xSFdd4KkTOLe+D5Q
 ABnxXSUpnQzO+RpBCCUm/YSRt+5yHSfT7idVfSxfsh3v0DI6K/z0qF21QIa9sL0t
 Pbk3CI3C66kB9W0itRRPBosfAEEOzSzV1Z6GPyqybsg+V0mdImu7SGsEZMh4skdO
 lhpCrT3eNLM05MlLKdRjHcpFQsp5Q/Gd78JdYDMUx6nwA/NhUkU=
 =3vZr
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-next-fixes-2021-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next

drm-misc-next-fixes for v5.15:
- Make some dma-buf config options depend on DMA_SHARED_BUFFER.
- Handle multiplication overflow of fbdev xres/yres in the core.

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/37c5fe2e-5be8-45c3-286b-d8d536a5cef2@linux.intel.com
This commit is contained in:
Dave Airlie 2021-09-10 14:18:33 +10:00
commit b011522c8a
2 changed files with 9 additions and 1 deletions

View File

@ -42,6 +42,7 @@ config UDMABUF
config DMABUF_MOVE_NOTIFY
bool "Move notify between drivers (EXPERIMENTAL)"
default n
depends on DMA_SHARED_BUFFER
help
Don't pin buffers if the dynamic DMA-buf interface is available on
both the exporter as well as the importer. This fixes a security
@ -52,6 +53,7 @@ config DMABUF_MOVE_NOTIFY
config DMABUF_DEBUG
bool "DMA-BUF debug checks"
depends on DMA_SHARED_BUFFER
default y if DMA_API_DEBUG
help
This option enables additional checks for DMA-BUF importers and
@ -74,7 +76,7 @@ menuconfig DMABUF_HEAPS
menuconfig DMABUF_SYSFS_STATS
bool "DMA-BUF sysfs statistics"
select DMA_SHARED_BUFFER
depends on DMA_SHARED_BUFFER
help
Choose this option to enable DMA-BUF sysfs statistics
in location /sys/kernel/dmabuf/buffers.

View File

@ -962,6 +962,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
struct fb_var_screeninfo old_var;
struct fb_videomode mode;
struct fb_event event;
u32 unused;
if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
@ -1008,6 +1009,11 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
if (var->xres < 8 || var->yres < 8)
return -EINVAL;
/* Too huge resolution causes multiplication overflow. */
if (check_mul_overflow(var->xres, var->yres, &unused) ||
check_mul_overflow(var->xres_virtual, var->yres_virtual, &unused))
return -EINVAL;
ret = info->fbops->fb_check_var(var, info);
if (ret)