mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
sctp: call iov_iter_revert() after sending ABORT
[ Upstream commit901efe1231] The user msg is also copied to the abort packet when doing SCTP_ABORT in sctp_sendmsg_check_sflags(). When SCTP_SENDALL is set, iov_iter_revert() should have been called for sending abort on the next asoc with copying this msg. Otherwise, memcpy_from_msg() in sctp_make_abort_user() will fail and return error. Fixes:4910280503("sctp: add support for snd flag SCTP_SENDALL process in sendmsg") Reported-by: Ying Xu <yinxu@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
16a006d72f
commit
8085d6d03f
@@ -1884,6 +1884,7 @@ static int sctp_sendmsg_check_sflags(struct sctp_association *asoc,
|
||||
|
||||
pr_debug("%s: aborting association:%p\n", __func__, asoc);
|
||||
sctp_primitive_ABORT(net, asoc, chunk);
|
||||
iov_iter_revert(&msg->msg_iter, msg_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user