Bug 123568 - shmget () fails on IPC_NOWAIT flag set.
Summary: shmget () fails on IPC_NOWAIT flag set.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-19 13:02 UTC by Rajesh
Modified: 2015-01-04 22:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-16 04:43:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rajesh 2004-05-19 13:02:42 UTC
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 06:48:30 UTC
fixed with current kernels ?

Comment 2 Dave Jones 2005-04-16 04:43:32 UTC
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.