netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Connection with Smart Z hangs
       [not found]   ` <54566950.5080206@gmail.com>
@ 2014-11-02 18:20     ` Linus Torvalds
  2014-11-03 17:32       ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Torvalds @ 2014-11-02 18:20 UTC (permalink / raw)
  To: Martin Lang, David Miller; +Cc: devel, Network Development

On Sun, Nov 2, 2014 at 9:26 AM, Martin Lang <mlg.hessigheim@gmail.com> wrote:
>
> I debugged a little bit and got the impression that the problem is with the
> IRDA driver and not libdivecomputer.

Looks that way.

> [  767.319321] BUG: unable to handle kernel NULL pointer dereference at (null)
> [  767.320541] CPU: 0 PID: 3093 Comm: smart Not tainted 3.13.0-37-generic #64-Ubuntu

Ugh. 3.13. I guess you can't get anything newer through Ubuntu without
going through some big upgrade of everything.

Not that I see any likely fixes since 3.13. Irda is basically dead
technology, the only user we ever see any more are a very few dive
computers. So nobody maintains it any more.

In fact, we had this very bug reported last *year*, and I debugged it,
and sent my

> [  767.322008]  [<ffffffffa02c75c6>] ? irda_connect+0x156/0x480 [irda]
> [  767.322540] Code:  Bad RIP value.

Ok, it's a call to a NULL pointer, which is bad. The only such call is the

    sk->sk_prot->disconnect()

call, and the "disconnect" function for irda is NULL, always has been
and probably always will be. And nobody has ever fixed this. There was
a thread in late december last year (and early January this year about
this particular oops and another one) where I reported this, and
people agreed that it was all bogus. There was a separate locking
issue too, which wasn't as simple.

David, I'm just going to remove that whole bogus disconnect call. It
won't make things *work* for Martin (because this is all in the
"connect failed" path), but that call as-is is just wrong, wrong,
wrong. And apparently nobody cares about irda any more.

If anybody is at all interested in helping maintain irda code, holler
to David and to the netdev mailing list. The position is up for grabs.

                          Linus

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

* Re: Connection with Smart Z hangs
  2014-11-02 18:20     ` Connection with Smart Z hangs Linus Torvalds
@ 2014-11-03 17:32       ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-03 17:32 UTC (permalink / raw)
  To: torvalds; +Cc: mlg.hessigheim, devel, netdev

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sun, 2 Nov 2014 10:20:22 -0800

> David, I'm just going to remove that whole bogus disconnect call. It
> won't make things *work* for Martin (because this is all in the
> "connect failed" path), but that call as-is is just wrong, wrong,
> wrong. And apparently nobody cares about irda any more.

I totally agree, just kill it.  For the record this got added in:

commit 5b40964eadea40509d353318d2c82e8b7bf5e8a5
Author: Samuel Ortiz <samuel@sortiz.org>
Date:   Mon Oct 11 00:46:51 2010 +0200

    irda: Remove BKL instances from af_irda.c

which claims to be just a locking change, but obviously added
this bogus ->disconnect() call as well.

> If anybody is at all interested in helping maintain irda code, holler
> to David and to the netdev mailing list. The position is up for grabs.

Seriously... :-)

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

end of thread, other threads:[~2014-11-03 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <544782AF.2060406@gmx.de>
     [not found] ` <544D4DBB.9050103@libdivecomputer.org>
     [not found]   ` <54566950.5080206@gmail.com>
2014-11-02 18:20     ` Connection with Smart Z hangs Linus Torvalds
2014-11-03 17:32       ` David Miller

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).