]> git.itanic.dy.fi Git - linux-stable/commit
SCSI: sg: fix iovec bugs introduced by the block layer conversion
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Mon, 6 Apr 2009 20:55:08 +0000 (20:55 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:53 +0000 (10:36 -0700)
commit517f1a189b6c263965774adaf523adefa74c6778
treebc0c8258e1f2517c5a93cb85157d2f5cc4097b90
parent1d2c2b49a9acd488e2ec9eefac35c54d596b60cf
SCSI: sg: fix iovec bugs introduced by the block layer conversion

upstream commit: 0fdf96b67ac2649cc1ddb29b316a0db11586c6a8

- needs to use copy_from_user for iovec before passing it to
blk_rq_map_user_iov().

- before the block layer conversion, if ->dxfer_len and sum of iovec
disagrees, the shorter one wins. However, currently sg returns
-EINVAL. This restores the old behavior.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/scsi/sg.c