File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ config UDMABUF
42
42
config DMABUF_MOVE_NOTIFY
43
43
bool "Move notify between drivers (EXPERIMENTAL)"
44
44
default n
45
+ depends on DMA_SHARED_BUFFER
45
46
help
46
47
Don't pin buffers if the dynamic DMA-buf interface is available on
47
48
both the exporter as well as the importer. This fixes a security
@@ -52,6 +53,7 @@ config DMABUF_MOVE_NOTIFY
52
53
53
54
config DMABUF_DEBUG
54
55
bool "DMA-BUF debug checks"
56
+ depends on DMA_SHARED_BUFFER
55
57
default y if DMA_API_DEBUG
56
58
help
57
59
This option enables additional checks for DMA-BUF importers and
@@ -74,7 +76,7 @@ menuconfig DMABUF_HEAPS
74
76
75
77
menuconfig DMABUF_SYSFS_STATS
76
78
bool "DMA-BUF sysfs statistics"
77
- select DMA_SHARED_BUFFER
79
+ depends on DMA_SHARED_BUFFER
78
80
help
79
81
Choose this option to enable DMA-BUF sysfs statistics
80
82
in location /sys/kernel/dmabuf/buffers.
Original file line number Diff line number Diff line change @@ -962,6 +962,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
962
962
struct fb_var_screeninfo old_var ;
963
963
struct fb_videomode mode ;
964
964
struct fb_event event ;
965
+ u32 unused ;
965
966
966
967
if (var -> activate & FB_ACTIVATE_INV_MODE ) {
967
968
struct fb_videomode mode1 , mode2 ;
@@ -1008,6 +1009,11 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
1008
1009
if (var -> xres < 8 || var -> yres < 8 )
1009
1010
return - EINVAL ;
1010
1011
1012
+ /* Too huge resolution causes multiplication overflow. */
1013
+ if (check_mul_overflow (var -> xres , var -> yres , & unused ) ||
1014
+ check_mul_overflow (var -> xres_virtual , var -> yres_virtual , & unused ))
1015
+ return - EINVAL ;
1016
+
1011
1017
ret = info -> fbops -> fb_check_var (var , info );
1012
1018
1013
1019
if (ret )
You can’t perform that action at this time.
0 commit comments