From: Paolo Bonzini Date: Mon, 17 Sep 2012 23:36:11 +0000 (-0700) Subject: target: go through normal processing for all zero-length commands X-Git-Tag: v3.7-rc1~61^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d81cb44726f050d7cf1be4afd9cb45d153b52066;p=pandora-kernel.git target: go through normal processing for all zero-length commands Yay, all users of transport_kmap_data_sg now check for a zero-length request and/or a too-small parameter list length. We can thus go through the normal emulation path even for such commands. This means that out-of-bounds reads and writes are now reported correctly even if they transfer 0 blocks. Other errors are also reported correctly. Testcase: sg_raw /dev/sdb 28 00 80 00 00 00 00 00 00 00 should fail with ILLEGAL REQUEST / LBA OUT OF RANGE sense does not fail without the patch (still wrong with the patch, but better: the ASC is INVALID FIELD IN CDB) Signed-off-by: Paolo Bonzini Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed