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

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


On Sun, 28 Feb 1999, Andrea Arcangeli wrote:

> On Sun, 28 Feb 1999, Alexander Viro wrote:
>
> >diff -urN linux.vanilla/include/net/sock.h linux.bird-unix-gc/include/net/sock.h
> >--- linux.vanilla/include/net/sock.h Tue Feb 23 15:59:28 1999
> >+++ linux.bird-unix-gc/include/net/sock.h Sun Feb 28 13:03:53 1999
> >@@ -99,8 +99,7 @@
> > struct semaphore readsem;
> > struct sock * other;
> > struct sock ** list;
> >- int marksweep;
> >-#define MARKED 1
> >+ struct sock * gc_tree;
>
> Why do you call it a tree even if it's a linked list?

Because it isn't. Suppose we have 5 sockets - A, B, C, D and E.
Initial state:
*dummy
pushing A and B. Result:
dummy <- A <- *B
pop() returns B
dummy <- *A <- B
pushing C
dummy <- A <- *C
<- B
pop() returns C
dummy <- *A <- C
<- B
pop() returns A
*dummy <- A <- C
<- B

D and E are left out of the tree. A, B and C are in.

-
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/