Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Apr 2014 19:16:20 GMT
From:      Alan Somers <asomers@freebsd.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/188997: lock order reversal: (sleepable after non-sleepable) in lacp_attach
Message-ID:  <201404251916.s3PJGKsv017425@cgiserv.freebsd.org>
Resent-Message-ID: <201404251920.s3PJK0uZ056351@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404251916.s3PJGKsv017425>