From owner-cvs-src@FreeBSD.ORG Sat May 10 17:21:26 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CC591065676; Sat, 10 May 2008 17:21:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EE3B28FC14; Sat, 10 May 2008 17:21:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4AHLKrQ058972; Sat, 10 May 2008 17:21:20 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4AHLKfv058971; Sat, 10 May 2008 17:21:20 GMT (envelope-from rwatson) Message-Id: <200805101721.m4AHLKfv058971@repoman.freebsd.org> From: Robert Watson Date: Sat, 10 May 2008 17:21:20 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sys/kern uipc_syscalls.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 May 2008 17:21:26 -0000 rwatson 2008-05-10 17:21:20 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/kern uipc_syscalls.c Log: Merge uipc_syscalls.c:1.271 from HEAD to RELENG_7: When writing trailers in sendfile(2), don't call kern_writev() while holding the socket buffer lock. These leads to an immediate panic due to recursing the socket buffer lock. This bug was introduced in uipc_syscalls.c:1.240, but masked by another bug until that was fixed in uipc_syscalls.c:1.269. Note that the current fix isn't perfect, but better than panicking: normally we guarantee that simultaneous invocations of a system call to write on a stream socket won't be interlaced, which is ensured by use of the socket buffer sleep lock. This is guaranteed for the sendfile headers, but not trailers. In practice, this is likely not a problem, but should be fixed. Pointy hat to: andre (1.240), cperciva (1.269) Revision Changes Path 1.259.2.4 +4 -3 src/sys/kern/uipc_syscalls.c