lkml.org 
[lkml]   [2012]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ipc/sem.c: prevent ENOMEM in semop() w/ SEM_UNDO flag
Hi Manfred,

(2012-08-04 02:39), Manfred Spraul wrote:
> Hi Seiichi,
>
> On 08/03/2012 02:49 PM, Seiichi Ikarashi wrote:
>> semop() with SEM_UNDO sem_flg can result in ENOMEM even after
>> succeeding semget() with large nsems.
> How large is nsems, what is the use case?
> Which kind of operations are performed?
> Only simple semop(,,1) calls?

A real case was as follows.
semget(IPC_PRIVATE, 70000, IPC_CREAT | IPC_EXCL);
sops[0].sem_num = 0;
sops[0].sem_op = 1;
sops[0].sem_flg = SEM_UNDO;
semop(semid, sops, 1);
>
> <linux/sem.h> still documents ~8000 as the upper limit, I'm not sure if

Ah, I did not know it.

#define SEMMSL 250 /* <= 8 000 max num of semaphores per id */
Thanks,
Seiichi



\
 
 \ /
  Last update: 2012-08-06 01:41    [from the cache]
©2003-2011 Jasper Spaans