From: Jörn Engel Date: Thu, 16 Feb 2012 16:14:27 +0000 (-0500) Subject: target: Fix off-by-seven in target_report_luns X-Git-Tag: v3.4-rc1~146^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99f730d88fd0a25c3e2dfc357bde4cf6b8cb5b40;p=pandora-kernel.git target: Fix off-by-seven in target_report_luns cdb_offset is always equal to offset - 8, so remove that one. More importantly, the existing code only worked correct if se_cmd->data_length is a multiple of 8. Pass in a length of, say, 9 and we will happily overwrite 7 bytes of "unallocated" memory. Now, afaics this bug is currently harmless, as allocations will implicitly be padded to multiples of 8 bytes. But depending on such a fact wouldn't qualify as sound engineering practice. Signed-off-by: Joern Engel Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed