[En-Nut-Discussion] Race condition in TCP statemachine

Ole Reinhardt ole.reinhardt at embedded-it.de
Sun Jan 12 20:43:59 CET 2014


Hi Harald,

Am 12.01.2014 12:34, schrieb Harald Kipp:
>> There are still three places, where this kind of race condition still
>> exists:
>>
>> - net/netdebug.c
> 
> As far as netdebug is concerned, I typically use DEV_DEBUG, which
> guarantees not to switch context.

Good point.

>> - hwtest/avr/basemon/webdemo.c:
> 
> I never cared much about this one.

Ok.

>> - app/httpd/httpserv.c:
> 
> Not sure to which version of httpserv you are referring to, but mine
> clearly states
> 
>   /* Take a snapshot of ...
> 
> As you can see in this source, the same applies to the list of timers
> and threads.
> 
> It's quite obvious, that you cannot walk through these lists and doing a
> context switch in between.

Sorry, I did not look well enough :-)

I think we can live with the "bug" in the basemon webdemo, as the
problem only occurs in very rare situations. However I'll leave a
comment there to avoid other users taking this code as a good example.

Bye,

Ole

-- 
kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de


More information about the En-Nut-Discussion mailing list