On Sun, 13 Apr 2003, Szakacsits Szabolcs wrote:
> There is a bug in load_attribute_list [both 2.4 and 2.5 kernels]. If the
> initialized_size of an attribute list attribute is a multiply of block_size
> but not multiply of cluster size then overflow reported incorrectly and
> inode marked as bad however it's not true. The attached patch should fix it
> but I didn't test it. Thanks to Attila for helping to track down this
> problem [some files couldn't be read, I've seen same reports before also].
Thanks, applied/will apply.
> Two other comments on load_attribute_list():
>
> 1) I don't agree with the sanity check at the function start is in #if
> DEBUG. It should be there always.
Ok, removed debug check.
> 2) I can't see the point checking for LCN_RL_NOT_MAPPED in
> do_partial/do_final. If earlier a same is found then it's
> error however in do_partial/do_final it's OK?
Not sure what you mean. Look at what index to rl[] is being used. It is
only a sanity check to make sure that either the run list is finished at
the next element (rl[1]) or if it is not finished then, it is allowed to
be an unmapped/unallocated element (rl[1]) but in that case it must be
followed by the end with the element after that (rl[2]). In any other
cases from the ones above there is a corrupt attribute IMO, which is what
the check checks for. It also checks the code in so far that it makes sure
we always read to the end of the attribute. The check may be wrong, if you
think it is actually wrong rather than pointless please let me know.
Thanks for the fixes!
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
|