lkml.org 
[lkml]   [2006]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 2.6.17-rc5-mm1
From
Date
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/

\
 
 \ /
  Last update: 2006-06-06 19:47    [W:0.493 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site