Connection with Smart Z hangs

Linus Torvalds torvalds at linux-foundation.org
Sun Nov 2 10:20:22 PST 2014


On Sun, Nov 2, 2014 at 9:26 AM, Martin Lang <mlg.hessigheim at 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


More information about the devel mailing list