Messages in this thread Patch in this message | | | Date | Mon, 29 Jun 1998 02:13:26 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: 2.0.35pre1 __release_sock oops (again) [__release_sock(NULL)] |
| |
On Mon, 29 Jun 1998, Andrea Arcangeli wrote:
>On Sun, 28 Jun 1998, Chris Evans wrote: > >>Jun 27 14:18:03 ferret kernel: esi: 0057e8d0 edi: 00000000 ebp: 00000001 esp: 037f8f2c > ^^^^^^^^^^^^^ > >This patch should avoid the Oops, but it' s not the fix, the bug is still >somewhere (I really don' t know where ;-).
I seen that 2.0.34 adds some xxx_bh_atomic() around release_sock(). With this patch I moved lock_socket() and release_sock() in section bh_atomic, but I really don' t know if it could make sense (nor I have compiled or booted the new kernel). This patch is only a _suggestion_ for kernel hackers that knows how the TCP layer works so _don' t_ apply it to your kernel!
=================================================================== RCS file: linux/net/ipv4/tcp.c,v retrieving revision 1.1 diff -u -r1.1 linux/net/ipv4/tcp.c --- linux/net/ipv4/tcp.c 1998/06/29 00:02:44 1.1 +++ linux/net/ipv4/tcp.c 1998/06/29 00:05:47 @@ -2066,12 +2066,12 @@ add_wait_queue(sk->sleep, &wait); for (;;) { + release_sock(sk); current->state = TASK_INTERRUPTIBLE; end_bh_atomic(); - release_sock(sk); schedule(); - lock_sock(sk); start_bh_atomic(); + lock_sock(sk); skb = tcp_find_established(sk); if (skb) break; @@ -2103,7 +2103,8 @@ if (sk->state != TCP_LISTEN) goto no_listen; - lock_sock(sk);start_bh_atomic(); + start_bh_atomic(); + lock_sock(sk); skb = tcp_find_established(sk); if (skb) { @@ -2114,8 +2115,8 @@ sk->ack_backlog--; error = 0; out: - end_bh_atomic(); release_sock(sk); + end_bh_atomic(); no_listen: sk->err = error; return newsk; Andrea[s] Arcangeli
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |