]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] aacraid: READ_CAPACITY_16 shouldn't trust allocation length in cdb
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Sun, 24 Feb 2008 23:25:23 +0000 (15:25 -0800)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:15:40 +0000 (12:15 -0500)
commite799d7b6b529655e450a8372c17b9aaed77f328d
tree630df6fc88f323fb491ba9ed4bb282c804ae136d
parentd0d0ea8cce16a9f4a586b17f9da6c34b14912bfa
[SCSI] aacraid: READ_CAPACITY_16 shouldn't trust allocation length in cdb

When aacraid spoofs READ_CAPACITY_16, it assumes that the data length
in the sg list is equal to allocation length in cdb. But sg can put
any value in scb so the driver needs to check both the data length in
the sg list and allocation length in cdb.

If allocation length is larger than the response length that the
driver expects, it clears the data buffer in the sg list to zero but
it doesn't need to do. Just setting resid is fine.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/aacraid/aachba.c