From: Nicholas Bellinger Date: Wed, 10 Aug 2011 07:59:58 +0000 (-0700) Subject: target: Add missing DATA_SG_IO transport_cmd_get_valid_sectors check X-Git-Tag: v3.1-rc4~43^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01cde4d54327884a0b61ce8666092f5703557d4b;p=pandora-kernel.git target: Add missing DATA_SG_IO transport_cmd_get_valid_sectors check This patch adds the missing transport_cmd_get_valid_sectors() check for SCF_SCSI_DATA_SG_IO_CDB type payloads to ensure that a received LBA + range does not exeed past the end of associated backend struct se_device. This patch also fixes a bug in the failure path of transport_new_cmd_obj() where this check can fail, so change to use a signed 'rc' and return '-EINVAL' to signal proper transport_generic_request_failure() handling. Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed