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,
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to