]> git.baikalelectronics.ru Git - kernel.git/commit
target/user: Return an error if cmd data size is too large
authorAndy Grover <agrover@redhat.com>
Thu, 25 Aug 2016 15:55:53 +0000 (08:55 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 20 Oct 2016 04:22:16 +0000 (21:22 -0700)
commit89a41de6a21b91a5a55797613f6c29309cf41b30
tree0a4a342ff1d0ae52a6cad39352a714a914489bd1
parent0186da76611b62c6804e1dc1f34fbc8f7161522f
target/user: Return an error if cmd data size is too large

Userspace should be implementing VPD B0 (Block Limits) to inform the
initiator of max data size, but just in case we do get a too-large request,
do what the spec says and return INVALID_CDB_FIELD.

Make sure to unlock udev->cmdr_lock before returning.

Signed-off-by: Andy Grover <agrover@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c