This is the mail archive of the ecos-discuss@sourceware.cygnus.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]

Re: TCP/IP preemption fix


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.

-- 
Grant Edwards
grante@visi.com

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