Return-path: Received: from s131.mittwaldmedien.de ([62.216.178.31]:1181 "EHLO s131.mittwaldmedien.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755467AbYEFJHp (ORCPT ); Tue, 6 May 2008 05:07:45 -0400 From: Holger Schurig To: libertas-dev@lists.infradead.org Subject: BUG: sleeping function called from invalid context Date: Tue, 6 May 2008 11:04:43 +0200 Cc: "Linux Wireless" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <200805061104.43050.hs4233@mail.mn-solutions.de> (sfid-20080506_110701_857800_237FA3DD) Sender: linux-wireless-owner@vger.kernel.org List-ID: Here is something I haven't yet debugged and where I am a little bit clueless. Situation: libertas has associated to an AP successfully and I run "iwconfig eth1 essid BLAHLABER". Everything is o.k. when I run the same command while not associated. What I don't know is why something is calling get_wireless_stats() when setting the essid. This happens way before a call into lbs_set_essid() (the WEXT handler), as can be seen from the log below. libertas enter: lbs_ret_80211_associate() libertas assoc: associated to 00:13:19:80:da:30 ##HS iwconfig eth1 essid BLAHLABER libertas enter: lbs_get_wireless_stats() libertas wext: signal level 0xd2 libertas wext: noise 0xa8 BUG: sleeping function called from invalid context at drivers/net/wireless/libertas/cmd.c:2013 in_atomic():1, irqs_disabled():0 2 locks held by iwconfig/16494: #0: (&p->lock){--..}, at: [] seq_read+0x25/0x267 #1: (dev_base_lock){-.--}, at: [] dev_seq_start+0x1d/0x7f Pid: 16494, comm: iwconfig Not tainted 2.6.25-wl #33 [] __might_sleep+0xb3/0xb8 [] __lbs_cmd+0x8b/0x175 [libertas] [] ? printk+0x15/0x17 [] lbs_get_wireless_stats+0x17e/0x2d4 [libertas] [] ? lbs_cmd_copyback+0x0/0x2d [libertas] [] get_wireless_stats+0x16/0x1c [] wireless_seq_show+0x2f/0xcf [] ? seq_read+0x4f/0x267 [] seq_read+0x190/0x267 [] ? seq_read+0x0/0x267 [] proc_reg_read+0x60/0x74 [] ? proc_reg_read+0x0/0x74 [] vfs_read+0x8a/0x106 [] sys_read+0x3b/0x60 [] sysenter_past_esp+0x5f/0xa5 ======================= BUG: scheduling while atomic: iwconfig/16494/0x00000002 2 locks held by iwconfig/16494: #0: (&p->lock){--..}, at: [] seq_read+0x25/0x267 #1: (dev_base_lock){-.--}, at: [] dev_seq_start+0x1d/0x7f Pid: 16494, comm: iwconfig Not tainted 2.6.25-wl #33 [] __schedule_bug+0x58/0x5f [] schedule+0x5b/0x2d1 [] ? prepare_to_wait+0x4d/0x53 [] __lbs_cmd+0xe1/0x175 [libertas] [] ? autoremove_wake_function+0x0/0x33 [] lbs_get_wireless_stats+0x17e/0x2d4 [libertas] [] ? lbs_cmd_copyback+0x0/0x2d [libertas] [] get_wireless_stats+0x16/0x1c [] wireless_seq_show+0x2f/0xcf [] ? seq_read+0x4f/0x267 [] seq_read+0x190/0x267 [] ? seq_read+0x0/0x267 [] proc_reg_read+0x60/0x74 [] ? proc_reg_read+0x0/0x74 [] vfs_read+0x8a/0x106 [] sys_read+0x3b/0x60 [] sysenter_past_esp+0x5f/0xa5 ======================= BUG: scheduling while atomic: iwconfig/16494/0x00000002 2 locks held by iwconfig/16494: #0: (&p->lock){--..}, at: [] seq_read+0x25/0x267 #1: (dev_base_lock){-.--}, at: [] dev_seq_start+0x1d/0x7f Pid: 16494, comm: iwconfig Not tainted 2.6.25-wl #33 [] __schedule_bug+0x58/0x5f [] schedule+0x5b/0x2d1 [] ? prepare_to_wait+0x4d/0x53 [] __lbs_cmd+0xe1/0x175 [libertas] [] ? autoremove_wake_function+0x0/0x33 [] lbs_get_wireless_stats+0x17e/0x2d4 [libertas] [] ? lbs_cmd_copyback+0x0/0x2d [libertas] [] get_wireless_stats+0x16/0x1c [] wireless_seq_show+0x2f/0xcf [] ? seq_read+0x4f/0x267 [] seq_read+0x190/0x267 [] ? seq_read+0x0/0x267 [] proc_reg_read+0x60/0x74 [] ? proc_reg_read+0x0/0x74 [] vfs_read+0x8a/0x106 [] sys_read+0x3b/0x60 [] sysenter_past_esp+0x5f/0xa5 ======================= libertas enter: lbs_set_essid() libertas wext: requested SSID 'MNHS' This happens with libertas from wireless-testing v2.6.25-6933-g0bacadf.