From d5706221450d5e55789b862ea96038ea579c3567 Mon Sep 17 00:00:00 2001 From: tuexen Date: Mon, 22 Jun 2015 06:06:38 +0000 Subject: [PATCH] When using KTRACE, set a variable to the appropriate value and don't leave it initialized at NULL. Since the affected functions where moved from sys/kern/uipc_syscalls.c to sys/netinet/sctp_syscalls.c it was not possible to MFC r284613. Therefore, this is a direct commit with the corresponding changes of r284613. Reported by: Coverity CID: 1018058, 1018060 git-svn-id: svn://svn.freebsd.org/base/stable/10@284696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/kern/uipc_syscalls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 2240928ac..708457dbd 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2742,6 +2742,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, @@ -2865,6 +2869,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, -- 2.45.0