All of lore.kernel.org
 help / color / mirror / Atom feed
* BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100
@ 2009-05-05  1:01 Hugo Mildenberger
  2009-05-05  1:12 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Hugo Mildenberger @ 2009-05-05  1:01 UTC (permalink / raw)
  To: linux-bluetooth

When I tried to get a mobile phone connected to asterisk via bluetooth, the 
current git version of the linux bluetooth stack triggers a kernel bug:

	BUG: scheduling while atomic: swapper/0/0x10000100

This is triggered the moment when asterisk tries to pair the phone and leaves 
at least the BT subsystem in an unusable state. 

Commented excerpt from dmesg:

Linux version 2.6.30-rc4-00009-g953cdaa (root@localhost) (gcc version 4.3.2 
(Gentoo 4.3.2-r2 p1.5, pie-10.1.5) ) #2 Tue May 5 01:51:57 CEST 2009

[connecting a Cambridge Silicon Radio USB Bluetooth-Adapter ... ]

usb 4-1: new full speed USB device using ohci_hcd and address 2
usb 4-1: New USB device found, idVendor=0a12, idProduct=0001
usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
usb 4-1: configuration #1 chosen from 1 choice
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: Generic Bluetooth USB driver ver 0.5
usbcore: registered new interface driver btusb
Bluetooth: L2CAP ver 2.14
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO (Voice Link) ver 0.6
Bluetooth: SCO socket layer initialized
Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Bluetooth: BNEP filters: protocol multicast
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM TTY layer initialized
Bluetooth: RFCOMM ver 1.11

[ now asterisk pairs a Nokia GSM phone via chan_mobile ...  ]

BUG: scheduling while atomic: swapper/0/0x10000100

Modules linked in: rfcomm bnep sco l2cap btusb bluetooth radeon drm i2c_core 
xt_time xt_connlimit xt_realm iptable_raw xt_comment xt_recent ipt_ULOG 
ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_LOG ipt_ECN ipt_ecn 
ipt_CLUSTERIP ipt_ah ipt_addrtype nf_nat_tftp nf_nat_snmp_basic nf_nat_sip 
nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda 
ts_kmp nf_conntrack_amanda nf_conntrack_sane nf_conntrack_tftp 
nf_conntrack_sip nf_conntrack_proto_sctp nf_conntrack_pptp 
nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns 
nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp xt_tcpmss xt_pkttype 
xt_owner xt_NFQUEUE xt_NFLOG nfnetlink_log xt_multiport xt_MARK xt_mark 
xt_mac xt_limit xt_length xt_iprange xt_helper xt_hashlimit xt_dscp xt_dccp 
xt_conntrack xt_connmark xt_CLASSIFY xt_tcpudp xt_state iptable_nat nf_nat 
nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_mangle nfnetlink 
iptable_filter ip_tables x_tables arc4 ecb snd_atiixp snd_atiixp_modem 
snd_ac97_codec ac97_bus b43 snd_pcm snd_timer serio_raw snd snd_page_alloc 
mac80211 yenta_socket rsrc_nonstatic pcmcia_core 8139too ati_agp cfg80211

Pid: 0, comm: swapper Not tainted (2.6.30-rc4-00009-g953cdaa #2) Compaq nx9110 
(PG661ES#ABD)   
EIP: 0060:[<c01084f4>] EFLAGS: 00000246 CPU: 0
EIP is at default_idle+0x3b/0x3d
EAX: c04b8000 EBX: c04e55c0 ECX: 8c2de300 EDX: 00000027
ESI: 0009fe00 EDI: c04b2000 EBP: c04b9fb4 ESP: c04b9fb4
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
CR0: 8005003b CR2: b9c5b01c CR3: 183d1000 CR4: 000006d0
DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
DR6: ffff0ff0 DR7: 00000400 
Call Trace:
 [<c0101ed6>] cpu_idle+0x31/0x5b
 [<c0389b1d>] rest_init+0x4d/0x51
 [<c04baa0d>] start_kernel+0x27d/0x2e0
 [<c04ba544>] ? unknown_bootoption+0x0/0x1fb
 [<c04ba324>] i386_start_kernel+0x74/0x81

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100
  2009-05-05  1:01 BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100 Hugo Mildenberger
@ 2009-05-05  1:12 ` Marcel Holtmann
  2009-05-05  1:23   ` Hugo Mildenberger
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2009-05-05  1:12 UTC (permalink / raw)
  To: Hugo Mildenberger; +Cc: linux-bluetooth

Hi Hugo,

> When I tried to get a mobile phone connected to asterisk via bluetooth, the 
> current git version of the linux bluetooth stack triggers a kernel bug:
> 
> 	BUG: scheduling while atomic: swapper/0/0x10000100
> 
> This is triggered the moment when asterisk tries to pair the phone and leaves 
> at least the BT subsystem in an unusable state. 

are you running Linus' tree or bluetooth-testing.git? If your are not
running bluetooth-testing.git, then please try that one since it
includes a fix for it.

Regards

Marcel



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100
  2009-05-05  1:12 ` Marcel Holtmann
@ 2009-05-05  1:23   ` Hugo Mildenberger
  2009-05-05  1:56     ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Hugo Mildenberger @ 2009-05-05  1:23 UTC (permalink / raw)
  To: linux-bluetooth

Am Dienstag, 5. Mai 2009 schrieb Marcel Holtmann:
> Hi Hugo,
>
> > When I tried to get a mobile phone connected to asterisk via bluetooth,
> > the current git version of the linux bluetooth stack triggers a kernel
> > bug:
> >
> > 	BUG: scheduling while atomic: swapper/0/0x10000100
> >
> > This is triggered the moment when asterisk tries to pair the phone and
> > leaves at least the BT subsystem in an unusable state.
>
> are you running Linus' tree or bluetooth-testing.git? If your are not
> running bluetooth-testing.git, then please try that one since it
> includes a fix for it.
>
> Regards
>
> Marcel

Marcel,

I'm running bluetooth-testing.git and pulled that tree just an hour ago.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100
  2009-05-05  1:23   ` Hugo Mildenberger
@ 2009-05-05  1:56     ` Marcel Holtmann
  2009-05-05  6:29       ` Hugo Mildenberger
  0 siblings, 1 reply; 5+ messages in thread
From: Marcel Holtmann @ 2009-05-05  1:56 UTC (permalink / raw)
  To: Hugo Mildenberger; +Cc: linux-bluetooth

[-- Attachment #1: Type: text/plain, Size: 696 bytes --]

Hi Hugo,

> > > When I tried to get a mobile phone connected to asterisk via bluetooth,
> > > the current git version of the linux bluetooth stack triggers a kernel
> > > bug:
> > >
> > > 	BUG: scheduling while atomic: swapper/0/0x10000100
> > >
> > > This is triggered the moment when asterisk tries to pair the phone and
> > > leaves at least the BT subsystem in an unusable state.
> >
> > are you running Linus' tree or bluetooth-testing.git? If your are not
> > running bluetooth-testing.git, then please try that one since it
> > includes a fix for it.
>
> I'm running bluetooth-testing.git and pulled that tree just an hour ago.

does the attached patch fixes your issue?

Regards

Marcel


[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 919 bytes --]

diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 582d887..a05d45e 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -88,10 +88,13 @@ static struct device_type bt_link = {
 static void add_conn(struct work_struct *work)
 {
 	struct hci_conn *conn = container_of(work, struct hci_conn, work_add);
+	struct hci_dev *hdev = conn->hdev;
 
 	/* ensure previous del is complete */
 	flush_work(&conn->work_del);
 
+	dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
+
 	if (device_add(&conn->dev) < 0) {
 		BT_ERR("Failed to register connection device");
 		return;
@@ -154,12 +157,8 @@ void hci_conn_init_sysfs(struct hci_conn *conn)
 
 void hci_conn_add_sysfs(struct hci_conn *conn)
 {
-	struct hci_dev *hdev = conn->hdev;
-
 	BT_DBG("conn %p", conn);
 
-	dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
-
 	queue_work(bt_workq, &conn->work_add);
 }
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100
  2009-05-05  1:56     ` Marcel Holtmann
@ 2009-05-05  6:29       ` Hugo Mildenberger
  0 siblings, 0 replies; 5+ messages in thread
From: Hugo Mildenberger @ 2009-05-05  6:29 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hello Marcel,

> > > > When I tried to get a mobile phone connected to asterisk via
> > > > bluetooth, the current git version of the linux bluetooth stack
> > > > triggers a kernel bug:
> > > >
> > > > 	BUG: scheduling while atomic: swapper/0/0x10000100
> > > >
> > > > This is triggered the moment when asterisk tries to pair the phone
> > > > and leaves at least the BT subsystem in an unusable state.
> > >
> > > are you running Linus' tree or bluetooth-testing.git? If your are not
> > > running bluetooth-testing.git, then please try that one since it
> > > includes a fix for it.
> >
> > I'm running bluetooth-testing.git and pulled that tree just an hour ago.
>
> does the attached patch fixes your issue?
>
> Regards
>
> Marcel

you are really fast ... and your patch actually fixed the problem. Thank you 
very much!

Rests to mention a problem which could again be linked to the bluetooth stack, 
but also to the CSR dongle (which is blacklisted in btusb.c: 0x0a12:0001), to 
Asterisk's "chan_mobile" module or even to the Nokia 6280 V6.43 firmware. 
Should I better start another thread here?


[Outbound GSM call via Asterisk and BT-adapter, wait until the other side 
hangs up]

hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
hci_scodata_packet: hci0 SCO packet for unknown connection handle 46
hci_scodata_packet: hci0 SCO packet for unknown connection handle 47
hci_scodata_packet: hci0 SCO packet for unknown connection handle 47
hci_scodata_packet: hci0 SCO packet for unknown connection handle 47

[Outbound GSM call via Asterisk and BT-adapter, hang up the IP phone up before 
the other side does so]

btusb_isoc_complete: hci0 corrupted SCO packet
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0

[And Asterisk says: - Bluetooth Device Nokia has disconnected, reason (104)]


Best Regards

Hugo

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-05-05  6:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05  1:01 BT git version triggers BUG: scheduling while atomic: swapper/0/0x10000100 Hugo Mildenberger
2009-05-05  1:12 ` Marcel Holtmann
2009-05-05  1:23   ` Hugo Mildenberger
2009-05-05  1:56     ` Marcel Holtmann
2009-05-05  6:29       ` Hugo Mildenberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.