[PATCH] fbdev: sstfb: Fix potential divide by zero

2025-06-13 Thread Alex Guo
Variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in sstfb_check_var. Similar crashes have happened in other fbdev drivers. We fix this by checking whether 'pixclock' is zero. Signed-off-by: Alex Guo --- drivers/video/fbdev/sstfb.c |

[PATCH] fbdev: sstfb: Fix potential divide by zero

2025-06-13 Thread Alex Guo
Variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in sstfb_check_var. Similar crashes have happened in other fbdev drivers. We fix this by checking whether 'pixclock' is zero. Signed-off-by: Alex Guo --- drivers/video/fbdev/sstfb.c |

[PATCH] fbdev: sm501: Fix potential divide by zero

2025-06-13 Thread Alex Guo
lock' is zero. Similar commit: commit 16844e58704 ("video: fbdev: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/sm501fb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm501fb.

[PATCH] fbdev: i740: Fix potential divide by zero

2025-06-13 Thread Alex Guo
"video: fbdev: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/i740fb.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/i740fb.c b/drivers/video/fbdev/i740fb.c index 9b74dae71472..861e9e397b4e 100644 -

[PATCH] fbdev: i810 Fix potential divide by zero

2025-06-13 Thread Alex Guo
imilar commit: commit 16844e58704 ("video: fbdev: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/i810/i810_dvt.c | 2 ++ drivers/video/fbdev/i810/i810_gtf.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/video/fbdev

[PATCH] fbdev: Fix potential divide by zero

2025-06-13 Thread Alex Guo
: fbdev: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/acornfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c index f0600f6ca254..2dc0e64137e5 100644 --- a/drivers/vi

[PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-08 Thread Alex Guo
ecking whether 'pixclock' is zero. Similar commit: commit 16844e58704 ("video: fbdev: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/pm3fb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/pm3fb.c

[PATCH] fbdev: via: Fix potential divide by zero

2025-06-13 Thread Alex Guo
Variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in viafb_dvi_set_mode. Similar crashes have happened in other fbdev drivers. We fix this by checking whether 'pixclock' is zero. Signed-off-by: Alex Guo --- drivers/video/fbdev/via/dv

[PATCH] fbdev: tdfxfb: Fix potential divide by zero

2025-06-13 Thread Alex Guo
Variable var->pixclock can be set by user. In case it equals to zero, divide by zero would occur in tdfxfb_check_var. Similar crashes have happened in other fbdev drivers. We fix this by checking whether 'pixclock' is zero. Signed-off-by: Alex Guo --- drivers/video/fbdev/tdfxfb

[PATCH] fbdev: via: hw: Fix potential divide by zero

2025-06-13 Thread Alex Guo
: tridentfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/via/hw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/via/hw.c b/drivers/video/fbdev/via/hw.c index 66afd7be00cc..31e0cac91889 100644 -

[PATCH] fbdev: via: Fix potential divide by zero in get_var_refresh

2025-06-13 Thread Alex Guo
ntfb: Error out if 'pixclock' equals zero") Signed-off-by: Alex Guo --- drivers/video/fbdev/via/viafbdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/via/viafbdev.c b/drivers/video/fbdev/via/viafbdev.c index 6da5ae7d229a..5b58e93f8c28 100644 --- a/d

Re: [PATCH] fbdev: pm3fb: Fix potential divide by zero

2025-06-11 Thread Alex Guo
Hi Greet, Thanks for your confirmation and suggestions. I added this patch based on existing checks on var->pixclock in other drivers, such as savagefb_check_var, nvidiafb_check_var, etc. Are you suggesting that it is better to replace an invalid value (var->pixclock == 0) with a default valid