From owner-freebsd-net@FreeBSD.ORG Tue Jun 22 22:50:57 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20FFA16A4CE; Tue, 22 Jun 2004 22:50:57 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E40043D1D; Tue, 22 Jun 2004 22:50:56 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 939A06520F; Tue, 22 Jun 2004 23:50:24 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 72717-01; Tue, 22 Jun 2004 23:50:24 +0100 (BST) Received: from empiric.dek.spc.org (82-147-17-88.dsl.uk.rapidplay.com [82.147.17.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id E3F076520C; Tue, 22 Jun 2004 23:50:23 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id EF924614B; Tue, 22 Jun 2004 23:50:21 +0100 (BST) Date: Tue, 22 Jun 2004 23:50:21 +0100 From: Bruce M Simpson To: freebsd-net@freebsd.org Message-ID: <20040622225021.GH762@empiric.dek.spc.org> Mail-Followup-To: freebsd-net@freebsd.org, Jayanth Vijayaraghavan , freebsd-gnats-submit@freebsd.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline cc: freebsd-gnats-submit@freebsd.org Subject: Re: kern/45733: file descriptor flags and socket flags out of sync X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 22:50:57 -0000 --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I applied the attached patch to -CURRENT from around April which is currently running on my local CVS server. Basic tests with sshd and ftp didn't result in any unexpected behaviour. I suspect I really need to be running an application similar to the one Jayanth is running to unravel things further. Can anyone more familiar with the socket layer than I think of any problems with applying it? Can anyone think of an application (e.g. in ports) which takes the same order of operations as that described in the PR? Regards, BMS --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="accept-sostate.patch" Index: uipc_syscalls.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_syscalls.c,v retrieving revision 1.181 diff -u -r1.181 uipc_syscalls.c --- uipc_syscalls.c 8 Apr 2004 07:14:34 -0000 1.181 +++ uipc_syscalls.c 22 Jun 2004 22:23:16 -0000 @@ -320,6 +320,7 @@ /* connection has been removed from the listen queue */ KNOTE(&head->so_rcv.sb_sel.si_note, 0); + so->so_state |= head->so_state; so->so_state &= ~SS_COMP; so->so_head = NULL; pgid = fgetown(&head->so_sigio); --KN5l+BnMqAQyZLvT--