Re: Fix for thread+network crashes in 2.0/2.1?

A.N.Kuznetsov (kuznet@ms2.inr.ac.ru)
Sun, 1 Mar 1998 19:09:21 +0300 (MSK)


Hello!

> Do you remember where you fixed ipv4 and unix? It might be interesting
> to backport the fixes to a stable 2.0.

Seems, ipv4 was cleaned up, when Dave did new socket hash.
The only things that I found now is missing sk->dead = 1 in
raw_close, which will sometimes kill 2.0, when you exit ping pinging
dead interface.

Yes, it superb, that you reminded it. af_unix.c is really NOT clean.
It makes wrong sender based flow control on datagram sockets,
which makes impossible to use them for secure applications.
(every client can kill server not reading replies :-) :-))

And one of obstacles to repair it is this damn wake up problem.
Namely, we will need to sleep on wait queue of PEER,
so that peer inode cannot be released.
Look at netlink_release() af_netlink.c, I put comment there.
Netlink is essentially unix datagram socket with correct flow control
and it makes its closing VERY ugly. It is the place where it would be
better to play with inode->i_count. Probably, unix socket are even
more complicated, because they expect that every inode has associated
file struct and vice versa (for SCM_RIGHTS garbage collection).
It would be good to repair it before 2.2.

Alexey

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu