Re: [PATCH] sg: fix overflow in timeout calculation

2015-02-23 Thread Douglas Gilbert
On 15-02-09 01:45 PM, Mikulas Patocka wrote: USER_HZ may be greater than HZ and in that case arithmetics tries to calculate the maximum accepted timeout overflows. We need to use INT_MAX in this case. Signed-off-by: Mikulas Patocka Cc: sta...@vger.kernel.org Acked-by: Douglas Gilbert ---

[PATCH] sg: fix overflow in timeout calculation

2015-02-09 Thread Mikulas Patocka
USER_HZ may be greater than HZ and in that case arithmetics tries to calculate the maximum accepted timeout overflows. We need to use INT_MAX in this case. Signed-off-by: Mikulas Patocka Cc: sta...@vger.kernel.org --- drivers/scsi/sg.c | 10 -- 1 file changed, 8 insertions(+), 2 delet