diff options
author | tuexen <tuexen@FreeBSD.org> | 2015-06-19 21:55:12 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2015-06-19 21:55:12 +0000 |
commit | 84a04be05a97430d664c4924b6ddbc6245035c20 (patch) | |
tree | 132d41fe0aa3ff2c2fbb15eff0d332d09c2a0f98 | |
parent | a82bff7dcf61af377a67ad2268da658319231ef4 (diff) | |
download | FreeBSD-src-84a04be05a97430d664c4924b6ddbc6245035c20.zip FreeBSD-src-84a04be05a97430d664c4924b6ddbc6245035c20.tar.gz |
Fix two KTRACE related bugs.
Reported by: Coverity
CID: 1018058, 1018060
MFC after: 3 days
-rw-r--r-- | sys/netinet/sctp_syscalls.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 28b4445..71e2f72 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -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, |