diff options
author | dg <dg@FreeBSD.org> | 1997-12-18 09:13:39 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1997-12-18 09:13:39 +0000 |
commit | 5b21cc8b37b50e7ff4efd4a9c80496e272b12e25 (patch) | |
tree | e2e8c4197fdc69d93f7cf2e73ae5a34df3c571e8 /sys/netinet/raw_ip.c | |
parent | 8a27726113b035c8c304407c1e0ba6e3e96637be (diff) | |
download | FreeBSD-src-5b21cc8b37b50e7ff4efd4a9c80496e272b12e25.zip FreeBSD-src-5b21cc8b37b50e7ff4efd4a9c80496e272b12e25.tar.gz |
Call in_pcballoc() at splnet(). As near as I can tell, this won't fix
any instability problems, but it was wrong nonetheless and will be
required in an upcoming round of PCB changes.
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r-- | sys/netinet/raw_ip.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 1faba0d..416cda1 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 - * $Id: raw_ip.c,v 1.48 1997/08/16 19:15:37 wollman Exp $ + * $Id: raw_ip.c,v 1.49 1997/09/14 03:10:40 peter Exp $ */ #include <sys/param.h> @@ -391,7 +391,7 @@ static int rip_attach(struct socket *so, int proto, struct proc *p) { struct inpcb *inp; - int error; + int error, s; inp = sotoinpcb(so); if (inp) @@ -399,8 +399,13 @@ rip_attach(struct socket *so, int proto, struct proc *p) if (p && (error = suser(p->p_ucred, &p->p_acflag)) != 0) return error; - if ((error = soreserve(so, rip_sendspace, rip_recvspace)) || - (error = in_pcballoc(so, &ripcbinfo, p))) + s = splnet(); + error = in_pcballoc(so, &ripcbinfo, p); + splx(s); + if (error) + return error; + error = soreserve(so, rip_sendspace, rip_recvspace); + if (error) return error; inp = (struct inpcb *)so->so_pcb; inp->inp_ip_p = proto; |