Re: [PATCH V3] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-08 Thread James Bottomley
On Wed, 2017-11-08 at 21:21 +0800, Ming Lei wrote: > cmd->cmnd can be allocated/freed dynamically in case of > T10_PI_TYPE2_PROTECTION, > so we should check it in scsi_show_rq() because this request may have > been freed in scsi_show_rq(). > > This patch fixs the following kernel crash when

[PATCH V3] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-08 Thread Ming Lei
cmd->cmnd can be allocated/freed dynamically in case of T10_PI_TYPE2_PROTECTION, so we should check it in scsi_show_rq() because this request may have been freed in scsi_show_rq(). This patch fixs the following kernel crash when dumping request via block's debugfs interface: [ 252.962045] BUG: