public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Seiichi Ikarashi <s.ikarashi@jp.fujitsu.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipc/sem.c: prevent ENOMEM in semop() w/ SEM_UNDO flag
Date: Mon, 06 Aug 2012 08:16:34 +0900	[thread overview]
Message-ID: <501EFED2.1070901@jp.fujitsu.com> (raw)
In-Reply-To: <501C0CB6.7070409@colorfullife.com>

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


  reply	other threads:[~2012-08-05 23:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 12:49 [PATCH] ipc/sem.c: prevent ENOMEM in semop() w/ SEM_UNDO flag Seiichi Ikarashi
2012-08-03 17:39 ` Manfred Spraul
2012-08-05 23:16   ` Seiichi Ikarashi [this message]
2012-08-07 11:10     ` Manfred Spraul
2012-08-08  5:53       ` Seiichi Ikarashi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=501EFED2.1070901@jp.fujitsu.com \
    --to=s.ikarashi@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox