From owner-freebsd-current Wed Aug 7 18:50:49 2002 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 773B237B400; Wed, 7 Aug 2002 18:50:46 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id DFF3D43E7B; Wed, 7 Aug 2002 18:50:45 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g781oMwr094403; Wed, 7 Aug 2002 18:50:30 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200208080150.g781oMwr094403@gw.catspoiler.org> Date: Wed, 7 Aug 2002 18:50:22 -0700 (PDT) From: Don Lewis Subject: Re: CFR - patch for TCPv6 accept lock violation bug To: suz@kame.net Cc: jhay@icomtek.csir.co.za, hsu@FreeBSD.org, ume@FreeBSD.org, core@kame.net, current@FreeBSD.org In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 8 Aug, SUZUKI Shinsuke wrote: > Hello Don, > >>>>>> On Tue, 6 Aug 2002 16:16:03 -0700 (PDT) >>>>>> dl-freebsd@catspoiler.org(Don Lewis) said: > >> FreeBSD -current detects a lock violation in the IPv6 TCP accept code in >> tcp6_usr_accept() caused by calling in6_mapped_peeraddr(), which calls >> MALLOC() which may block, while a lock is being held. Instead of taking >> the same approach to solve this problem as was done in tcp_usr_accept(), >> which would result in a lot of duplicated code, it looks like a better >> solution is to make a local copy of the address and port information >> before dropping the lock, and then perform all the potentially blocking >> operations after the lock as been dropped. > Generally I agree with your patch, but please give me some time for a > complete review. I'm not in any rush to commit this. I was planning to allow about a week for commment. >> The function prototypes in in_pcb.h and in6_pcb.h don't seem to be >> sorted in any consistent order. > With regard to these files, KAME has no problem for changing the > order, since these files are specific to FreeBSD and don't need to > consider other BSDs. > > So could you please tell me what is the appropriate order? > (or just some consistency is enough?) > (I read style(9), but couldn't find the rule for this.) Before I sent my first message, I had thought that style(9) mandated sorting the prototypes alphabetically, but when I checked style(9), I also didn't find any mention of a preferred order, which is why I said "consistent order". I would think that either using the same order as the function definitions in the .c file or sorting alphabetically would be appropriate. Maybe someone else will speak up ... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message