[Bug 2164] New: RFS file system : error in rtems_rfs_bitmap_create_search in rtems-rfs-bitmaps.c

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Dec 9 18:47:15 UTC 2013


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

             Bug #: 2164
           Summary: RFS file system : error in
                    rtems_rfs_bitmap_create_search in rtems-rfs-bitmaps.c
    Classification: Unclassified
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: Alan.P.Cudmore at nasa.gov


In rtems_rfs_bitmap_create_search, the main loop has a "one off" bug that ends
up propagating an error through the bitmap search. 

This caused RFS to not find blocks in a file system that had non-standard block
sizes. 

At the end of the function, the following clause:
   if (bit == rtems_rfs_bitmap_element_bits ())
    {
      bit = 0;
      search_map++;
      *search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
    }
    else
      bit++;

Should be:
   if (bit == (rtems_rfs_bitmap_element_bits () - 1))
    {
      bit = 0;
      search_map++;
      *search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
    }
    else
      bit++;

I will submit a patch with this fix.

-- 
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