On Wed, Nov 16, 2011 at 08:32:20AM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> > > This patch changes transport_generic_map_mem_to_cmd() to reject SCSI data > overflow and to send exception status with CHECK_CONDITION + TCM_INVALID_CDB_FIELD > for fabrics that are passing a pre-populated struct scatterlist (eg: tcm_loop > and iscsi-target) being mapped into se_cmd->t_data_sg and se_cmd->t_data_nents. > > This addresses an OOPs where transport_allocate_data_tasks() would walk > the incorrect post OVERFLOW cmd->data_length value beyond the end of > the passed scatterlist. Maybe this is a sign that at least the iscsi target should stop allocating its own pages and switch back to the core allocation, which should be easily possible after the s/g list conversion. I also wonder if keeping this special case for tcm_loop is a good idea - it surely is a nice optimization, but then again tcm_loop is more a debugging and testing tool than something we should optimize for. -- 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