On Fri, Jan 20, 2012 at 7:12 PM, Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> wrote: > - transport_send_check_condition_and_sense(se_cmd, > - se_cmd->scsi_sense_reason, 0); > + transport_generic_request_failure(se_cmd); Have you tested this (I haven't yet ;). I remember seeing that transport_generic_request_failure() has the code: /* * For SAM Task Attribute emulation for failed struct se_cmd */ if (cmd->se_dev->dev_task_attr_type == SAM_TASK_ATTR_EMULATED) transport_complete_task_attr(cmd); and if the submit cmd code if (transport_lookup_cmd_lun(se_cmd, unpacked_lun) < 0) goto out_check_cond; hits the failure case, then cmd->se_dev won't even be initialized? (and I haven't looked at the code to know if transport_complete_task_attr() is safe to call after transport_generic_allocate_tasks() fails). - R. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html