Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2015 06:06:38 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r284696 - stable/10/sys/kern
Message-ID:  <201506220606.t5M66cp0047434@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Mon Jun 22 06:06:38 2015
New Revision: 284696
URL: https://svnweb.freebsd.org/changeset/base/284696

Log:
  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

Modified:
  stable/10/sys/kern/uipc_syscalls.c

Modified: stable/10/sys/kern/uipc_syscalls.c
==============================================================================
--- stable/10/sys/kern/uipc_syscalls.c	Mon Jun 22 05:41:13 2015	(r284695)
+++ stable/10/sys/kern/uipc_syscalls.c	Mon Jun 22 06:06:38 2015	(r284696)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506220606.t5M66cp0047434>