From: Jeroen Vreeken (terhi.victor@logonet.com)
Date: Wed Nov 21 2001 - 21:46:59 EET
On 2001.11.21 19:42:23 +0100 Jeroen Vreeken wrote:
> Appearantly my patch from yesterday was a bit premature...
>
> It looks like the ax25 and netrom stack do some magic with the dead
> sockets
> that is not compatible with sock_orphan. I will try and see if I can
> track
> them down.
Found the cause in datagram_poll() in datagram.c:
if (sock_writeable(sk))
mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
else
set_bit(SOCK_ASYNC_NOSPACE, &sk->socket->flags);
Since our socket is dead its not writeable and the code tries to set
sk->socket->flags
However sk->socket has been set to NULL by sock_orphan()
Adding a check for this solves the problem:
if (sock_writeable(sk))
mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
else
if (sk->socket)
set_bit(SOCK_ASYNC_NOSPACE, &sk->socket->flags);
Is there a reason datagram_poll() should not check this? (Or another place
to do it)
If not I will make a new patch including this change.
Jeroen
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to tdryezo@tntech.edu
More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b30 : Wed Nov 21 2001 - 21:48:26 EET