Date: Thu, 13 Jun 2002 16:55:22 -0700 From: Jeffrey Hsu <hsu@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: current@freebsd.org, yangjihui@yahoo.com Subject: duplicate inp locks Message-ID: <0GXO001FY54144@mta7.pltn13.pbi.net> In-Reply-To: Message from John Baldwin <jhb@FreeBSD.org> "of Thu, 13 Jun 2002 19:37:07 EDT." <XFMail.20020613193707.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> How do you define the order between teh two inp locks to ensure you don't > end up deadlocking? One is the listening connection and the other is the newly created connection. The two inp locks are always acquired in the same order, so there's no possibility of deadlock here. Another case of holding 2 inp locks comes up when traversing the protocol pcb list and holding on to the last inp of interest while examining the rest of the inps to see if there's another one of interest. The pcb list is always walked in sequential list order with a lock held on the list, so there's no possibility of deadlock here. I don't want to add MTX_DUPOK to the inp lock yet, because I want to catch all the cases where duplicate inp locks are held and examine them by hand. But the ones I've investigated so far have been intentional. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0GXO001FY54144>