This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RedBoot - BUG #23006


There seems to be a bug in the timer code, which could 
adversely affect TCP traffic if RedBoot is waiting for 
an ACK, time could get stuck.  This patch should fix it.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: redboot/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.127
diff -u -5 -p -r1.127 ChangeLog
--- redboot/current/ChangeLog	19 Sep 2003 17:11:33 -0000	1.127
+++ redboot/current/ChangeLog	19 Sep 2003 22:20:39 -0000
@@ -1,7 +1,11 @@
 2003-09-19  Gary Thomas  <gary@mlbassoc.com>
 
+	* src/net/timers.c (__timer_poll): Need to call MS_TICKS_DELAY() or
+	else time will never progress.  This can cause a missed TCP packet
+	to cause the stack to freeze.  BUG #23006
+
 	* src/net/tftp_client.c: Make timeout on very first transaction really
 	long - again since some servers are just slow/ill mannered.
 
 	* src/net/net_io.c: Allow default server IP to be always enabled, thus
 	it can override what is provided by BOOTP/DHCP (since some DHCP servers
Index: redboot/current/src/net/timers.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/net/timers.c,v
retrieving revision 1.3
diff -u -5 -p -r1.3 timers.c
--- redboot/current/src/net/timers.c	23 May 2002 23:08:36 -0000	1.3
+++ redboot/current/src/net/timers.c	19 Sep 2003 22:20:39 -0000
@@ -109,11 +109,11 @@ __timer_poll(void)
     timer_t *prev, *t;
 
     prev = NULL;
     t = tmr_list;
     while (t) {
-	if ((MS_TICKS() - t->start) >= t->delay) {
+	if ((MS_TICKS_DELAY() - t->start) >= t->delay) {
 
 	    /* remove it before calling handler */
 	    if (prev)
 		prev->next = t->next;
 	    else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]