aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-11-20 20:50:07 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2014-12-16 01:22:30 -0800
commit6bf6ca7515c1df06f5c03737537f5e0eb191e29e (patch)
tree05745df06630e6ba0d94724a70ee14db4f55416f /include/uapi
parenta0b3b9b2409b409c677f7eb1e0485b816a5848f7 (diff)
iscsi-target: Fail connection on short sendmsg writes
This patch changes iscsit_do_tx_data() to fail on short writes when kernel_sendmsg() returns a value different than requested transfer length, returning -EPIPE and thus causing a connection reset to occur. This avoids a potential bug in the original code where a short write would result in kernel_sendmsg() being called again with the original iovec base + length. In practice this has not been an issue because iscsit_do_tx_data() is only used for transferring 48 byte headers + 4 byte digests, along with seldom used control payloads from NOPIN + TEXT_RSP + REJECT with less than 32k of data. So following Al's audit of iovec consumers, go ahead and fail the connection on short writes for now, and remove the bogus logic ahead of his proper upstream fix. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Cc: David S. Miller <davem@davemloft.net> Cc: <stable@vger.kernel.org> # v3.1+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions

Privacy Policy