[PATCH] change compat shmget size arg to signed

Olaf Hering olh at suse.de
Tue Mar 7 06:38:17 EST 2006


 On Fri, Feb 24, Stephen Rothwell wrote:

> On Fri, 24 Feb 2006 00:27:17 +0100 Olaf Hering <olh at suse.de> wrote:
> >
> >  On Fri, Feb 24, Stephen Rothwell wrote:
> > 
> > > Does the ltp test fail on a standard kernel(where SHMMAX is 0x2000000), or
> > > only on a SLES kernel (where SHMMAX is ULONG_MAX)?
> > 
> > It fails with SLES9 and SLES10. SLES9 has 0x2000000 as default.
> 
> So what was shm_ctlmax set to when the test was run.
> 
> I am trying to figure out why this test:
> 
> if (size < SHMMIN || size > shm_ctlmax)
>                 return -EINVAL;
> 
> Doesn't return -EINVAL for size == 0xffffffff if shm_ctlmax is 0x2000000?

shm_ctlmax is a sysctrl, so it can have anything. The ltp test is
invalid. shmget02 dos not fail after:
echo $(( 0x2000000 )) > /proc/sys/kernel/shmmax 



More information about the Linuxppc-dev mailing list