>>>>> "Akinobu" == Akinobu Mita <akinobu.mita@xxxxxxxxx> writes: Akinobu> The protection info dif_storep is allocated only when parameter Akinobu> dif is not zero. But it will be accessed when reading or Akinobu> writing to the storage installed with parameter dix is not Akinobu> zero. Akinobu> So kernel crashes if scsi_debug module is loaded with Akinobu> parameters dix=1 and dif=0. The full story is that scsi_debug does not support DIF and DIX correctly by virtue of simultaneously being the HBA and the target. And since there is no actual data transfer between the HBA and the target the notion of DIF is weak at best. I did look into making scsi_debug do the right thing but it's quite a bit of code and I lost interest about halfway through the effort. If you'd like to fix this properly I can probably find the patch to use as baseline? In this particular case I'm ok with your patch keying off of scsi_debug_dix. But it's very important to me that I'm able to set P_TYPE and the host protection mask as I see fit using the module parameters. Even when the combination of options don't make strict sense. Acked-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html