Zheyu Ma e1e9651564 video: fbdev: arkfb: Error out if 'pixclock' equals zero
The userspace program could pass any values to the driver through
ioctl() interface. If the driver doesn't check the value of 'pixclock',
it may cause divide error.

Fix this by checking whether 'pixclock' is zero.

The following log reveals it:
 divide error: 0000 [#1] PREEMPT SMP KASAN PTI
 RIP: 0010:arkfb_set_par+0x10fc/0x24f0
 Call Trace:
  <TASK>
  fb_set_var+0x604/0xeb0
  do_fb_ioctl+0x234/0x670
  fb_ioctl+0xdd/0x130
  do_syscall_64+0x3b/0x90

Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2022-04-11 08:23:50 +02:00
..
2022-03-31 13:08:13 -07:00
2022-03-25 13:35:34 -07:00
2022-04-02 11:03:03 -07:00
2022-03-24 19:37:53 -07:00
2022-03-23 18:03:08 -07:00
2022-03-30 16:17:54 -07:00
2022-03-31 13:57:15 -07:00
2022-03-24 18:12:09 -07:00
2022-03-30 10:54:49 -07:00
2022-04-01 10:26:09 -07:00
2022-03-28 14:32:39 -07:00
2022-03-24 12:30:37 -07:00
2022-03-24 19:37:53 -07:00
2022-03-29 08:50:14 -07:00
2022-03-23 18:03:08 -07:00
2022-03-24 16:19:43 -07:00
2022-03-23 18:23:13 -07:00
2022-03-25 13:56:18 -07:00
2022-03-31 13:57:15 -07:00
2022-03-21 18:33:57 -07:00
2022-03-30 10:04:11 -07:00
2022-04-01 16:26:57 -07:00
2022-04-02 10:54:52 -07:00
2022-04-02 10:44:18 -07:00
2022-03-21 14:46:01 -07:00
2022-03-28 12:41:28 -07:00
2022-03-30 10:58:28 -07:00
2022-03-30 10:50:48 -07:00
2022-04-01 09:37:18 -07:00
2022-03-27 22:18:39 +02:00
2022-03-28 14:32:39 -07:00
2022-03-24 13:13:26 -07:00
2022-03-25 13:35:34 -07:00
2022-03-24 19:37:53 -07:00
2022-03-23 18:23:13 -07:00
2022-03-18 19:00:26 +01:00
2022-03-28 14:32:39 -07:00
2022-03-31 13:57:15 -07:00
2022-03-31 13:57:15 -07:00
2022-03-31 13:57:15 -07:00
2022-03-31 14:14:03 -07:00