Re: [PATCH] a multiplication overflow in drivers/pps/pps.c

2013-12-19 Thread Andrew Morton
On Wed, 18 Dec 2013 15:36:11 +0800 xqx12 wrote: > there is an overflow in the following code : > > ticks = fdata.timeout.sec * HZ; > > while ticks is a signed 64-bit, but the result of fdata.timeout.sec * > HZ will be converted be 32-bit first. So ticks will be a wrong value > after

Re: [PATCH] a multiplication overflow in drivers/pps/pps.c

2013-12-19 Thread Andrew Morton
On Wed, 18 Dec 2013 15:36:11 +0800 xqx12 s2e...@gmail.com wrote: there is an overflow in the following code : ticks = fdata.timeout.sec * HZ; while ticks is a signed 64-bit, but the result of fdata.timeout.sec * HZ will be converted be 32-bit first. So ticks will be a wrong value after

[PATCH] a multiplication overflow in drivers/pps/pps.c

2013-12-17 Thread xqx12
there is an overflow in the following code : ticks = fdata.timeout.sec * HZ; while ticks is a signed 64-bit, but the result of fdata.timeout.sec * HZ will be converted be 32-bit first. So ticks will be a wrong value after multiplication overflow. Reported-by: Qixue Xiao Suggested-by: Yongjian

[PATCH] a multiplication overflow in drivers/pps/pps.c

2013-12-17 Thread xqx12
there is an overflow in the following code : ticks = fdata.timeout.sec * HZ; while ticks is a signed 64-bit, but the result of fdata.timeout.sec * HZ will be converted be 32-bit first. So ticks will be a wrong value after multiplication overflow. Reported-by: Qixue Xiao xiaoqixu...@163.com