Skip to contentSkip to conversation

Connection with Smart Z hangs

DISCUSSION Linus Torvalds 2 participants 2 messages Nov 2, 2014 – Nov 3, 2014 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 3 lines · Martin Lang

I debugged a little bit and got the impression that the problem is with the IRDA driver and not libdivecomputer.

Looks that way.

Quoted 2 lines
[  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

Quoted 2 lines
[  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

maintainer
#4 lore raw

From: Linus Torvalds <[email protected]>
Date: Sun, 2 Nov 2014 10:20:22 -0800

Quoted 4 lines

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 <[email protected]>
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.

Quoted 2 lines

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