From owner-freebsd-current@FreeBSD.ORG Wed Jun 20 21:29:54 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB1DA16A421 for ; Wed, 20 Jun 2007 21:29:54 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id A718B13C469 for ; Wed, 20 Jun 2007 21:29:54 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so80130anc for ; Wed, 20 Jun 2007 14:29:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=X8L96g0GM8XZgFc4Nt1P752Mk0v3WfMpwjQAToUIMojAKnC1OdwlJd9/jLCiO+yC4iJDxmfYrnd3JtE8xm0AllaRwafLjN1be/x3+vKbXGJpCKGzGz6ChcIBmCy4w+HkejgBQ4Q27B8MNwrp3sjtBQCzuFg0sNt0vJta9wSAfxA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=YHQc3qjA7o0eYD5fdzzFi+Wx1go6mJUcNiIcoifjpF+aI1Oc7PpIdi0SgC0P4XXyo2G/z8vVDA4i73IO3KYl3fW/lnwycWLguzaXqvHE7oxBbWqMKBovcdmnYKX2m6wFPl8ltG3ectpr3dpd4pu8nW+vBaYwavSWA+/NAGQou3A= Received: by 10.100.127.1 with SMTP id z1mr727138anc.1182374993782; Wed, 20 Jun 2007 14:29:53 -0700 (PDT) Received: by 10.100.154.8 with HTTP; Wed, 20 Jun 2007 14:29:53 -0700 (PDT) Message-ID: Date: Wed, 20 Jun 2007 14:29:53 -0700 From: "Maksim Yevmenkin" To: "Lars Engels" In-Reply-To: <20070616160234.GA16535@e.0x20.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_133300_24646971.1182374993750" References: <20070616160234.GA16535@e.0x20.net> Cc: current@freebsd.org Subject: Re: btsocks_rfcomm_session_mtx / so_snd_sx LOR 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: Wed, 20 Jun 2007 21:29:55 -0000 ------=_Part_133300_24646971.1182374993750 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline please try the attached patch thanks, max On 6/16/07, Lars Engels wrote: > On a ~10 days old CURRENT I get this LOR: > > lock order reversal: (sleepable after non-sleepable) > 1st 0xc4de5120 btsocks_rfcomm_session_mtx (btsocks_rfcomm_session_mtx) > @ > /usr/src/sys/modules/netgraph/bluetooth/socket/../../../../netgraph/bluetooth/socket/ng_btsocket_rfcomm.c:995 > 2nd 0xc4b60118 so_snd_sx (so_snd_sx) @ > /usr/src/sys/kern/uipc_sockbuf.c:145 > KDB: stack backtrace: > db_trace_self_wrapper(c07e20d4,e2502b68,c05d64aa,c07e4585,c4b60118,...) > at db_trace_self_wrapper+0x26 > kdb_backtrace(c07e4585,c4b60118,c07e7d16,c07e7d16,c07e7992,...) at > kdb_backtrace+0x29 > witness_checkorder(c4b60118,9,c07e7992,91,ff,...) at > witness_checkorder+0x6af > _sx_xlock(c4b60118,40,c07e7992,91,e2502c00,...) at _sx_xlock+0x77 > sblock(c4b600dc,2,c05d5db2,c08d0288,c08d0288,...) at sblock+0x65 > sosend_generic(c4b60000,0,0,c46b0e00,0,...) at sosend_generic+0xcb > sosend(c4b60000,0,0,c46b0e00,0,...) at sosend+0x54 > ng_btsocket_rfcomm_sessions_task(0,1,c07e32ed,52,c3b3b89c,...) at > ng_btsocket_rfcomm_sessions_task+0x3c6 > taskqueue_run(c3b3b880,e2502cfc,c0587575,0,0,...) at taskqueue_run+0x108 > taskqueue_swi_giant_run(0,0,c07dc1d7,40b,c3b3b864,...) at > taskqueue_swi_giant_run+0x13 > ithread_loop(c3ba1bc0,e2502d38,0,0,c3ba5c1c,...) at ithread_loop+0x1aa > fork_exit(c05873cb,c3ba1bc0,e2502d38) at fork_exit+0x51 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0, eip = 0, esp = 0xe2502d70, ebp = 0 --- > > > > > -- > Lars Engels > E-Mail: lars.engels@0x20.net > > ------=_Part_133300_24646971.1182374993750 Content-Type: text/plain; name=ng_btsocket_rfcomm.c.patch.txt; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: base64 X-Attachment-Id: f_f36bits6 Content-Disposition: attachment; filename="ng_btsocket_rfcomm.c.patch.txt" LS0tIG5nX2J0c29ja2V0X3JmY29tbS5jLm9yaWcJMjAwNy0wNi0yMCAxNDoxODo0Ni4wMDAwMDAw MDAgLTA3MDAKKysrIG5nX2J0c29ja2V0X3JmY29tbS5jCTIwMDctMDYtMjAgMTQ6MjA6NDIuMDAw MDAwMDAwIC0wNzAwCkBAIC0xNjA2LDggKzE2MDYsOCBAQAogCQkJcmV0dXJuICgwKTsgLyogd2Ug YXJlIGRvbmUgKi8KIAogCQkvKiBDYWxsIHNlbmQgZnVuY3Rpb24gb24gdGhlIEwyQ0FQIHNvY2tl dCAqLwotCQllcnJvciA9IHNvc2VuZChzLT5sMnNvLCBOVUxMLCBOVUxMLCBtLCBOVUxMLCAwLAot CQkgICAgY3VydGhyZWFkIC8qIFhYWCAqLyk7CisJCWVycm9yID0gKCpzLT5sMnNvLT5zb19wcm90 by0+cHJfdXNycmVxcy0+cHJ1X3NlbmQpKHMtPmwyc28sCisJCQkJMCwgbSwgTlVMTCwgTlVMTCwg Y3VydGhyZWFkIC8qIFhYWCAqLyk7CiAJCWlmIChlcnJvciAhPSAwKSB7CiAJCQlOR19CVFNPQ0tF VF9SRkNPTU1fRVJSKAogIiVzOiBDb3VsZCBub3Qgc2VuZCBkYXRhIHRvIEwyQ0FQIHNvY2tldCwg ZXJyb3I9JWRcbiIsIF9fZnVuY19fLCBlcnJvcik7Cg== ------=_Part_133300_24646971.1182374993750--