Re: [PATCH v3] scsi: handle out-of-range SG_SET_TIMEOUT values

From: Bart Van Assche

Date: Wed Oct 21 2026 - 23:28:17 EST


On 10/21/26 7:55 PM, Wang Yingjie wrote:
SG_SET_TIMEOUT accepts a signed int in USER_HZ units. The sg character
device rejects negative values and limits positive values so the converted
timeout fits its destination field. The block SCSI and BSG paths instead
pass the value to clock_t_to_jiffies(), which accepts an unsigned long,
and store the result in an unsigned int.

Reported-by: Bart Van Assche <bvanassche@xxxxxxx>