From owner-freebsd-current@FreeBSD.ORG Tue Sep 27 17:48:23 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1638C16A41F for ; Tue, 27 Sep 2005 17:48:23 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D87B43D48 for ; Tue, 27 Sep 2005 17:48:22 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j8RHjHHY091253 for freebsd-current@freebsd.org.checked; Tue, 27 Sep 2005 21:45:17 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from [144.206.181.94] (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j8RHhLO0091214; Tue, 27 Sep 2005 21:43:21 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <433984C9.2040403@cronyx.ru> Date: Tue, 27 Sep 2005 21:43:37 +0400 From: Roman Kurakin User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: LOR #55 fix proposal (kern_descrip.c patch) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 17:48:23 -0000 Hi, It seems that the LOR #55 (http://sources.zabbadoz.net/freebsd/lor.html#055) could be fixed by following patch. I need testers and reviewers of it since I want to commit it. I do not see a reason why not to extend action of FILEDESC_LOCK. (http://www.cronyx.ru/~rik/freebsd/lor055/lor55.pch) Index: kern_descrip.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_descrip.c,v retrieving revision 1.280 diff -u -r1.280 kern_descrip.c --- kern_descrip.c 26 Aug 2005 11:16:39 -0000 1.280 +++ kern_descrip.c 27 Sep 2005 17:31:57 -0000 @@ -2275,7 +2275,6 @@ fdused(fdp, indx); if (fp != NULL) FILE_LOCK(fp); - FILEDESC_UNLOCK(fdp); /* * We now own the reference to fp that the ofiles[] array @@ -2283,6 +2282,9 @@ */ if (fp != NULL) fdrop_locked(fp, td); + + FILEDESC_UNLOCK(fdp); + return (0); default: Best regards, rik