Date: Tue, 29 Nov 2005 16:28:40 -0500 From: John Baldwin <jhb@freebsd.org> To: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> Cc: cvs-src@freebsd.org, src-committers@freebsd.org, Robert Watson <rwatson@freebsd.org>, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern uipc_socket.c Message-ID: <200511291628.43123.jhb@freebsd.org> In-Reply-To: <20051129194417.R23990@maildrop.int.zabbadoz.net> References: <200511281809.jASI93Rl006494@repoman.freebsd.org> <20051129194417.R23990@maildrop.int.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511291628.43123.jhb>