[Bug 1255] New: filesystem not thread-safe

rtems-bugs at rtems.org rtems-bugs at rtems.org
Mon Aug 27 20:13:19 UTC 2007


           Summary: filesystem not thread-safe
           Product: RTEMS
           Version: 4.8
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: filesystem
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: strauman at slac.stanford.edu

The filesystem framework implements no locking at all.
Most routines within the framework (mknod, open, chmod, ...)
seem to be OK provided that the underlying filesystem
is thread-safe.

OTOH, some primitives (at least read()) suffer from
a race condition within the framework code (two
threads executing read() on the same file concurrently
may clobber 'iop->offset').

The IMFS has no protection against race-conditions whatsoever
and is definitely not thread safe.

Recommendation: review FS code; implement simple locking scheme
within the FS framework itself [maybe with an option for FS implementations
for disabling/overriding] so that locking doesn't have to be re-implemented
by each individual FS [but could be in case a more elaborate scheme
is desired].

Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the bugs mailing list