Re: kernel BUG at drivers/scsi/scsi_error.c:197! - git 4.17.0-x64-08428-g7d3bf613e99a

From: hch@xxxxxx
Date: Wed Jun 13 2018 - 10:27:48 EST


On Wed, Jun 13, 2018 at 02:08:12PM +0000, Bart Van Assche wrote:
> __blk_mq_complete_request() is already called today by blk_mq_complete_request().
> However, it's not clear to me why that function is exported by Jianchao's patch.

True. I had missed that the patch also started calling the new
mark_rq_complete function from the error handler.

> The SCSI error handler already waits until all pending requests have finished
> before it starts handling timed out commands. This e-mail thread started with a
> report of a crash in the SCSI error handler, which is a regression introduced in
> the v4.18 merge window.

ut-requests-again-that-are-in-the.patch
Yeah. I've read back a bit. If your theory of a double invocation of
the timeout handler is correct something like the patch below should sort
it out, right?

---