Fix two KTRACE related bugs.

Reported by:	Coverity
CID:		1018058, 1018060

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2015-06-19 21:55:12 +00:00
parent 53aab9ea70
commit bb2dc69f9a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=284613

View File

@ -277,6 +277,10 @@ sys_sctp_generic_sendmsg (td, uap)
auio.uio_td = td;
auio.uio_offset = 0; /* XXX */
auio.uio_resid = 0;
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);
#endif /* KTRACE */
len = auio.uio_resid = uap->mlen;
CURVNET_SET(so->so_vnet);
error = sctp_lower_sosend(so, to, &auio, (struct mbuf *)NULL,
@ -400,6 +404,10 @@ sys_sctp_generic_sendmsg_iov(td, uap)
goto sctp_bad;
}
}
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);
#endif /* KTRACE */
len = auio.uio_resid;
CURVNET_SET(so->so_vnet);
error = sctp_lower_sosend(so, to, &auio,