Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613AbZI3Ou2 (ORCPT ); Wed, 30 Sep 2009 10:50:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754597AbZI3Ou1 (ORCPT ); Wed, 30 Sep 2009 10:50:27 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:45597 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754585AbZI3Ou0 (ORCPT ); Wed, 30 Sep 2009 10:50:26 -0400 X-Sasl-enc: SWv0ItBB6Cw8OFaZygfxscs4N7YRIlj2thqG3rpIQWJ5 1254322229 Message-ID: <4AC37032.4030901@imap.cc> Date: Wed, 30 Sep 2009 16:50:26 +0200 From: Tilman Schmidt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8.1.23) Gecko/20090825 SeaMonkey/1.1.18 MIME-Version: 1.0 To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org CC: Alan Cox Subject: N_PPP_SYNC ldisc BUG: sleeping function called from invalid context X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3135 Lines: 91 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While testing pppd with capiplugin on kernel 2.6.31 (plus my CAPI and Gigaset patches) I came across this BUG message. (Please ignore the Tainted flag, it's from the Nvidia driver and doesn't influence what's following.) BUG: sleeping function called from invalid context at kernel/mutex.c:280 in_atomic(): 1, irqs_disabled(): 1, pid: 10, name: events/0 INFO: lockdep is turned off. irq event stamp: 2034 hardirqs last enabled at (2033): [] _spin_unlock_irqrestore+0x3c/0x6c hardirqs last disabled at (2034): [] _spin_lock_irq+0x11/0x3f softirqs last enabled at (2008): [] __do_softirq+0x114/0x11c softirqs last disabled at (1971): [] do_softirq+0x69/0xc7 Pid: 10, comm: events/0 Tainted: P 2.6.31-vanilla #1 Call Trace: [] __might_sleep+0x10e/0x116 [] mutex_lock_nested+0x18/0x31 [] tty_unthrottle+0x10/0x38 [] ppp_sync_receive+0x168/0x170 [ppp_synctty] [] handle_minor_recv+0x187/0x1cd [capi] [] capi_recv_message+0x1d9/0x24e [capi] [] recv_handler+0x56/0x6f [kernelcapi] [] worker_thread+0x14a/0x21d [] ? worker_thread+0x12e/0x21d [] ? recv_handler+0x0/0x6f [kernelcapi] [] ? autoremove_wake_function+0x0/0x30 [] kthread+0x64/0x69 [] ? worker_thread+0x0/0x21d [] ? kthread+0x0/0x69 [] kernel_thread_helper+0x7/0x10 Turns out the ppp_sync_receive() function (drivers/net/ppp_synctty.c line 385ff.) has a comment in front stating: /* * This can now be called from hard interrupt level as well * as soft interrupt level or mainline. */ but calls tty_unthrottle() which in turn calls mutex_lock() which of course can sleep. That tty_unthrottle() call was already removed once by commit a6540f731d506d9e82444cf0020e716613d4c46c Author: Alan Cox Date: Mon Jun 22 18:42:29 2009 +0100 ppp: Fix throttling bugs but re-added by commit 4a21b8cb3550f19f838f7c48345fbbf6a0e8536b Author: Linus Torvalds Date: Thu Jul 16 09:14:23 2009 -0700 Revert "ppp: Fix throttling bugs" This reverts commit a6540f731d506d9e82444cf0020e716613d4c46c, as requested by Alan: "... as it was wrong, the pty code is now fixed and the fact this isn't reverted is breaking pptp setups." Opinions? Thanks, Tilman - -- Tilman Schmidt E-Mail: tilman@imap.cc Bonn, Germany Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKw3AyQ3+did9BuFsRAiZXAKCGaos/qZNTlStEP4SE90PA0ZoMAQCdFtvf U9chE7at35y8c6CGGS1IGg0= =Vpq4 -----END PGP SIGNATURE----- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/