Module Name: src Committed By: rtr Date: Tue Aug 5 05:24:27 UTC 2014
Modified Files: src/sys/kern: uipc_socket.c uipc_usrreq.c src/sys/net: link_proto.c raw_usrreq.c rtsock.c src/sys/netatalk: ddp_usrreq.c src/sys/netbt: hci_socket.c l2cap_socket.c rfcomm_socket.c sco_socket.c src/sys/netinet: in_pcb.c in_pcb.h raw_ip.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6: in6_pcb.c in6_pcb.h raw_ip6.c udp6_usrreq.c src/sys/netipsec: keysock.c src/sys/netmpls: mpls_proto.c src/sys/netnatm: natm.c src/sys/rump/net/lib/libsockin: sockin.c src/sys/sys: protosw.h un.h Log Message: revert the removal of struct lwp * parameter from bind, listen and connect user requests. this should resolve the issue relating to nfs client hangs presented recently by wiz on current-users@ To generate a diff of this commit: cvs rdiff -u -r1.230 -r1.231 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.164 -r1.165 src/sys/kern/uipc_usrreq.c cvs rdiff -u -r1.20 -r1.21 src/sys/net/link_proto.c cvs rdiff -u -r1.48 -r1.49 src/sys/net/raw_usrreq.c cvs rdiff -u -r1.159 -r1.160 src/sys/net/rtsock.c cvs rdiff -u -r1.57 -r1.58 src/sys/netatalk/ddp_usrreq.c cvs rdiff -u -r1.36 -r1.37 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.27 -r1.28 src/sys/netbt/l2cap_socket.c cvs rdiff -u -r1.29 -r1.30 src/sys/netbt/rfcomm_socket.c \ src/sys/netbt/sco_socket.c cvs rdiff -u -r1.150 -r1.151 src/sys/netinet/in_pcb.c cvs rdiff -u -r1.53 -r1.54 src/sys/netinet/in_pcb.h cvs rdiff -u -r1.141 -r1.142 src/sys/netinet/raw_ip.c cvs rdiff -u -r1.195 -r1.196 src/sys/netinet/tcp_usrreq.c cvs rdiff -u -r1.213 -r1.214 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.127 -r1.128 src/sys/netinet6/in6_pcb.c cvs rdiff -u -r1.38 -r1.39 src/sys/netinet6/in6_pcb.h cvs rdiff -u -r1.132 -r1.133 src/sys/netinet6/raw_ip6.c cvs rdiff -u -r1.111 -r1.112 src/sys/netinet6/udp6_usrreq.c cvs rdiff -u -r1.39 -r1.40 src/sys/netipsec/keysock.c cvs rdiff -u -r1.20 -r1.21 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.41 -r1.42 src/sys/netnatm/natm.c cvs rdiff -u -r1.54 -r1.55 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r1.56 -r1.57 src/sys/sys/protosw.h cvs rdiff -u -r1.52 -r1.53 src/sys/sys/un.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.230 src/sys/kern/uipc_socket.c:1.231 --- src/sys/kern/uipc_socket.c:1.230 Thu Jul 31 20:28:59 2014 +++ src/sys/kern/uipc_socket.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.230 2014/07/31 20:28:59 mrg Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.231 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.230 2014/07/31 20:28:59 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.231 2014/08/05 05:24:26 rtr Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -629,7 +629,7 @@ sobind(struct socket *so, struct mbuf *n int error; solock(so); - error = (*so->so_proto->pr_usrreqs->pr_bind)(so, nam); + error = (*so->so_proto->pr_usrreqs->pr_bind)(so, nam, l); sounlock(so); return error; } @@ -645,7 +645,7 @@ solisten(struct socket *so, int backlog, sounlock(so); return EINVAL; } - error = (*so->so_proto->pr_usrreqs->pr_listen)(so); + error = (*so->so_proto->pr_usrreqs->pr_listen)(so, l); if (error != 0) { sounlock(so); return error; @@ -826,7 +826,7 @@ soconnect(struct socket *so, struct mbuf (error = sodisconnect(so)))) error = EISCONN; else - error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam); + error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l); return error; } Index: src/sys/kern/uipc_usrreq.c diff -u src/sys/kern/uipc_usrreq.c:1.164 src/sys/kern/uipc_usrreq.c:1.165 --- src/sys/kern/uipc_usrreq.c:1.164 Thu Jul 31 14:12:57 2014 +++ src/sys/kern/uipc_usrreq.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_usrreq.c,v 1.164 2014/07/31 14:12:57 rtr Exp $ */ +/* $NetBSD: uipc_usrreq.c,v 1.165 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc. @@ -96,7 +96,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.164 2014/07/31 14:12:57 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.165 2014/08/05 05:24:26 rtr Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -495,7 +495,7 @@ unp_usrreq(struct socket *so, int req, s * intervening control ops, like * another connection. */ - error = unp_connect(so, nam); + error = unp_connect(so, nam, l); } } else { if ((so->so_state & SS_ISCONNECTED) == 0) @@ -920,7 +920,7 @@ makeun(struct mbuf *nam, size_t *addrlen } static int -unp_bind(struct socket *so, struct mbuf *nam) +unp_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct sockaddr_un *sun; struct unpcb *unp; @@ -950,7 +950,7 @@ unp_bind(struct socket *so, struct mbuf unp->unp_flags |= UNP_BUSY; sounlock(so); - p = curlwp->l_proc; + p = l->l_proc; sun = makeun(nam, &addrlen); pb = pathbuf_create(sun->sun_path); @@ -994,8 +994,8 @@ unp_bind(struct socket *so, struct mbuf unp->unp_addrlen = addrlen; unp->unp_addr = sun; unp->unp_connid.unp_pid = p->p_pid; - unp->unp_connid.unp_euid = kauth_cred_geteuid(curlwp->l_cred); - unp->unp_connid.unp_egid = kauth_cred_getegid(curlwp->l_cred); + unp->unp_connid.unp_euid = kauth_cred_geteuid(l->l_cred); + unp->unp_connid.unp_egid = kauth_cred_getegid(l->l_cred); unp->unp_flags |= UNP_EIDSBIND; VOP_UNLOCK(vp); vput(nd.ni_dvp); @@ -1011,7 +1011,7 @@ unp_bind(struct socket *so, struct mbuf } static int -unp_listen(struct socket *so) +unp_listen(struct socket *so, struct lwp *l) { struct unpcb *unp = sotounpcb(so); @@ -1064,7 +1064,7 @@ unp_abort(struct socket *so) } int -unp_connect(struct socket *so, struct mbuf *nam) +unp_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct sockaddr_un *sun; vnode_t *vp; Index: src/sys/net/link_proto.c diff -u src/sys/net/link_proto.c:1.20 src/sys/net/link_proto.c:1.21 --- src/sys/net/link_proto.c:1.20 Thu Jul 31 13:21:33 2014 +++ src/sys/net/link_proto.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: link_proto.c,v 1.20 2014/07/31 13:21:33 rtr Exp $ */ +/* $NetBSD: link_proto.c,v 1.21 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.20 2014/07/31 13:21:33 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: link_proto.c,v 1.21 2014/08/05 05:24:26 rtr Exp $"); #include <sys/param.h> #include <sys/socket.h> @@ -51,9 +51,9 @@ static int sockaddr_dl_cmp(const struct static int link_attach(struct socket *, int); static void link_detach(struct socket *); static int link_accept(struct socket *, struct mbuf *); -static int link_bind(struct socket *, struct mbuf *); -static int link_listen(struct socket *); -static int link_connect(struct socket *, struct mbuf *); +static int link_bind(struct socket *, struct mbuf *, struct lwp *); +static int link_listen(struct socket *, struct lwp *); +static int link_connect(struct socket *, struct mbuf *, struct lwp *); static int link_disconnect(struct socket *); static int link_shutdown(struct socket *); static int link_abort(struct socket *); @@ -265,7 +265,7 @@ link_accept(struct socket *so, struct mb } static int -link_bind(struct socket *so, struct mbuf *nam) +link_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); @@ -273,7 +273,7 @@ link_bind(struct socket *so, struct mbuf } static int -link_listen(struct socket *so) +link_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -281,7 +281,7 @@ link_listen(struct socket *so) } static int -link_connect(struct socket *so, struct mbuf *nam) +link_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); Index: src/sys/net/raw_usrreq.c diff -u src/sys/net/raw_usrreq.c:1.48 src/sys/net/raw_usrreq.c:1.49 --- src/sys/net/raw_usrreq.c:1.48 Thu Jul 31 05:13:53 2014 +++ src/sys/net/raw_usrreq.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_usrreq.c,v 1.48 2014/07/31 05:13:53 rtr Exp $ */ +/* $NetBSD: raw_usrreq.c,v 1.49 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (c) 1980, 1986, 1993 @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.48 2014/07/31 05:13:53 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_usrreq.c,v 1.49 2014/08/05 05:24:26 rtr Exp $"); #include <sys/param.h> #include <sys/mbuf.h> @@ -216,7 +216,7 @@ raw_usrreq(struct socket *so, int req, s error = EISCONN; goto die; } - error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam); + error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l); if (error) { die: m_freem(m); Index: src/sys/net/rtsock.c diff -u src/sys/net/rtsock.c:1.159 src/sys/net/rtsock.c:1.160 --- src/sys/net/rtsock.c:1.159 Thu Jul 31 03:39:35 2014 +++ src/sys/net/rtsock.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.159 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: rtsock.c,v 1.160 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.159 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.160 2014/08/05 05:24:26 rtr Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -234,7 +234,7 @@ COMPATNAME(route_accept)(struct socket * } static int -COMPATNAME(route_bind)(struct socket *so, struct mbuf *nam) +COMPATNAME(route_bind)(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); @@ -242,7 +242,7 @@ COMPATNAME(route_bind)(struct socket *so } static int -COMPATNAME(route_listen)(struct socket *so) +COMPATNAME(route_listen)(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -250,7 +250,7 @@ COMPATNAME(route_listen)(struct socket * } static int -COMPATNAME(route_connect)(struct socket *so, struct mbuf *nam) +COMPATNAME(route_connect)(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); Index: src/sys/netatalk/ddp_usrreq.c diff -u src/sys/netatalk/ddp_usrreq.c:1.57 src/sys/netatalk/ddp_usrreq.c:1.58 --- src/sys/netatalk/ddp_usrreq.c:1.57 Thu Jul 31 03:39:35 2014 +++ src/sys/netatalk/ddp_usrreq.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ddp_usrreq.c,v 1.57 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: ddp_usrreq.c,v 1.58 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (c) 1990,1991 Regents of The University of Michigan. @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.57 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.58 2014/08/05 05:24:26 rtr Exp $"); #include "opt_mbuftrace.h" @@ -452,7 +452,7 @@ ddp_accept(struct socket *so, struct mbu } static int -ddp_bind(struct socket *so, struct mbuf *nam) +ddp_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); KASSERT(sotoddpcb(so) != NULL); @@ -461,7 +461,7 @@ ddp_bind(struct socket *so, struct mbuf } static int -ddp_listen(struct socket *so) +ddp_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -469,7 +469,7 @@ ddp_listen(struct socket *so) } static int -ddp_connect(struct socket *so, struct mbuf *nam) +ddp_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct ddpcb *ddp = sotoddpcb(so); int error = 0; Index: src/sys/netbt/hci_socket.c diff -u src/sys/netbt/hci_socket.c:1.36 src/sys/netbt/hci_socket.c:1.37 --- src/sys/netbt/hci_socket.c:1.36 Thu Jul 31 03:39:35 2014 +++ src/sys/netbt/hci_socket.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: hci_socket.c,v 1.36 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: hci_socket.c,v 1.37 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.36 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.37 2014/08/05 05:24:26 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -492,7 +492,7 @@ hci_accept(struct socket *so, struct mbu } static int -hci_bind(struct socket *so, struct mbuf *nam) +hci_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct hci_pcb *pcb = so->so_pcb; struct sockaddr_bt *sa; @@ -519,7 +519,7 @@ hci_bind(struct socket *so, struct mbuf } static int -hci_listen(struct socket *so) +hci_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -527,7 +527,7 @@ hci_listen(struct socket *so) } static int -hci_connect(struct socket *so, struct mbuf *nam) +hci_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct hci_pcb *pcb = so->so_pcb; struct sockaddr_bt *sa; Index: src/sys/netbt/l2cap_socket.c diff -u src/sys/netbt/l2cap_socket.c:1.27 src/sys/netbt/l2cap_socket.c:1.28 --- src/sys/netbt/l2cap_socket.c:1.27 Thu Jul 31 03:39:35 2014 +++ src/sys/netbt/l2cap_socket.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_socket.c,v 1.27 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: l2cap_socket.c,v 1.28 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.27 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_socket.c,v 1.28 2014/08/05 05:24:26 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -134,7 +134,7 @@ l2cap_accept(struct socket *so, struct m } static int -l2cap_bind(struct socket *so, struct mbuf *nam) +l2cap_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct l2cap_channel *pcb = so->so_pcb; struct sockaddr_bt *sa; @@ -156,7 +156,7 @@ l2cap_bind(struct socket *so, struct mbu } static int -l2cap_listen(struct socket *so) +l2cap_listen(struct socket *so, struct lwp *l) { struct l2cap_channel *pcb = so->so_pcb; @@ -169,7 +169,7 @@ l2cap_listen(struct socket *so) } static int -l2cap_connect(struct socket *so, struct mbuf *nam) +l2cap_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct l2cap_channel *pcb = so->so_pcb; struct sockaddr_bt *sa; Index: src/sys/netbt/rfcomm_socket.c diff -u src/sys/netbt/rfcomm_socket.c:1.29 src/sys/netbt/rfcomm_socket.c:1.30 --- src/sys/netbt/rfcomm_socket.c:1.29 Thu Jul 31 15:16:06 2014 +++ src/sys/netbt/rfcomm_socket.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_socket.c,v 1.29 2014/07/31 15:16:06 rtr Exp $ */ +/* $NetBSD: rfcomm_socket.c,v 1.30 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.29 2014/07/31 15:16:06 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.30 2014/08/05 05:24:26 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -142,7 +142,7 @@ rfcomm_accept(struct socket *so, struct } static int -rfcomm_bind(struct socket *so, struct mbuf *nam) +rfcomm_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct rfcomm_dlc *pcb = so->so_pcb; struct sockaddr_bt *sa; @@ -164,7 +164,7 @@ rfcomm_bind(struct socket *so, struct mb } static int -rfcomm_listen(struct socket *so) +rfcomm_listen(struct socket *so, struct lwp *l) { struct rfcomm_dlc *pcb = so->so_pcb; @@ -177,7 +177,7 @@ rfcomm_listen(struct socket *so) } static int -rfcomm_connect(struct socket *so, struct mbuf *nam) +rfcomm_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct rfcomm_dlc *pcb = so->so_pcb; struct sockaddr_bt *sa; Index: src/sys/netbt/sco_socket.c diff -u src/sys/netbt/sco_socket.c:1.29 src/sys/netbt/sco_socket.c:1.30 --- src/sys/netbt/sco_socket.c:1.29 Thu Jul 31 03:39:35 2014 +++ src/sys/netbt/sco_socket.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sco_socket.c,v 1.29 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: sco_socket.c,v 1.30 2014/08/05 05:24:26 rtr Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.29 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.30 2014/08/05 05:24:26 rtr Exp $"); /* load symbolic names */ #ifdef BLUETOOTH_DEBUG @@ -125,7 +125,7 @@ sco_accept(struct socket *so, struct mbu } static int -sco_bind(struct socket *so, struct mbuf *nam) +sco_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct sco_pcb *pcb = so->so_pcb; struct sockaddr_bt *sa; @@ -147,7 +147,7 @@ sco_bind(struct socket *so, struct mbuf } static int -sco_listen(struct socket *so) +sco_listen(struct socket *so, struct lwp *l) { struct sco_pcb *pcb = so->so_pcb; @@ -160,7 +160,7 @@ sco_listen(struct socket *so) } static int -sco_connect(struct socket *so, struct mbuf *nam) +sco_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct sco_pcb *pcb = so->so_pcb; struct sockaddr_bt *sa; Index: src/sys/netinet/in_pcb.c diff -u src/sys/netinet/in_pcb.c:1.150 src/sys/netinet/in_pcb.c:1.151 --- src/sys/netinet/in_pcb.c:1.150 Sun Aug 3 22:11:50 2014 +++ src/sys/netinet/in_pcb.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.c,v 1.150 2014/08/03 22:11:50 rmind Exp $ */ +/* $NetBSD: in_pcb.c,v 1.151 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -93,7 +93,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.150 2014/08/03 22:11:50 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in_pcb.c,v 1.151 2014/08/05 05:24:26 rtr Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -402,7 +402,7 @@ in_pcbbind_port(struct inpcb *inp, struc } int -in_pcbbind(void *v, struct mbuf *nam) +in_pcbbind(void *v, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = v; struct sockaddr_in *sin = NULL; /* XXXGCC */ @@ -428,12 +428,12 @@ in_pcbbind(void *v, struct mbuf *nam) } /* Bind address. */ - error = in_pcbbind_addr(inp, sin, curlwp->l_cred); + error = in_pcbbind_addr(inp, sin, l->l_cred); if (error) return (error); /* Bind port. */ - error = in_pcbbind_port(inp, sin, curlwp->l_cred); + error = in_pcbbind_port(inp, sin, l->l_cred); if (error) { inp->inp_laddr.s_addr = INADDR_ANY; @@ -527,7 +527,7 @@ in_pcbconnect(void *v, struct mbuf *nam, return (EADDRINUSE); if (in_nullhost(inp->inp_laddr)) { if (inp->inp_lport == 0) { - error = in_pcbbind(inp, NULL); + error = in_pcbbind(inp, NULL, l); /* * This used to ignore the return value * completely, but we need to check for Index: src/sys/netinet/in_pcb.h diff -u src/sys/netinet/in_pcb.h:1.53 src/sys/netinet/in_pcb.h:1.54 --- src/sys/netinet/in_pcb.h:1.53 Thu Jul 24 15:12:03 2014 +++ src/sys/netinet/in_pcb.h Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in_pcb.h,v 1.53 2014/07/24 15:12:03 rtr Exp $ */ +/* $NetBSD: in_pcb.h,v 1.54 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -131,7 +131,7 @@ struct inpcb { #ifdef _KERNEL void in_losing(struct inpcb *); int in_pcballoc(struct socket *, void *); -int in_pcbbind(void *, struct mbuf *); +int in_pcbbind(void *, struct mbuf *, struct lwp *); int in_pcbconnect(void *, struct mbuf *, struct lwp *); void in_pcbdetach(void *); void in_pcbdisconnect(void *); Index: src/sys/netinet/raw_ip.c diff -u src/sys/netinet/raw_ip.c:1.141 src/sys/netinet/raw_ip.c:1.142 --- src/sys/netinet/raw_ip.c:1.141 Sun Aug 3 11:44:52 2014 +++ src/sys/netinet/raw_ip.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip.c,v 1.141 2014/08/03 11:44:52 rtr Exp $ */ +/* $NetBSD: raw_ip.c,v 1.142 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -65,7 +65,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.141 2014/08/03 11:44:52 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.142 2014/08/05 05:24:26 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -558,7 +558,7 @@ rip_accept(struct socket *so, struct mbu } static int -rip_bind(struct socket *so, struct mbuf *nam) +rip_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = sotoinpcb(so); struct sockaddr_in *addr; @@ -596,7 +596,7 @@ release: } static int -rip_listen(struct socket *so) +rip_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -604,7 +604,7 @@ rip_listen(struct socket *so) } static int -rip_connect(struct socket *so, struct mbuf *nam) +rip_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = sotoinpcb(so); int error = 0; Index: src/sys/netinet/tcp_usrreq.c diff -u src/sys/netinet/tcp_usrreq.c:1.195 src/sys/netinet/tcp_usrreq.c:1.196 --- src/sys/netinet/tcp_usrreq.c:1.195 Sat Aug 2 03:55:26 2014 +++ src/sys/netinet/tcp_usrreq.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_usrreq.c,v 1.195 2014/08/02 03:55:26 rtr Exp $ */ +/* $NetBSD: tcp_usrreq.c,v 1.196 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -99,7 +99,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.195 2014/08/02 03:55:26 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.196 2014/08/05 05:24:26 rtr Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -737,7 +737,7 @@ tcp_accept(struct socket *so, struct mbu } static int -tcp_bind(struct socket *so, struct mbuf *nam) +tcp_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = NULL; struct in6pcb *in6p = NULL; @@ -760,12 +760,12 @@ tcp_bind(struct socket *so, struct mbuf switch (so->so_proto->pr_domain->dom_family) { #ifdef INET case PF_INET: - error = in_pcbbind(inp, nam); + error = in_pcbbind(inp, nam, l); break; #endif #ifdef INET6 case PF_INET6: - error = in6_pcbbind(in6p, nam); + error = in6_pcbbind(in6p, nam, l); if (!error) { /* mapped addr case */ if (IN6_IS_ADDR_V4MAPPED(&in6p->in6p_laddr)) @@ -783,7 +783,7 @@ tcp_bind(struct socket *so, struct mbuf } static int -tcp_listen(struct socket *so) +tcp_listen(struct socket *so, struct lwp *l) { struct inpcb *inp = NULL; struct in6pcb *in6p = NULL; @@ -805,14 +805,14 @@ tcp_listen(struct socket *so) s = splsoftnet(); #ifdef INET if (inp && inp->inp_lport == 0) { - error = in_pcbbind(inp, NULL); + error = in_pcbbind(inp, NULL, l); if (error) goto release; } #endif #ifdef INET6 if (in6p && in6p->in6p_lport == 0) { - error = in6_pcbbind(in6p, NULL); + error = in6_pcbbind(in6p, NULL, l); if (error) goto release; } @@ -827,7 +827,7 @@ release: } static int -tcp_connect(struct socket *so, struct mbuf *nam) +tcp_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = NULL; struct in6pcb *in6p = NULL; @@ -854,21 +854,21 @@ tcp_connect(struct socket *so, struct mb #ifdef INET if (inp) { if (inp->inp_lport == 0) { - error = in_pcbbind(inp, NULL); + error = in_pcbbind(inp, NULL, l); if (error) goto release; } - error = in_pcbconnect(inp, nam, curlwp); + error = in_pcbconnect(inp, nam, l); } #endif #ifdef INET6 if (in6p) { if (in6p->in6p_lport == 0) { - error = in6_pcbbind(in6p, NULL); + error = in6_pcbbind(in6p, NULL, l); if (error) goto release; } - error = in6_pcbconnect(in6p, nam, curlwp); + error = in6_pcbconnect(in6p, nam, l); if (!error) { /* mapped addr case */ if (IN6_IS_ADDR_V4MAPPED(&in6p->in6p_faddr)) Index: src/sys/netinet/udp_usrreq.c diff -u src/sys/netinet/udp_usrreq.c:1.213 src/sys/netinet/udp_usrreq.c:1.214 --- src/sys/netinet/udp_usrreq.c:1.213 Sat Aug 2 03:55:26 2014 +++ src/sys/netinet/udp_usrreq.c Tue Aug 5 05:24:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.213 2014/08/02 03:55:26 rtr Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.214 2014/08/05 05:24:26 rtr Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.213 2014/08/02 03:55:26 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.214 2014/08/05 05:24:26 rtr Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -905,7 +905,7 @@ udp_accept(struct socket *so, struct mbu } static int -udp_bind(struct socket *so, struct mbuf *nam) +udp_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = sotoinpcb(so); int error = 0; @@ -916,14 +916,14 @@ udp_bind(struct socket *so, struct mbuf KASSERT(nam != NULL); s = splsoftnet(); - error = in_pcbbind(inp, nam); + error = in_pcbbind(inp, nam, l); splx(s); return error; } static int -udp_listen(struct socket *so) +udp_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -931,7 +931,7 @@ udp_listen(struct socket *so) } static int -udp_connect(struct socket *so, struct mbuf *nam) +udp_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct inpcb *inp = sotoinpcb(so); int error = 0; @@ -942,7 +942,7 @@ udp_connect(struct socket *so, struct mb KASSERT(nam != NULL); s = splsoftnet(); - error = in_pcbconnect(inp, nam, curlwp); + error = in_pcbconnect(inp, nam, l); if (! error) soisconnected(so); splx(s); Index: src/sys/netinet6/in6_pcb.c diff -u src/sys/netinet6/in6_pcb.c:1.127 src/sys/netinet6/in6_pcb.c:1.128 --- src/sys/netinet6/in6_pcb.c:1.127 Sun Aug 3 22:55:24 2014 +++ src/sys/netinet6/in6_pcb.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.c,v 1.127 2014/08/03 22:55:24 rmind Exp $ */ +/* $NetBSD: in6_pcb.c,v 1.128 2014/08/05 05:24:27 rtr Exp $ */ /* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.127 2014/08/03 22:55:24 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.128 2014/08/05 05:24:27 rtr Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -362,7 +362,7 @@ in6_pcbbind_port(struct in6pcb *in6p, st } int -in6_pcbbind(void *v, struct mbuf *nam) +in6_pcbbind(void *v, struct mbuf *nam, struct lwp *l) { struct in6pcb *in6p = v; struct sockaddr_in6 lsin6; @@ -394,12 +394,12 @@ in6_pcbbind(void *v, struct mbuf *nam) } /* Bind address. */ - error = in6_pcbbind_addr(in6p, sin6, curlwp); + error = in6_pcbbind_addr(in6p, sin6, l); if (error) return (error); /* Bind port. */ - error = in6_pcbbind_port(in6p, sin6, curlwp); + error = in6_pcbbind_port(in6p, sin6, l); if (error) { /* * Reset the address here to "any" so we don't "leak" the @@ -540,7 +540,7 @@ in6_pcbconnect(void *v, struct mbuf *nam in6p->in6p_laddr.s6_addr32[3] == 0)) { if (in6p->in6p_lport == 0) { - error = in6_pcbbind(in6p, NULL); + error = in6_pcbbind(in6p, NULL, l); if (error != 0) return error; } Index: src/sys/netinet6/in6_pcb.h diff -u src/sys/netinet6/in6_pcb.h:1.38 src/sys/netinet6/in6_pcb.h:1.39 --- src/sys/netinet6/in6_pcb.h:1.38 Thu Jul 24 15:12:03 2014 +++ src/sys/netinet6/in6_pcb.h Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_pcb.h,v 1.38 2014/07/24 15:12:03 rtr Exp $ */ +/* $NetBSD: in6_pcb.h,v 1.39 2014/08/05 05:24:27 rtr Exp $ */ /* $KAME: in6_pcb.h,v 1.45 2001/02/09 05:59:46 itojun Exp $ */ /* @@ -154,7 +154,7 @@ struct in6pcb { void in6_losing(struct in6pcb *); void in6_pcbinit(struct inpcbtable *, int, int); int in6_pcballoc(struct socket *, void *); -int in6_pcbbind(void *, struct mbuf *); +int in6_pcbbind(void *, struct mbuf *, struct lwp *); int in6_pcbconnect(void *, struct mbuf *, struct lwp *); void in6_pcbdetach(struct in6pcb *); void in6_pcbdisconnect(struct in6pcb *); Index: src/sys/netinet6/raw_ip6.c diff -u src/sys/netinet6/raw_ip6.c:1.132 src/sys/netinet6/raw_ip6.c:1.133 --- src/sys/netinet6/raw_ip6.c:1.132 Thu Jul 31 03:39:35 2014 +++ src/sys/netinet6/raw_ip6.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: raw_ip6.c,v 1.132 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: raw_ip6.c,v 1.133 2014/08/05 05:24:27 rtr Exp $ */ /* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.132 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.133 2014/08/05 05:24:27 rtr Exp $"); #include "opt_ipsec.h" @@ -653,7 +653,7 @@ rip6_accept(struct socket *so, struct mb } static int -rip6_bind(struct socket *so, struct mbuf *nam) +rip6_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct in6pcb *in6p = sotoin6pcb(so); struct sockaddr_in6 *addr; @@ -691,7 +691,7 @@ rip6_bind(struct socket *so, struct mbuf } static int -rip6_listen(struct socket *so) +rip6_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -699,7 +699,7 @@ rip6_listen(struct socket *so) } static int -rip6_connect(struct socket *so, struct mbuf *nam) +rip6_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct in6pcb *in6p = sotoin6pcb(so); struct sockaddr_in6 *addr; Index: src/sys/netinet6/udp6_usrreq.c diff -u src/sys/netinet6/udp6_usrreq.c:1.111 src/sys/netinet6/udp6_usrreq.c:1.112 --- src/sys/netinet6/udp6_usrreq.c:1.111 Thu Jul 31 03:39:35 2014 +++ src/sys/netinet6/udp6_usrreq.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: udp6_usrreq.c,v 1.111 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: udp6_usrreq.c,v 1.112 2014/08/05 05:24:27 rtr Exp $ */ /* $KAME: udp6_usrreq.c,v 1.86 2001/05/27 17:33:00 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.111 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp6_usrreq.c,v 1.112 2014/08/05 05:24:27 rtr Exp $"); #include "opt_inet.h" #include "opt_inet_csum.h" @@ -686,7 +686,7 @@ udp6_accept(struct socket *so, struct mb } static int -udp6_bind(struct socket *so, struct mbuf *nam) +udp6_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { struct in6pcb *in6p = sotoin6pcb(so); int error = 0; @@ -696,13 +696,13 @@ udp6_bind(struct socket *so, struct mbuf KASSERT(in6p != NULL); s = splsoftnet(); - error = in6_pcbbind(in6p, nam); + error = in6_pcbbind(in6p, nam, l); splx(s); return error; } static int -udp6_listen(struct socket *so) +udp6_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -710,7 +710,7 @@ udp6_listen(struct socket *so) } static int -udp6_connect(struct socket *so, struct mbuf *nam) +udp6_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { struct in6pcb *in6p = sotoin6pcb(so); int error = 0; @@ -722,7 +722,7 @@ udp6_connect(struct socket *so, struct m if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr)) return EISCONN; s = splsoftnet(); - error = in6_pcbconnect(in6p, nam, curlwp); + error = in6_pcbconnect(in6p, nam, l); splx(s); if (error == 0) soisconnected(so); Index: src/sys/netipsec/keysock.c diff -u src/sys/netipsec/keysock.c:1.39 src/sys/netipsec/keysock.c:1.40 --- src/sys/netipsec/keysock.c:1.39 Thu Jul 31 03:39:35 2014 +++ src/sys/netipsec/keysock.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: keysock.c,v 1.39 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: keysock.c,v 1.40 2014/08/05 05:24:27 rtr Exp $ */ /* $FreeBSD: src/sys/netipsec/keysock.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $KAME: keysock.c,v 1.25 2001/08/13 20:07:41 itojun Exp $ */ @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.39 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: keysock.c,v 1.40 2014/08/05 05:24:27 rtr Exp $"); #include "opt_ipsec.h" @@ -495,7 +495,7 @@ key_accept(struct socket *so, struct mbu } static int -key_bind(struct socket *so, struct mbuf *nam) +key_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); @@ -503,7 +503,7 @@ key_bind(struct socket *so, struct mbuf } static int -key_listen(struct socket *so) +key_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -511,7 +511,7 @@ key_listen(struct socket *so) } static int -key_connect(struct socket *so, struct mbuf *nam) +key_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); Index: src/sys/netmpls/mpls_proto.c diff -u src/sys/netmpls/mpls_proto.c:1.20 src/sys/netmpls/mpls_proto.c:1.21 --- src/sys/netmpls/mpls_proto.c:1.20 Thu Jul 31 05:37:00 2014 +++ src/sys/netmpls/mpls_proto.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpls_proto.c,v 1.20 2014/07/31 05:37:00 rtr Exp $ */ +/* $NetBSD: mpls_proto.c,v 1.21 2014/08/05 05:24:27 rtr Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.20 2014/07/31 05:37:00 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mpls_proto.c,v 1.21 2014/08/05 05:24:27 rtr Exp $"); #include "opt_inet.h" #include "opt_mbuftrace.h" @@ -103,7 +103,7 @@ mpls_accept(struct socket *so, struct mb } static int -mpls_bind(struct socket *so, struct mbuf *nam) +mpls_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); @@ -111,7 +111,7 @@ mpls_bind(struct socket *so, struct mbuf } static int -mpls_listen(struct socket *so) +mpls_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -119,7 +119,7 @@ mpls_listen(struct socket *so) } static int -mpls_connect(struct socket *so, struct mbuf *nam) +mpls_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); Index: src/sys/netnatm/natm.c diff -u src/sys/netnatm/natm.c:1.41 src/sys/netnatm/natm.c:1.42 --- src/sys/netnatm/natm.c:1.41 Thu Jul 31 03:39:35 2014 +++ src/sys/netnatm/natm.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: natm.c,v 1.41 2014/07/31 03:39:35 rtr Exp $ */ +/* $NetBSD: natm.c,v 1.42 2014/08/05 05:24:27 rtr Exp $ */ /* * Copyright (c) 1996 Charles D. Cranor and Washington University. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.41 2014/07/31 03:39:35 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: natm.c,v 1.42 2014/08/05 05:24:27 rtr Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -106,7 +106,7 @@ natm_accept(struct socket *so, struct mb } static int -natm_bind(struct socket *so, struct mbuf *nam) +natm_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); @@ -114,7 +114,7 @@ natm_bind(struct socket *so, struct mbuf } static int -natm_listen(struct socket *so) +natm_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -122,7 +122,7 @@ natm_listen(struct socket *so) } static int -natm_connect(struct socket *so, struct mbuf *nam) +natm_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { int error = 0, s2; struct natmpcb *npcb; Index: src/sys/rump/net/lib/libsockin/sockin.c diff -u src/sys/rump/net/lib/libsockin/sockin.c:1.54 src/sys/rump/net/lib/libsockin/sockin.c:1.55 --- src/sys/rump/net/lib/libsockin/sockin.c:1.54 Thu Jul 31 03:39:36 2014 +++ src/sys/rump/net/lib/libsockin/sockin.c Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sockin.c,v 1.54 2014/07/31 03:39:36 rtr Exp $ */ +/* $NetBSD: sockin.c,v 1.55 2014/08/05 05:24:27 rtr Exp $ */ /* * Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.54 2014/07/31 03:39:36 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.55 2014/08/05 05:24:27 rtr Exp $"); #include <sys/param.h> #include <sys/condvar.h> @@ -69,9 +69,9 @@ static void sockin_init(void); static int sockin_attach(struct socket *, int); static void sockin_detach(struct socket *); static int sockin_accept(struct socket *, struct mbuf *); -static int sockin_bind(struct socket *, struct mbuf *); -static int sockin_listen(struct socket *); -static int sockin_connect(struct socket *, struct mbuf *); +static int sockin_bind(struct socket *, struct mbuf *, struct lwp *); +static int sockin_listen(struct socket *, struct lwp *); +static int sockin_connect(struct socket *, struct mbuf *, struct lwp *); static int sockin_disconnect(struct socket *); static int sockin_shutdown(struct socket *); static int sockin_abort(struct socket *); @@ -485,7 +485,7 @@ sockin_accept(struct socket *so, struct } static int -sockin_bind(struct socket *so, struct mbuf *nam) +sockin_bind(struct socket *so, struct mbuf *nam, struct lwp *l) { KASSERT(solocked(so)); KASSERT(nam != NULL); @@ -496,7 +496,7 @@ sockin_bind(struct socket *so, struct mb } static int -sockin_listen(struct socket *so) +sockin_listen(struct socket *so, struct lwp *l) { KASSERT(solocked(so)); @@ -504,7 +504,7 @@ sockin_listen(struct socket *so) } static int -sockin_connect(struct socket *so, struct mbuf *nam) +sockin_connect(struct socket *so, struct mbuf *nam, struct lwp *l) { int error = 0; Index: src/sys/sys/protosw.h diff -u src/sys/sys/protosw.h:1.56 src/sys/sys/protosw.h:1.57 --- src/sys/sys/protosw.h:1.56 Thu Jul 31 03:39:36 2014 +++ src/sys/sys/protosw.h Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: protosw.h,v 1.56 2014/07/31 03:39:36 rtr Exp $ */ +/* $NetBSD: protosw.h,v 1.57 2014/08/05 05:24:27 rtr Exp $ */ /*- * Copyright (c) 1982, 1986, 1993 @@ -239,9 +239,9 @@ struct pr_usrreqs { int (*pr_attach)(struct socket *, int); void (*pr_detach)(struct socket *); int (*pr_accept)(struct socket *, struct mbuf *); - int (*pr_bind)(struct socket *, struct mbuf *); - int (*pr_listen)(struct socket *); - int (*pr_connect)(struct socket *, struct mbuf *); + int (*pr_bind)(struct socket *, struct mbuf *, struct lwp *); + int (*pr_listen)(struct socket *, struct lwp *); + int (*pr_connect)(struct socket *, struct mbuf *, struct lwp *); int (*pr_disconnect)(struct socket *); int (*pr_shutdown)(struct socket *); int (*pr_abort)(struct socket *); @@ -312,29 +312,31 @@ name##_accept_wrapper(struct socket *a, return rv; \ } \ static int \ -name##_bind_wrapper(struct socket *a, struct mbuf *b) \ +name##_bind_wrapper(struct socket *a, struct mbuf *b, \ + struct lwp *c) \ { \ int rv; \ KERNEL_LOCK(1, NULL); \ - rv = name##_bind(a, b); \ + rv = name##_bind(a, b, c); \ KERNEL_UNLOCK_ONE(NULL); \ return rv; \ } \ static int \ -name##_connect_wrapper(struct socket *a, struct mbuf *b)\ +name##_connect_wrapper(struct socket *a, \ + struct mbuf *b, struct lwp *c) \ { \ int rv; \ KERNEL_LOCK(1, NULL); \ - rv = name##_connect(a, b); \ + rv = name##_connect(a, b, c); \ KERNEL_UNLOCK_ONE(NULL); \ return rv; \ } \ static int \ -name##_listen_wrapper(struct socket *a) \ +name##_listen_wrapper(struct socket *a, struct lwp *b) \ { \ int rv; \ KERNEL_LOCK(1, NULL); \ - rv = name##_listen(a); \ + rv = name##_listen(a, b); \ KERNEL_UNLOCK_ONE(NULL); \ return rv; \ } \ Index: src/sys/sys/un.h diff -u src/sys/sys/un.h:1.52 src/sys/sys/un.h:1.53 --- src/sys/sys/un.h:1.52 Thu Jul 31 14:12:57 2014 +++ src/sys/sys/un.h Tue Aug 5 05:24:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: un.h,v 1.52 2014/07/31 14:12:57 rtr Exp $ */ +/* $NetBSD: un.h,v 1.53 2014/08/05 05:24:27 rtr Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -84,7 +84,7 @@ kmutex_t *uipc_dgramlock (void); kmutex_t *uipc_streamlock (void); kmutex_t *uipc_rawlock (void); -int unp_connect (struct socket *, struct mbuf *); +int unp_connect (struct socket *, struct mbuf *, struct lwp *); int unp_connect2 (struct socket *, struct socket *, int); void unp_dispose (struct mbuf *); int unp_externalize (struct mbuf *, struct lwp *, int);