On 2019-10-29 10:59, Douglas Gilbert wrote: > Linux's internal representation is wrong and should be fixed to match > its exposed interface (struct sg_io_hdr) which predates the breakage. If resid_len is changed from unsigned int to int all SCSI core and SCSI LLD code that uses resid_len will have to be reviewed to see whether it handles residual overflow correctly. Bart.