From owner-freebsd-current@FreeBSD.ORG Sun Sep 4 21:34:59 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 CABB616A421 for ; Sun, 4 Sep 2005 21:34:59 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2030543D45 for ; Sun, 4 Sep 2005 21:34:56 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id j84LYmLI028855; Sun, 4 Sep 2005 14:34:52 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200509042134.j84LYmLI028855@gw.catspoiler.org> Date: Sun, 4 Sep 2005 14:34:48 -0700 (PDT) From: Don Lewis To: bzeeb-lists@lists.zabbadoz.net In-Reply-To: MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: haro@h4.dion.ne.jp, freebsd-current@FreeBSD.org Subject: Re: LOR with iwi and UMA on 7-current 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: Sun, 04 Sep 2005 21:34:59 -0000 On 4 Sep, Bjoern A. Zeeb wrote: > On Thu, 1 Sep 2005, Munehiro Matsuda wrote: > > Hi, > >> lock order reversal >> 1st 0xc0758820 Giant (Giant) @ kern/kern_conf.c:310 >> 2nd 0xc1f36b68 iwi0 (network driver) @ /home/haro/tmp/sys-7/modules/iwi/../../dev/iwi/if_iwi.c:1587 > > added this LOR with ID 150: > http://sources.zabbadoz.net/freebsd/lor.html#150 > >> lock order reversal >> 1st 0xc07a7060 ifnet (ifnet) @ net/if.c:1159 >> 2nd 0xc1f36b68 iwi0 (network driver) @ /home/haro/tmp/sys-7/modules/iwi/../../dev/iwi/if_iwi.c:1643 > > added with LOR ID 151: > http://sources.zabbadoz.net/freebsd/lor.html#151 > >> lock order reversal >> 1st 0xc22c2bb8 rtentry (rtentry) @ net/route.c:1269 >> 2nd 0xc1f36b68 iwi0 (network driver) @ /home/haro/tmp/sys-7/modules/iwi/../../dev/iwi/if_iwi.c:1587 > > added with LOR ID 152: > http://sources.zabbadoz.net/freebsd/lor.html#152 > >> lock order reversal >> 1st 0xc230a1f8 inp (tcpinp) @ netinet/tcp_usrreq.c:368 >> 2nd 0xc1f36b68 iwi0 (network driver) @ /home/haro/tmp/sys-7/modules/iwi/../../dev/iwi/if_iwi.c:1587 > > added with LOR ID 153: > http://sources.zabbadoz.net/freebsd/lor.html#153 > > though quite similar to LOR ID 128: > http://sources.zabbadoz.net/freebsd/lor.html#128 > > >> lock order reversal >> 1st 0xc07a8a6c tcp (tcp) @ netinet/tcp_input.c:615 >> 2nd 0xc1f36b68 iwi0 (network driver) @ /home/haro/tmp/sys-7/modules/iwi/../../dev/iwi/if_iwi.c:1587 > > added with LOR ID 154: > http://sources.zabbadoz.net/freebsd/lor.html#154 These, and probably most or all of the recent LORs involving network driver, have the same cause as LOR #148. The lock order reported in #148 is incorrect, but it was only detected by witness when I added jhb's patch to the witness code. It is triggered by adding the DEVICE_POLLING kernel option. This particular reversal introduces a loop into the lock ordering, and without the witness patch, witness only detects the reversal when the loop is finally closed by code that grabs a lock in the correct order, and with the previous lock happens to traverse the final edge of the loop.