1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-27 16:39:08 +00:00

Revert the change in revision 1.77 of kern/uipc_socket2.c. It is causing

a panic because the socket's state isn't as expected by sofree().

Discussed with: dillon, fenner
This commit is contained in:
Alan Cox 2002-11-02 05:14:31 +00:00
parent 30201b6cef
commit 5ee0a409fc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106326
4 changed files with 4 additions and 3 deletions

View File

@ -205,7 +205,7 @@ sonewconn(head, connstatus)
#endif
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) ||
(*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) {
sotryfree(so);
sodealloc(so);
return ((struct socket *)0);
}

View File

@ -231,7 +231,7 @@ sobind(so, nam, td)
return (error);
}
static void
void
sodealloc(struct socket *so)
{

View File

@ -205,7 +205,7 @@ sonewconn(head, connstatus)
#endif
if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) ||
(*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) {
sotryfree(so);
sodealloc(so);
return ((struct socket *)0);
}

View File

@ -405,6 +405,7 @@ int soconnect2(struct socket *so1, struct socket *so2);
int socow_setup(struct mbuf *m0, struct uio *uio);
int socreate(int dom, struct socket **aso, int type, int proto,
struct ucred *cred, struct thread *td);
void sodealloc(struct socket *so);
int sodisconnect(struct socket *so);
void sofree(struct socket *so);
int sogetopt(struct socket *so, struct sockopt *sopt);