In article 
<336424c1a5a44044b29030055527aa75049f8a5...@ausx7mcps301.amer.dell.com>,
 <[email protected]> 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

Reply via email to