On Tue, 6 Jun 2006, Hugh Dickins wrote:
> Christoph's patch looks like it will fix the corruption to me (though
> I'd have thought the alternative below a little cleaner, keeping the
> associated tests together and avoiding a second unlock: whatever).
Yup that looks cleaner.
> Whether it's correct depends on what Martin was trying to achieve
> with his test. I'm surprised to find a very ordinary
> #define __swp_type(entry) (((entry).val >> 2) & 0x1f)
> in include/asm-s390/pgtable.h, and no architecture with a more
> limiting mask.
Yes we need to hear from Martin.
> Not really (though the clarity and reassurance of the additional
> MAX_SWAPFILES test is good). We went over it a year or two back,
> and the macro contortions do involve MAX_SWAPFILES_SHIFT: which
> up to and including 2.6.17 has enforced the MAX_SWAPFILES limit.
It looks though as if the testers were able to define more than 32 swap
devices. So there is the danger of overwriting the memory
following the swap info if we do not fix this.
Where are the macro contortions? No arch uses MAX_SWAPFILES_SHIFT for its
definitions and the only other significant use is in swapops.h to
determine the shift.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]