summaryrefslogtreecommitdiffstats
path: root/sys/netns
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2001-11-17 03:07:11 +0000
committerdillon <dillon@FreeBSD.org>2001-11-17 03:07:11 +0000
commit86ed17d675cb503ddb3f71f8b6f7c3af530bb29a (patch)
treed5160b5791cda1a8cfbbcd3f5e1bd7ea97561c8f /sys/netns
parentfe91520d395f7879be049a289cbac3389fed1749 (diff)
downloadFreeBSD-src-86ed17d675cb503ddb3f71f8b6f7c3af530bb29a.zip
FreeBSD-src-86ed17d675cb503ddb3f71f8b6f7c3af530bb29a.tar.gz
Give struct socket structures a ref counting interface similar to
vnodes. This will hopefully serve as a base from which we can expand the MP code. We currently do not attempt to obtain any mutex or SX locks, but the door is open to add them when we nail down exactly how that part of it is going to work.
Diffstat (limited to 'sys/netns')
-rw-r--r--sys/netns/idp_usrreq.c4
-rw-r--r--sys/netns/ns_pcb.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netns/idp_usrreq.c b/sys/netns/idp_usrreq.c
index a03770f0..5203961 100644
--- a/sys/netns/idp_usrreq.c
+++ b/sys/netns/idp_usrreq.c
@@ -491,8 +491,8 @@ idp_usrreq(so, req, m, nam, control)
case PRU_ABORT:
ns_pcbdetach(nsp);
- sofree(so);
- soisdisconnected(so);
+ sotryfree(so);
+ soisdisconnected(so); /* XXX huh, called after sofree()? */
break;
case PRU_SOCKADDR:
diff --git a/sys/netns/ns_pcb.c b/sys/netns/ns_pcb.c
index 85f7548..01301c0 100644
--- a/sys/netns/ns_pcb.c
+++ b/sys/netns/ns_pcb.c
@@ -232,7 +232,7 @@ ns_pcbdetach(nsp)
struct socket *so = nsp->nsp_socket;
so->so_pcb = 0;
- sofree(so);
+ sotryfree(so);
if (nsp->nsp_route.ro_rt)
rtfree(nsp->nsp_route.ro_rt);
remque(nsp);
OpenPOWER on IntegriCloud