From: Mark H. <ma...@os...> - 2004-04-16 17:41:38
|
Here are some patches for your consideration. The recvbcast.c patch allows tipc_bcast_stop access to bnode_outqueue_release. The name_table.c patch fixed an occasional panic where the for loop could run off the end of the seq table. the bcast.c patch moves prev_destnode outside the list_for_each so it isn't continually being zeroed out. Thanks, Mark. Index: recvbcast.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/recvbcast.c,v retrieving revision 1.11 diff -u -r1.11 recvbcast.c --- recvbcast.c 16 Apr 2004 04:03:46 -0000 1.11 +++ recvbcast.c 16 Apr 2004 17:34:33 -0000 @@ -166,7 +166,7 @@ * Input: ackno: the acked packet seqno * Return: void */ -static void bnode_outqueue_release(int ackno) +void bnode_outqueue_release(int ackno) { struct sk_buff *buf; Index: name_table.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/name_table.c,v retrieving revision 1.8 diff -u -r1.8 name_table.c --- name_table.c 16 Apr 2004 04:03:46 -0000 1.8 +++ name_table.c 16 Apr 2004 17:34:33 -0000 @@ -723,6 +723,9 @@ if (high_seq < low_seq) goto not_found; + + if (high_seq >= seq->first_free) + high_seq = seq->first_free -1; spin_lock_bh(&seq->lock); @@ -794,6 +797,9 @@ high_seq = nameseq_find_insert_pos(seq,upper); if (high_seq < 0) high_seq = high_seq < 0 ? ((~high_seq) -1): high_seq; + + if (high_seq >= seq->first_free) + high_seq = seq->first_free -1; if (high_seq < low_seq) goto not_found; Index: bcast.c =================================================================== RCS file: /cvsroot/tipc/source/unstable/net/tipc/bcast.c,v retrieving revision 1.14 diff -u -r1.14 bcast.c --- bcast.c 16 Apr 2004 04:03:46 -0000 1.14 +++ bcast.c 16 Apr 2004 17:34:33 -0000 @@ -427,8 +427,8 @@ int i = 0,prev_destnode; struct mc_identity* mid; + prev_destnode = 0; list_for_each(pos,mc_head) { - prev_destnode = 0; mid = list_entry(pos,struct mc_identity,list); if (mid != NULL && (prev_destnode != mid->node)){ prev_destnode = mid->node; -- Mark Haverkamp <ma...@os...> |