In article <[EMAIL PROTECTED]>,
Steve Shah <[EMAIL PROTECTED]> writes:
> Hello,
> When using /proc/net/tcp in the following manner:
> while true
> do
> cat /proc/net/tcp
> sleep 3
> done
> I can regularly get the kernel to hard lock in 2.1.121. (2.1.125
> doesn't show any changes in proc.c related to the function
> that takes care of this). I can see that Alexey commented in
> the code that he also got his machine to hard lock but I cannot
> tell from his context whether it was because of using lock_sock
> or the current version which uses SOCKHASH_LOCK() (which
> translates into a start_bh_atomic()).
Could you check if this patch fixes the crashes?
Index: linux/net/ipv4/proc.c
===================================================================
RCS file: /vger/u4/cvs/linux/net/ipv4/proc.c,v
retrieving revision 1.32
diff -u -r1.32 proc.c
--- proc.c 1998/10/03 09:37:42 1.32
+++ proc.c 1998/10/15 10:30:59
@@ -189,6 +189,7 @@
if (format == 0 && sp->state == TCP_LISTEN) {
struct open_request *req;
+ lock_sock(sp);
for (req = sp->tp_pinfo.af_tcp.syn_wait_queue; req;
i++, req = req->dl_next) {
pos += 128;
@@ -199,6 +200,7 @@
if(len >= length)
break;
}
+ release_sock(sp);
}
pos += 128;
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]