cvs commit: src/sys/kern uipc_socket.c
John Baldwin
jhb at freebsd.org
Tue Nov 29 21:29:52 GMT 2005
On Tuesday 29 November 2005 02:47 pm, Bjoern A. Zeeb wrote:
> On Mon, 28 Nov 2005, Robert Watson wrote:
> > rwatson 2005-11-28 18:09:03 UTC
> >
> > FreeBSD src repository
> >
> > Modified files:
> > sys/kern uipc_socket.c
> > Log:
> > Break out functionality in sosend() responsible for building mbuf
> > chains and copying in mbufs from the body of the send logic, creating
> > a new function sosend_copyin(). This changes makes sosend() almost
> > readable, and will allow the same logic to be used by tailored socket
> > send routines.
> >
> > MFC after: 1 month
> > Reviewed by: andre, glebius
> >
> > Revision Changes Path
> > 1.253 +170 -141 src/sys/kern/uipc_socket.c
>
> there seems to be some locking problem. I can easily reproduce that
> with a dmesg of a bootverbose boot on a ssh connection:
>
> System call write returning with the following locks held:
> exclusive sleep mutex so_snd r = 0 (0xffffff0094a78670) locked @
> /local/building/freebsd/HEAD/sys/kern/uipc_socket.c:884 panic: witness_warn
> KDB: enter: panic
> [thread pid 523 tid 100061 ]
> Stopped at kdb_enter+0x31: leave
Try this patch:
Index: uipc_socket.c
===================================================================
RCS file: /usr/cvs/src/sys/kern/uipc_socket.c,v
retrieving revision 1.254
diff -u -r1.254 uipc_socket.c
--- uipc_socket.c 28 Nov 2005 21:45:36 -0000 1.254
+++ uipc_socket.c 29 Nov 2005 21:28:16 -0000
@@ -716,7 +716,7 @@
}
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK)
-#define snderr(errno) { error = (errno); goto out; }
+#define snderr(errno) { error = (errno); goto release; }
/*
* Send on a socket.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list