Bug 123568 - shmget () fails on IPC_NOWAIT flag set.
shmget () fails on IPC_NOWAIT flag set.
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-05-19 09:02 EDT by Rajesh
Modified: 2015-01-04 17:06 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-16 00:43:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rajesh 2004-05-19 09:02:42 EDT
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):
Kernel :2.6.0-test5_2

How reproducible:always

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.

Additional info:
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.
Comment 1 Dave Jones 2004-12-07 01:48:30 EST
fixed with current kernels ?
Comment 2 Dave Jones 2005-04-16 00:43:32 EDT
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.

Thank you.

Note You need to log in before you can comment on or make changes to this bug.