From owner-cvs-all@FreeBSD.ORG Sun Sep 5 14:33:21 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 632F816A4CE; Sun, 5 Sep 2004 14:33:21 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58A7843D1D; Sun, 5 Sep 2004 14:33:21 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i85EXLSR029735; Sun, 5 Sep 2004 14:33:21 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i85EXLd2029734; Sun, 5 Sep 2004 14:33:21 GMT (envelope-from rwatson) Message-Id: <200409051433.i85EXLd2029734@repoman.freebsd.org> From: Robert Watson Date: Sun, 5 Sep 2004 14:33:21 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern uipc_socket.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2004 14:33:21 -0000 rwatson 2004-09-05 14:33:21 UTC FreeBSD src repository Modified files: sys/kern uipc_socket.c Log: Expand the scope of the socket buffer locks in sopoll() to include the state test as well as set, or we risk a race between a socket wakeup and registering for select() or poll() on the socket. This does increase the cost of the poll operation, but can probably be optimized some in the future. This appears to correct poll() "wedges" experienced with X11 on SMP systems with highly interactive applications, and might affect a plethora of other select() driven applications. RELENG_5 candidate. Problem reported by: Maxim Maximov Debugged with help of: dwhite Revision Changes Path 1.212 +4 -4 src/sys/kern/uipc_socket.c