Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-17 Thread Bart Van Assche
On Thu, 2019-01-17 at 18:00 -0500, Douglas Gilbert wrote: > A reason from CH about why he did that would be useful. There is an instance > of struct scsi_data_buffer already in a scsi_cmnd object (called sdb), so > why not use it and keep the scsi_cmnd object "clean" ?? > > There should be a codin

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-17 Thread Douglas Gilbert
On 2019-01-17 4:48 p.m., Bart Van Assche wrote: On Thu, 2019-01-17 at 16:05 -0500, Douglas Gilbert wrote: On 2019-01-16 8:06 p.m., Bart Van Assche wrote: On Wed, 2019-01-16 at 19:54 -0500, Douglas Gilbert wrote: On 2019-01-16 6:56 p.m., Bart Van Assche wrote: On Wed, 2019-01-16 at 10:57 -0500

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-17 Thread Bart Van Assche
On Thu, 2019-01-17 at 16:05 -0500, Douglas Gilbert wrote: > On 2019-01-16 8:06 p.m., Bart Van Assche wrote: > > On Wed, 2019-01-16 at 19:54 -0500, Douglas Gilbert wrote: > > > On 2019-01-16 6:56 p.m., Bart Van Assche wrote: > > > > On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: > > > > >

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 19:54 -0500, Douglas Gilbert wrote: > On 2019-01-16 6:56 p.m., Bart Van Assche wrote: > > On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: > > > The block layer assumes scsi_request:sense is always a valid > > > pointer. This is set up once in scsi_mq_init_request() a

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Douglas Gilbert
On 2019-01-16 6:56 p.m., Bart Van Assche wrote: On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: The block layer assumes scsi_request:sense is always a valid pointer. This is set up once in scsi_mq_init_request() and the containing scsi_cmnd object is used often, being re-initialized by

Re: [PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Bart Van Assche
On Wed, 2019-01-16 at 10:57 -0500, Douglas Gilbert wrote: > The block layer assumes scsi_request:sense is always a valid > pointer. This is set up once in scsi_mq_init_request() and the > containing scsi_cmnd object is used often, being re-initialized > by scsi_init_command(). That works unless som

[PATCH fix] scsi_lib: make sure scsi_request.sense valid

2019-01-16 Thread Douglas Gilbert
The block layer assumes scsi_request:sense is always a valid pointer. This is set up once in scsi_mq_init_request() and the containing scsi_cmnd object is used often, being re-initialized by scsi_init_command(). That works unless some code re-purposes part of the scsi_cmnd object for something else