tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Problem in msdosfs_moutfs



In article 
<336424C1A5A44044B29030055527AA75049F8A5E6A%AUSX7MCPS301.AMER.DELL.COM@localhost>,
 <Gerald_Lee%DELL.com@localhost> wrote:
>-=-=-=-=-=-
>
>     We have a function that mount/umounts a file system a part of a sanity
>check.  When the operation is done rapidly(you really don't want to know) it
>uncovers a problem with mounting a raw device with a block size less than
>1KiB (size of the on disk data structure).  The code always reads a block
>(pmp->pm_BytesPerSec), the problem comes when the buffer is the last one
>in a page, and the following page is not mapped.  The code reads beyond the
>512 bytes in the original read, causing a seg fault in our case.  I don't
>understand why the code doesn't insure the read to be minimum of the
>structure being read from the device.
>     I tried to send this once before, but appear to have mucked it up.  For
>now we have a working fix/
>     Discussed the change with Matt, resulting in the following diff:

Fixed, thanks!

christos



Home | Main Index | Thread Index | Old Index