[Bug 1670] New: IO driver unregister is problematic

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Wed Aug 11 12:35:16 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1670

           Summary: IO driver unregister is problematic
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: sebastian.huber at embedded-brains.de


Created an attachment (id=999)
 --> (https://www.rtems.org/bugzilla/attachment.cgi?id=999)
IO driver with reference counting.

IO drivers will be registered with rtems_io_register_driver() and unregistered
with rtems_io_unregister_driver().  User typically access the drivers via the
file system.  Some drivers have other users e.g. the block device cache
(bdbuf).  Now we have the problem that nobody knows if a driver is in use by
someone.  This is problematic if drivers come and go during the system lifetime
for example in case of removable media (USB sticks).  Currently it is possible
that the driver changes during two read() or write() calls.  We have to
introduce some sort of reference counting.  A simple approach is provided by
the attached patch.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list