summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-06-22 06:06:38 +0000
committertuexen <tuexen@FreeBSD.org>2015-06-22 06:06:38 +0000
commit7e040df666ae118db4e600051b2ad1cade54e532 (patch)
tree6ff609785a3ed678aa2d8059ba5f3a56af4de6fb /sys/kern/uipc_syscalls.c
parent167ded8010f12b788bbad18d88bc9ace1d9882dc (diff)
downloadFreeBSD-src-7e040df666ae118db4e600051b2ad1cade54e532.zip
FreeBSD-src-7e040df666ae118db4e600051b2ad1cade54e532.tar.gz
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
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 2240928..708457d 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,
OpenPOWER on IntegriCloud