Messages in this thread | | | Subject | Re: 2.6.17-rc5-mm1 | From | Martin Schwidefsky <> | Date | Tue, 06 Jun 2006 19:45:30 +0200 |
| |
On Tue, 2006-06-06 at 10:34 -0700, Martin Bligh wrote: > > I'll go mad if I try to work it out again: I was as worried as you > > when I discovered that test in sys_swapon a year or so ago, apparently > > without any check on MAX_SWAPFILES; and went moaning to Andrew. But > > once I'd worked through swp_type, pte_to_swp_entry, swp_entry_to_pte, > > swp_entry, I did come to the conclusion that the MAX_SWAPFILES bound > > was actually safely built in there. > > If it's that difficult to figure out, is that not reason enough to rip > it all out and replace it? ;-) Life seems quite complicated enough as > it is.
Is it that complicated? You convert UINT_MAX as the type to a swap entry and back to a number. __swp_entry_to_pte() needs to do the correct masking. If it doesn't it is broken. The alternative would be to add architecture defines with the maximum number of swap devices and the maximum swap offset.
-- blue skies, Martin.
Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH
"Reality continues to ruin my life." - Calvin.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |