Re: [PATCH v2] hpet: Fix division by zero in hpet_time_div()

2019-07-11 Thread Arnd Bergmann
On Thu, Jul 11, 2019 at 3:22 PM Kefeng Wang wrote: > > The base value in do_div() called by hpet_time_div() is truncated from > unsigned long to uint32_t, resulting in a divide-by-zero exception. > > UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 > division by zero > CPU: 1 PID: 23682

[PATCH v2] hpet: Fix division by zero in hpet_time_div()

2019-07-11 Thread Kefeng Wang
The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero CPU: 1 PID: 23682 Comm: syz-executor.3 Not tainted 4.4.184.x86_64+ #4 Hardware name