]> git.baikalelectronics.ru Git - kernel.git/commit
irda: stop calling sk_prot->disconnect() on connection failure
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 2 Nov 2014 18:20:26 +0000 (10:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 2 Nov 2014 18:20:26 +0000 (10:20 -0800)
commitf318b5ec4a53eca13b5dd3a978ca093b2b042ff8
treedbe50ae637e9266fc19b295049e86e2910e35d08
parent92e2ddda715d0c6e35014630fb89a0e952cc71e2
irda: stop calling sk_prot->disconnect() on connection failure

The sk_prot is irda's own set of protocol handlers, so irda should
statically know what that function is anyway, without using an indirect
pointer.  And as it happens, we know *exactly* what that pointer is
statically: it's NULL, because irda doesn't define a disconnect
operation.

So calling that function is doubly wrong, and will just cause an oops.

Reported-by: Martin Lang <mlg.hessigheim@gmail.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
net/irda/af_irda.c