summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2009-09-25 22:45:59 +0000
committerdes <des@FreeBSD.org>2009-09-25 22:45:59 +0000
commitbf5117185e83a178d672946c3f7053d0ef92be27 (patch)
tree394fcfe01b613c0b5b5edbfc414a17c73481ad5d /sys/kern/uipc_syscalls.c
parentb79ff8160af6fa640e29ce784e59acd49cd1e7fc (diff)
parent5c2742e3dae3ef549329b770ec44b16ca930dc1f (diff)
downloadFreeBSD-src-bf5117185e83a178d672946c3f7053d0ef92be27.zip
FreeBSD-src-bf5117185e83a178d672946c3f7053d0ef92be27.tar.gz
Sync with head
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 9717679..34eaf20 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
#include <sys/fcntl.h>
#include <sys/file.h>
#include <sys/filio.h>
+#include <sys/jail.h>
#include <sys/mount.h>
#include <sys/mbuf.h>
#include <sys/protosw.h>
@@ -2316,6 +2317,7 @@ sctp_peeloff(td, uap)
goto done;
td->td_retval[0] = fd;
+ CURVNET_SET(head->so_vnet);
so = sonewconn(head, SS_ISCONNECTED);
if (so == NULL)
goto noconnection;
@@ -2355,6 +2357,7 @@ noconnection:
/*
* Release explicitly held references before returning.
*/
+ CURVNET_RESTORE();
done:
if (nfp != NULL)
fdrop(nfp, td);
@@ -2433,9 +2436,11 @@ sctp_generic_sendmsg (td, uap)
auio.uio_offset = 0; /* XXX */
auio.uio_resid = 0;
len = auio.uio_resid = uap->mlen;
+ CURVNET_SET(so->so_vnet);
error = sctp_lower_sosend(so, to, &auio,
(struct mbuf *)NULL, (struct mbuf *)NULL,
uap->flags, use_rcvinfo, u_sinfo, td);
+ CURVNET_RESTORE();
if (error) {
if (auio.uio_resid != len && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
@@ -2543,9 +2548,11 @@ sctp_generic_sendmsg_iov(td, uap)
}
}
len = auio.uio_resid;
+ CURVNET_SET(so->so_vnet);
error = sctp_lower_sosend(so, to, &auio,
(struct mbuf *)NULL, (struct mbuf *)NULL,
uap->flags, use_rcvinfo, u_sinfo, td);
+ CURVNET_RESTORE();
if (error) {
if (auio.uio_resid != len && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
@@ -2665,9 +2672,11 @@ sctp_generic_recvmsg(td, uap)
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);
#endif /* KTRACE */
+ CURVNET_SET(so->so_vnet);
error = sctp_sorecvmsg(so, &auio, (struct mbuf **)NULL,
fromsa, fromlen, &msg_flags,
(struct sctp_sndrcvinfo *)&sinfo, 1);
+ CURVNET_RESTORE();
if (error) {
if (auio.uio_resid != (int)len && (error == ERESTART ||
error == EINTR || error == EWOULDBLOCK))
OpenPOWER on IntegriCloud