[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140102.034653.1968429090467668489.davem@davemloft.net>
Date: Thu, 02 Jan 2014 03:46:53 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: torvalds@...ux-foundation.org
Cc: samuel@...tiz.org, netdev@...r.kernel.org
Subject: Re: IrDA woes..
From: Linus Torvalds <torvalds@...ux-foundation.org>
Date: Tue, 31 Dec 2013 12:08:43 -0800
> One of the oopses seems simple: irda_attach() will do
I assume you mean irda_connect().
> if (sk->sk_prot->disconnect(sk, flags))
> sock->state = SS_DISCONNECTING;
>
> if the connection fails. But sk_prot->disconnect is NULL for IrDA, so
> that will just oops. Apparently real devices don't end up ever
> triggering that, but I don't think it can ever have worked.
That sk_prot should be irda_proto, which doesn't provide any non-NULL
operations ?!?!
That snippet was probably cut and pasted from another protocol's
create implementation.
Generic code (such as that in net/core/sock.c) checks if the
various sk_prot methods are NULL before trying to invoke them.
I think the thing to do for now is to simply remove those two lines.
I don't believe that anyone has looked closely at this code for
a long time except with automated tools like semantic checkers.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists