Re: [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free

2017-05-03 Thread Bart Van Assche
On Wed, 2017-05-03 at 09:54 +0200, Jan Kara wrote: > Hum, since this didn't quite work out, how about storing that one bit of > information that scsi_exit_rq() needs from shost inside scsi_cmnd during > scsi_init_rq()? Hello Jan, All what's missing from the patch I posted is a

Re: [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free

2017-05-03 Thread Bart Van Assche
On Tue, 2017-05-02 at 17:00 -0600, Scott Bauer wrote: > I've applied this on-top of Jens' For-Linus and re-ran the test. I get the > following scheduling > while atomic BUG() splat: > > [ 35.753764] BUG: scheduling while atomic: swapper/0/0/0x0100 > [ 35.754333] [ ... ] > [ 35.765844]

Re: [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free

2017-05-03 Thread Jan Kara
On Tue 02-05-17 10:43:30, Bart Van Assche wrote: > This patch fixes the following KASAN complaint: > > == > BUG: KASAN: use-after-free in scsi_exit_rq+0xf3/0x120 at addr 8802b7fedf00 > Read of size 1 by task rcuos/5/53 > CPU: 7

Re: [PATCH] Avoid that scsi_exit_rq() triggers a use-after-free

2017-05-02 Thread Scott Bauer
On Tue, May 02, 2017 at 10:43:30AM -0700, Bart Van Assche wrote: > This patch fixes the following KASAN complaint: > > == > BUG: KASAN: use-after-free in scsi_exit_rq+0xf3/0x120 at addr 8802b7fedf00 > Read of size 1 by task

[PATCH] Avoid that scsi_exit_rq() triggers a use-after-free

2017-05-02 Thread Bart Van Assche
This patch fixes the following KASAN complaint: == BUG: KASAN: use-after-free in scsi_exit_rq+0xf3/0x120 at addr 8802b7fedf00 Read of size 1 by task rcuos/5/53 CPU: 7 PID: 53 Comm: rcuos/6 Not tainted 4.11.0-rc5+ #13 Hardware