LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: Kernel oops with bluetooth usb dongle
@ 2008-02-26  0:03 Quel Qun
  2008-02-26  3:13 ` Marcel Holtmann
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Quel Qun @ 2008-02-26  0:03 UTC (permalink / raw)
  To: Thomas Gleixner, David Woodhouse
  Cc: Dave Young, Marcel Holtmann, LKML, Jiri Kosina, Ingo Molnar

 -------------- Original message ----------------------
From: Thomas Gleixner <tglx@linutronix.de>
> On Fri, 22 Feb 2008, David Woodhouse wrote:
>  
> > On Fri, 2008-02-22 at 08:23 +0100, Thomas Gleixner wrote:
> > > 
> > > +       del_timer(&conn->info_timer);
> > > +
> > >         hcon->l2cap_data = NULL;
> > >         kfree(conn);
> > 
> > Shouldn't that be del_timer_sync() ?
> 
> Hmm, probably yes.
> 
Hi,

Great news: only adding adding del_timer_sync() to 2.6.25-rc3 does prevent the crash.

Bad news: I still cannot use the device.

hcitool inq, hcitool scan, hcitool name <btaddr> and hcitool info <btaddr> 
commands work.

hcitool cc <btaddr>, sdptool <btaddr>, rfcomm connect command fail, most of them 
with a 'Connection reset by peer' error.

# rpm -q bluez-utils
bluez-utils-3.27-1mdv2008.1

Thank you,
--
Eric

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

* Re: Kernel oops with bluetooth usb dongle
  2008-02-26  0:03 Kernel oops with bluetooth usb dongle Quel Qun
@ 2008-02-26  3:13 ` Marcel Holtmann
  2008-02-26  8:28 ` [PATCH] bluetooth: delete timer in l2cap_conn_del() Thomas Gleixner
  2008-02-28  1:03 ` Kernel oops with bluetooth usb dongle Dave Young
  2 siblings, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2008-02-26  3:13 UTC (permalink / raw)
  To: Quel Qun
  Cc: Thomas Gleixner, David Woodhouse, Dave Young, LKML, Jiri Kosina,
	Ingo Molnar

Hi Quel,

> -------------- Original message ----------------------
> From: Thomas Gleixner <tglx@linutronix.de>
>> On Fri, 22 Feb 2008, David Woodhouse wrote:
>>
>>> On Fri, 2008-02-22 at 08:23 +0100, Thomas Gleixner wrote:
>>>>
>>>> +       del_timer(&conn->info_timer);
>>>> +
>>>>        hcon->l2cap_data = NULL;
>>>>        kfree(conn);
>>>
>>> Shouldn't that be del_timer_sync() ?
>>
>> Hmm, probably yes.
>>
> Hi,
>
> Great news: only adding adding del_timer_sync() to 2.6.25-rc3 does  
> prevent the crash.
>
> Bad news: I still cannot use the device.
>
> hcitool inq, hcitool scan, hcitool name <btaddr> and hcitool info  
> <btaddr>
> commands work.
>
> hcitool cc <btaddr>, sdptool <btaddr>, rfcomm connect command fail,  
> most of them
> with a 'Connection reset by peer' error.

what does "hciconfig hci0 version" tell you about your device? Some of  
the none major based Bluetooth chips are broken and might need an  
extra tweak within the USB driver.

Regards

Marcel


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

* [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-26  0:03 Kernel oops with bluetooth usb dongle Quel Qun
  2008-02-26  3:13 ` Marcel Holtmann
@ 2008-02-26  8:28 ` Thomas Gleixner
  2008-02-26 19:38   ` Marcel Holtmann
  2008-02-27  1:43   ` David Miller
  2008-02-28  1:03 ` Kernel oops with bluetooth usb dongle Dave Young
  2 siblings, 2 replies; 14+ messages in thread
From: Thomas Gleixner @ 2008-02-26  8:28 UTC (permalink / raw)
  To: Quel Qun
  Cc: David Woodhouse, Dave Young, Marcel Holtmann, LKML, Jiri Kosina,
	Ingo Molnar

Delete a possibly armed timer before kfree'ing the connection object.

Solves: http://lkml.org/lkml/2008/2/15/514

Reported-by:Quel Qun <kelk1@comcast.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 net/bluetooth/l2cap.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/net/bluetooth/l2cap.c
===================================================================
--- linux-2.6.orig/net/bluetooth/l2cap.c
+++ linux-2.6/net/bluetooth/l2cap.c
@@ -417,6 +417,8 @@ static void l2cap_conn_del(struct hci_co
 		l2cap_sock_kill(sk);
 	}
 
+	del_timer_sync(&conn->info_timer);
+
 	hcon->l2cap_data = NULL;
 	kfree(conn);
 }

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-26  8:28 ` [PATCH] bluetooth: delete timer in l2cap_conn_del() Thomas Gleixner
@ 2008-02-26 19:38   ` Marcel Holtmann
  2008-02-27  1:43   ` David Miller
  1 sibling, 0 replies; 14+ messages in thread
From: Marcel Holtmann @ 2008-02-26 19:38 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Quel Qun, David Woodhouse, Dave Young, LKML, Jiri Kosina, Ingo Molnar

Hi Quel,

> Delete a possibly armed timer before kfree'ing the connection object.
>
> Solves: http://lkml.org/lkml/2008/2/15/514
>
> Reported-by:Quel Qun <kelk1@comcast.net>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> net/bluetooth/l2cap.c |    2 ++
> 1 file changed, 2 insertions(+)
>
> Index: linux-2.6/net/bluetooth/l2cap.c
> ===================================================================
> --- linux-2.6.orig/net/bluetooth/l2cap.c
> +++ linux-2.6/net/bluetooth/l2cap.c
> @@ -417,6 +417,8 @@ static void l2cap_conn_del(struct hci_co
> 		l2cap_sock_kill(sk);
> 	}
>
> +	del_timer_sync(&conn->info_timer);
> +
> 	hcon->l2cap_data = NULL;
> 	kfree(conn);
> }

can you confirm that this actually fixes the issue.

Thomas, if confirmed, this is Acked-by me.

Regards

Marcel


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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-26  8:28 ` [PATCH] bluetooth: delete timer in l2cap_conn_del() Thomas Gleixner
  2008-02-26 19:38   ` Marcel Holtmann
@ 2008-02-27  1:43   ` David Miller
  2008-02-27  9:55     ` Marcel Holtmann
  1 sibling, 1 reply; 14+ messages in thread
From: David Miller @ 2008-02-27  1:43 UTC (permalink / raw)
  To: tglx; +Cc: kelk1, dwmw2, hidave.darkstar, marcel, linux-kernel, jkosina, mingo

From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 26 Feb 2008 09:28:13 +0100 (CET)

> Delete a possibly armed timer before kfree'ing the connection object.
> 
> Solves: http://lkml.org/lkml/2008/2/15/514
> 
> Reported-by:Quel Qun <kelk1@comcast.net>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

I'll apply this, thanks Thomas.

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-27  1:43   ` David Miller
@ 2008-02-27  9:55     ` Marcel Holtmann
  2008-02-27 12:20       ` Thomas Gleixner
  2008-02-27 19:07       ` David Miller
  0 siblings, 2 replies; 14+ messages in thread
From: Marcel Holtmann @ 2008-02-27  9:55 UTC (permalink / raw)
  To: David Miller
  Cc: tglx, kelk1, dwmw2, hidave.darkstar, linux-kernel, jkosina, mingo

Hi Dave,

> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Tue, 26 Feb 2008 09:28:13 +0100 (CET)
>
>> Delete a possibly armed timer before kfree'ing the connection object.
>>
>> Solves: http://lkml.org/lkml/2008/2/15/514
>>
>> Reported-by:Quel Qun <kelk1@comcast.net>
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> I'll apply this, thanks Thomas.

can you please wait for a confirmation from Quel that this fixes it.  
My ACK is based on that he confirms that it fixes it for sure.

Regards

Marcel


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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-27  9:55     ` Marcel Holtmann
@ 2008-02-27 12:20       ` Thomas Gleixner
  2008-02-27 19:07       ` David Miller
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Gleixner @ 2008-02-27 12:20 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: David Miller, kelk1, dwmw2, hidave.darkstar, linux-kernel,
	jkosina, mingo

On Wed, 27 Feb 2008, Marcel Holtmann wrote:

> Hi Dave,
> 
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Tue, 26 Feb 2008 09:28:13 +0100 (CET)
> > 
> > > Delete a possibly armed timer before kfree'ing the connection object.
> > > 
> > > Solves: http://lkml.org/lkml/2008/2/15/514
> > > 
> > > Reported-by:Quel Qun <kelk1@comcast.net>
> > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > 
> > I'll apply this, thanks Thomas.
> 
> can you please wait for a confirmation from Quel that this fixes it. My ACK is
> based on that he confirms that it fixes it for sure.

http://lkml.org/lkml/2008/2/25/463

Thanks,

	tglx

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-27  9:55     ` Marcel Holtmann
  2008-02-27 12:20       ` Thomas Gleixner
@ 2008-02-27 19:07       ` David Miller
  2008-02-27 22:08         ` David Miller
  1 sibling, 1 reply; 14+ messages in thread
From: David Miller @ 2008-02-27 19:07 UTC (permalink / raw)
  To: marcel; +Cc: tglx, kelk1, dwmw2, hidave.darkstar, linux-kernel, jkosina, mingo

From: Marcel Holtmann <marcel@holtmann.org>
Date: Wed, 27 Feb 2008 10:55:07 +0100

> Hi Dave,
> 
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Tue, 26 Feb 2008 09:28:13 +0100 (CET)
> >
> >> Delete a possibly armed timer before kfree'ing the connection object.
> >>
> >> Solves: http://lkml.org/lkml/2008/2/15/514
> >>
> >> Reported-by:Quel Qun <kelk1@comcast.net>
> >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> >
> > I'll apply this, thanks Thomas.
> 
> can you please wait for a confirmation from Quel that this fixes it.  
> My ACK is based on that he confirms that it fixes it for sure.

It doesn't hurt to toss this to Linus now, if it's bogus we
have tons of time to revert it.

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-27 19:07       ` David Miller
@ 2008-02-27 22:08         ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2008-02-27 22:08 UTC (permalink / raw)
  To: marcel; +Cc: tglx, kelk1, dwmw2, hidave.darkstar, linux-kernel, jkosina, mingo


Marcel/Dave, can you or someone else followup with
the bug reportor to get their dongle working now that
the OOPS problem is fixed?

Let's not lose track of this bug, thanks.

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

* Re: Kernel oops with bluetooth usb dongle
  2008-02-26  0:03 Kernel oops with bluetooth usb dongle Quel Qun
  2008-02-26  3:13 ` Marcel Holtmann
  2008-02-26  8:28 ` [PATCH] bluetooth: delete timer in l2cap_conn_del() Thomas Gleixner
@ 2008-02-28  1:03 ` Dave Young
  2008-02-28  1:37   ` Dave Young
  2 siblings, 1 reply; 14+ messages in thread
From: Dave Young @ 2008-02-28  1:03 UTC (permalink / raw)
  To: Quel Qun
  Cc: Thomas Gleixner, David Woodhouse, Marcel Holtmann, LKML,
	Jiri Kosina, Ingo Molnar

On Tue, Feb 26, 2008 at 8:03 AM, Quel Qun <kelk1@comcast.net> wrote:
>  -------------- Original message ----------------------
>  From: Thomas Gleixner <tglx@linutronix.de>
>
>
> > On Fri, 22 Feb 2008, David Woodhouse wrote:
>  >
>  > > On Fri, 2008-02-22 at 08:23 +0100, Thomas Gleixner wrote:
>  > > >
>  > > > +       del_timer(&conn->info_timer);
>  > > > +
>  > > >         hcon->l2cap_data = NULL;
>  > > >         kfree(conn);
>  > >
>  > > Shouldn't that be del_timer_sync() ?
>  >
>  > Hmm, probably yes.
>  >
>  Hi,
>
>  Great news: only adding adding del_timer_sync() to 2.6.25-rc3 does prevent the crash.
>
>  Bad news: I still cannot use the device.
>
>  hcitool inq, hcitool scan, hcitool name <btaddr> and hcitool info <btaddr>
>  commands work.
>
>  hcitool cc <btaddr>, sdptool <btaddr>, rfcomm connect command fail, most of them
>  with a 'Connection reset by peer' error.

Could you send the dmesg and hcidump content while connecting (eg.
rfcomm connect)?

>
>  # rpm -q bluez-utils
>  bluez-utils-3.27-1mdv2008.1
>
>  Thank you,
>  --
>  Eric
>

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

* Re: Kernel oops with bluetooth usb dongle
  2008-02-28  1:03 ` Kernel oops with bluetooth usb dongle Dave Young
@ 2008-02-28  1:37   ` Dave Young
  0 siblings, 0 replies; 14+ messages in thread
From: Dave Young @ 2008-02-28  1:37 UTC (permalink / raw)
  To: Quel Qun
  Cc: Thomas Gleixner, David Woodhouse, Marcel Holtmann, LKML,
	Jiri Kosina, Ingo Molnar, David Miller

add davem to cc-list

On Thu, Feb 28, 2008 at 9:03 AM, Dave Young <hidave.darkstar@gmail.com> wrote:
>
> On Tue, Feb 26, 2008 at 8:03 AM, Quel Qun <kelk1@comcast.net> wrote:
>  >  -------------- Original message ----------------------
>  >  From: Thomas Gleixner <tglx@linutronix.de>
>  >
>  >
>  > > On Fri, 22 Feb 2008, David Woodhouse wrote:
>  >  >
>  >  > > On Fri, 2008-02-22 at 08:23 +0100, Thomas Gleixner wrote:
>  >  > > >
>  >  > > > +       del_timer(&conn->info_timer);
>  >  > > > +
>  >  > > >         hcon->l2cap_data = NULL;
>  >  > > >         kfree(conn);
>  >  > >
>  >  > > Shouldn't that be del_timer_sync() ?
>  >  >
>  >  > Hmm, probably yes.
>  >  >
>  >  Hi,
>  >
>  >  Great news: only adding adding del_timer_sync() to 2.6.25-rc3 does prevent the crash.
>  >
>  >  Bad news: I still cannot use the device.
>  >
>  >  hcitool inq, hcitool scan, hcitool name <btaddr> and hcitool info <btaddr>
>  >  commands work.
>  >
>  >  hcitool cc <btaddr>, sdptool <btaddr>, rfcomm connect command fail, most of them
>  >  with a 'Connection reset by peer' error.
>
>  Could you send the dmesg and hcidump content while connecting (eg.
>  rfcomm connect)?
>
>
>
>  >
>  >  # rpm -q bluez-utils
>  >  bluez-utils-3.27-1mdv2008.1
>  >
>  >  Thank you,
>  >  --
>  >  Eric
>  >
>

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
@ 2008-02-28  1:17 Quel Qun
  0 siblings, 0 replies; 14+ messages in thread
From: Quel Qun @ 2008-02-28  1:17 UTC (permalink / raw)
  To: David Miller, marcel
  Cc: tglx, dwmw2, hidave.darkstar, linux-kernel, jkosina, mingo

 -------------- Original message ----------------------
From: David Miller <davem@davemloft.net>
> 
> Marcel/Dave, can you or someone else followup with
> the bug reporter to get their dongle working now that
> the OOPS problem is fixed?
> 
> Let's not lose track of this bug, thanks.

I entered #10126

http://bugzilla.kernel.org/show_bug.cgi?id=10126

Thank you,
--
kk1

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
  2008-02-27 20:21 [PATCH] bluetooth: delete timer in l2cap_conn_del() Quel Qun
@ 2008-02-27 20:31 ` Thomas Gleixner
  0 siblings, 0 replies; 14+ messages in thread
From: Thomas Gleixner @ 2008-02-27 20:31 UTC (permalink / raw)
  To: Quel Qun
  Cc: David Miller, marcel, dwmw2, hidave.darkstar, linux-kernel,
	jkosina, mingo

On Wed, 27 Feb 2008, Quel Qun wrote:
> > > > I'll apply this, thanks Thomas.
> > > 
> > > can you please wait for a confirmation from Quel that this fixes it.  
> > > My ACK is based on that he confirms that it fixes it for sure.
> > 
> > It doesn't hurt to toss this to Linus now, if it's bogus we
> > have tons of time to revert it.
>
> As I said, it prevents the crash, but does not 'fix' my problem, in
> that I still cannot use the dongle.

The disfunctionality of your dongle is a separate problem and I hope
that the bluetooth wizards will help you to get this sucker running.

The timer which is not deactivated before the data structure
containing it is a simple bug, which needs to be addressed ASAP.

Thanks again for your patience in tracking this down,

	tglx

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

* Re: [PATCH] bluetooth: delete timer in l2cap_conn_del()
@ 2008-02-27 20:21 Quel Qun
  2008-02-27 20:31 ` Thomas Gleixner
  0 siblings, 1 reply; 14+ messages in thread
From: Quel Qun @ 2008-02-27 20:21 UTC (permalink / raw)
  To: David Miller, marcel
  Cc: tglx, dwmw2, hidave.darkstar, linux-kernel, jkosina, mingo


 -------------- Original message ----------------------
From: David Miller <davem@davemloft.net>
> From: Marcel Holtmann <marcel@holtmann.org>
> Date: Wed, 27 Feb 2008 10:55:07 +0100
> 
> > Hi Dave,
> > 
> > > From: Thomas Gleixner <tglx@linutronix.de>
> > > Date: Tue, 26 Feb 2008 09:28:13 +0100 (CET)
> > >
> > >> Delete a possibly armed timer before kfree'ing the connection object.
> > >>
> > >> Solves: http://lkml.org/lkml/2008/2/15/514
> > >>
> > >> Reported-by:Quel Qun <kelk1@comcast.net>
> > >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > >
> > > I'll apply this, thanks Thomas.
> > 
> > can you please wait for a confirmation from Quel that this fixes it.  
> > My ACK is based on that he confirms that it fixes it for sure.
> 
> It doesn't hurt to toss this to Linus now, if it's bogus we
> have tons of time to revert it.

As I said, it prevents the crash, but does not 'fix' my problem, in that I still cannot use the dongle.
--
kk1

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

end of thread, other threads:[~2008-02-28  1:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-26  0:03 Kernel oops with bluetooth usb dongle Quel Qun
2008-02-26  3:13 ` Marcel Holtmann
2008-02-26  8:28 ` [PATCH] bluetooth: delete timer in l2cap_conn_del() Thomas Gleixner
2008-02-26 19:38   ` Marcel Holtmann
2008-02-27  1:43   ` David Miller
2008-02-27  9:55     ` Marcel Holtmann
2008-02-27 12:20       ` Thomas Gleixner
2008-02-27 19:07       ` David Miller
2008-02-27 22:08         ` David Miller
2008-02-28  1:03 ` Kernel oops with bluetooth usb dongle Dave Young
2008-02-28  1:37   ` Dave Young
2008-02-27 20:21 [PATCH] bluetooth: delete timer in l2cap_conn_del() Quel Qun
2008-02-27 20:31 ` Thomas Gleixner
2008-02-28  1:17 Quel Qun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).