diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 08:41:02 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-02-02 08:41:02 -0800 |
commit | 178cf7de6f1d3b95407f5a76af249fc924d42576 (patch) | |
tree | 4b3e5f3ef6dfa7866fb30811acdc60832a055269 /drivers/scsi/scsi_lib.c | |
parent | 89c468263befb4617aaab36ae8c54ba04164c7b0 (diff) | |
parent | e36f014edff70fc02b3d3d79cead1d58f289332e (diff) | |
download | linux-178cf7de6f1d3b95407f5a76af249fc924d42576.tar.bz2 |
Merge 3.19-rc7 into staging-next
We want those fixes in here for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 6d5c0b8cb0bb..17bb541f7cc2 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1143,7 +1143,17 @@ int scsi_init_io(struct scsi_cmnd *cmd) struct scsi_data_buffer *prot_sdb = cmd->prot_sdb; int ivecs, count; - BUG_ON(prot_sdb == NULL); + if (prot_sdb == NULL) { + /* + * This can happen if someone (e.g. multipath) + * queues a command to a device on an adapter + * that does not support DIX. + */ + WARN_ON_ONCE(1); + error = BLKPREP_KILL; + goto err_exit; + } + ivecs = blk_rq_count_integrity_sg(rq->q, rq->bio); if (scsi_alloc_sgtable(prot_sdb, ivecs, is_mq)) { |