From owner-freebsd-bugs@FreeBSD.ORG Fri Apr 25 19:20:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95FE3B76 for ; Fri, 25 Apr 2014 19:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 567D91BA1 for ; Fri, 25 Apr 2014 19:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PJK0Hr056353 for ; Fri, 25 Apr 2014 19:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3PJK0uZ056351; Fri, 25 Apr 2014 19:20:00 GMT (envelope-from gnats) Resent-Date: Fri, 25 Apr 2014 19:20:00 GMT Resent-Message-Id: <201404251920.s3PJK0uZ056351@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alan Somers Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4430DB31 for ; Fri, 25 Apr 2014 19:16:20 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3142C1B73 for ; Fri, 25 Apr 2014 19:16:20 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3PJGKp7017431 for ; Fri, 25 Apr 2014 19:16:20 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3PJGKsv017425; Fri, 25 Apr 2014 19:16:20 GMT (envelope-from nobody) Message-Id: <201404251916.s3PJGKsv017425@cgiserv.freebsd.org> Date: Fri, 25 Apr 2014 19:16:20 GMT From: Alan Somers To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/188997: lock order reversal: (sleepable after non-sleepable) in lacp_attach X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2014 19:20:00 -0000 >Number: 188997 >Category: kern >Synopsis: lock order reversal: (sleepable after non-sleepable) in lacp_attach >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Apr 25 19:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Alan Somers >Release: 11.0 CURRENT >Organization: Spectra Logic >Environment: FreeBSD alans-fbsd-head 11.0-CURRENT FreeBSD 11.0-CURRENT #49 r264887M: Thu Apr 24 17:21:48 MDT 2014 alans@ns1.eng.sldomain.com:/vmpool/obj/usr/home/alans freebsd/head/sys/GENERIC amd64 >Description: r253687 introduced a lock order reversal. It's a lock of a sleepable lock while a nonsleepable lock is still held. The problem is that lacp_attach creates some sysctl nodes, but further up the stack lagg_ioctl called LAGG_WLOCK() on the softc. >How-To-Repeat: ifconfig tap0 create ifconfig tap1 create ifconfig tap2 create ifconfig lagg0 create ifconfig lagg0 up laggproto lacp laggport tap0 laggport tap1 laggport tap2 192.0.0.2/24 >Fix: Two possible solutions come to mind: 1) Move the sysctl node creation out of lacp_attach. Call it from lagg_ioctl after LAGG_WUNLOCK() 2) Turn the sysctl nodes into ioctls instead. That was proposed for a different reason at http://lists.freebsd.org/pipermail/svn-src-head/2013-July/049602.html . >Release-Note: >Audit-Trail: >Unformatted: