[ECOS] TCP/IP preemption fix

Gary Thomas gthomas@redhat.com
Thu Apr 13 15:50:00 GMT 2000


On 13-Apr-00 Grant Edwards wrote:
> On Wed, Apr 12, 2000 at 06:13:04PM -0600, Gary Thomas wrote:
> 
>> Can you see if these patches fix [at least] the sockbuf corruption
>> problem you were seeing?
> 
> After some additional testing, it seems the problem is still
> there.  It looks like there are routines that access sb structs
> without calling sblock/sbunlock.
> 
> The ones we've found are in code called by the network task:
> tcp_input, tcp_output, etc.  There are calls to sbappend and
> similar functions/macros that result in unprotected accesses to
> sb struct fields.
> 
> My original e-mail pointing out the unreliability of sblock and
> sbunlock didn't identify the entire problem.
> 
>> The basic idea I've incorporated is to use the eCos scheduler
>> lock to emulate the user/kernel behaviour from the BSD world
>> (i.e. kernel code cannot be preempted)
> 
> I think that sblock and sbunlock should work now, but I don't
> think they're called in enough places.
> 

So this seems to be a start.  I'll try and investigate more.
BTW did you see any improvement at all (just to make sure we are
hunting the right fox)?

DO you have a good way to duplicate the failures?  Is it something
I can set up here?  Any/all information on this will be useful.

Thanks.


More information about the Ecos-discuss mailing list