Red Hat Bugzilla – Bug 123568
shmget () fails on IPC_NOWAIT flag set.
Last modified: 2015-01-04 17:06:01 EST
Description of problem: shmget() fails on setting IPC_NOWAIT flag.
the programm fails giving error that EPERM ( errno = 1 ) for normal
user, and ENOMEM ( errno = 12 ) for super user.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.write a C programm, for creating shared memory using shmget() with
IPC_NOWAIT as one of the flag.
2.Compile the programm.
3.run it. We get error
Actual results:gives error.
Expected results:It should execute and create the shared memory.
The same programm executes properly on other versions of linux(2.4.x).
When I gone through the source code of shmget.c
(/usr/src/linux-2.6.0/ipc/shm.c), the function newseg() called by
shmget.c contains a line
if ( shmflg & SHM_HUGETLB )
file = hugetlb_zero_setup(size);
is main culprit for the bug.
fixed with current kernels ?
Fedora Core 2 has now reached end of life, and no further updates will be
provided by Red Hat. The Fedora legacy project will be producing further kernel
updates for security problems only.
If this bug has not been fixed in the latest Fedora Core 2 update kernel, please
try to reproduce it under Fedora Core 3, and reopen if necessary, changing the
product version accordingly.