Re: [Real fix] Re: Kernel panic: can't push onto full stack

Alexander Viro (viro@math.psu.edu)
Sun, 28 Feb 1999 15:57:18 -0500 (EST)


On Sun, 28 Feb 1999 kuznet@ms2.inr.ac.ru wrote:

> Hello!
>
> > Which was the other problem?
>
> Another problem was that we may have up to 2*max_files unix sockets:
> not-yet-accepted ones are not associated with files/inodes.
>
> We could limit number of unix sockets by max_files,
> but it is still not complete solution: max_files may be decreased.
>
> Using list is always OK, however it also requires reviewing
> af_unix.c: f.e. pending socket destruction must be blocked
> while gc is running.

Only on the marking phase. And there we cannot block. *If* it may happen
within the marking phase we were equally deep in it with the old variant.
I had looked at it back in October and then it seemed to be OK. Notice
that we move skb's with descriptors to separate queue (ones that are going
to be killed, that is) and only then do skb_free() on them. I.e. sweep
phase is safe - all effect of unix_gc() being the reshuffling of queues
followed by gc-less killing of one queue. We don't play with f_count at
all. It is guaranteed to kill all garbage we had when we called unix_gc()
since all references to garbage sockets go to the queue we are killing.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/