Re: [PATCH 1/2] scsi: sg: Avoid overflow when USER_HZ > HZ

2016-08-30 Thread Martin K. Petersen
> "Paul" == Paul Burton writes: Paul> Calculating the maximum timeout that a user can set via the Paul> SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by Paul> USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an Paul> overflow when performed as a 32 bit integer calculation, re

Re: [PATCH 1/2] scsi: sg: Avoid overflow when USER_HZ > HZ

2016-08-26 Thread Douglas Gilbert
On 2016-08-19 06:43 PM, Paul Burton wrote: Calculating the maximum timeout that a user can set via the SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an overflow when performed as a 32 bit integer calculation, resulting in compil

Re: [PATCH 1/2] scsi: sg: Avoid overflow when USER_HZ > HZ

2016-08-25 Thread Martin K. Petersen
> "Paul" == Paul Burton writes: Paul> Calculating the maximum timeout that a user can set via the Paul> SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by Paul> USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an Paul> overflow when performed as a 32 bit integer calculation, re

[PATCH 1/2] scsi: sg: Avoid overflow when USER_HZ > HZ

2016-08-19 Thread Paul Burton
Calculating the maximum timeout that a user can set via the SG_SET_TIMEOUT ioctl involves multiplying INT_MAX by USER_HZ/HZ. If USER_HZ is larger than HZ then this results in an overflow when performed as a 32 bit integer calculation, resulting in compiler warnings such as the following: drivers