<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/ipc/util.c, branch v2.6.24</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.24</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.24'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2007-10-19T18:53:49Z</updated>
<entry>
<title>IPC: fix error case when idr-cache is empty in ipcget()</title>
<updated>2007-10-19T18:53:49Z</updated>
<author>
<name>Pierre Peiffer</name>
<email>Pierre.Peiffer@bull.net</email>
</author>
<published>2007-10-19T06:40:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=283bb7fada7e33a759d8fc9bd7a44532e4ad420e'/>
<id>urn:sha1:283bb7fada7e33a759d8fc9bd7a44532e4ad420e</id>
<content type='text'>
With the use of idr to store the ipc, the case where the idr cache is
empty, when idr_get_new is called (this may happen even if we call
idr_pre_get() before), is not well handled: it lets
semget()/shmget()/msgget() return ENOSPC when this cache is empty, what 1.
does not reflect the facts and 2.  does not conform to the man(s).

This patch fixes this by retrying the whole process of allocation in this case.

Signed-off-by: Pierre Peiffer &lt;pierre.peiffer@bull.net&gt;
Cc: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fix idr_find() locking</title>
<updated>2007-10-19T18:53:48Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e148c79938aa39035669c1cfa3ff60722134535'/>
<id>urn:sha1:3e148c79938aa39035669c1cfa3ff60722134535</id>
<content type='text'>
This is a patch that fixes the way idr_find() used to be called in ipc_lock():
in all the paths that don't imply an update of the ipcs idr, it was called
without the idr tree being locked.

The changes are:
  . in ipc_ids, the mutex has been changed into a reader/writer semaphore.
  . ipc_lock() now takes the mutex as a reader during the idr_find().
  . a new routine ipc_lock_down() has been defined: it doesn't take the
    mutex, assuming that it is being held by the caller. This is the routine
    that is now called in all the update paths.

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Acked-by: Jarek Poplawski &lt;jarkao2@o2.pl&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: fix wrong comments</title>
<updated>2007-10-19T18:53:47Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4566f04854d78acfc74b9acb029744acde9d033'/>
<id>urn:sha1:f4566f04854d78acfc74b9acb029744acde9d033</id>
<content type='text'>
This patch fixes the wrong / obsolete comments in the ipc code.  Also adds
a missing lock around ipc_get_maxid() in shm_get_stat().

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: inline ipc_buildid()</title>
<updated>2007-10-19T18:53:47Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28028313134e9f11e49f74a4beaa47c91e5ebf06'/>
<id>urn:sha1:28028313134e9f11e49f74a4beaa47c91e5ebf06</id>
<content type='text'>
This is a trivial patch that changes the ipc_buildid() routine into a static
inline.

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: introduce the ipcid_to_idx macro</title>
<updated>2007-10-19T18:53:46Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce621f5ba52f30dd59aef4fb50276faee04ef9cf'/>
<id>urn:sha1:ce621f5ba52f30dd59aef4fb50276faee04ef9cf</id>
<content type='text'>
This is a trivial patch that changes all the (id % SEQ_MULTIPLIER) into a call
to the ipcid_to_idx(id) macro.

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: integrate ipc_checkid() into ipc_lock()</title>
<updated>2007-10-19T18:53:44Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=023a53557ea0e987b002e9a844242ef0b0aa1eb3'/>
<id>urn:sha1:023a53557ea0e987b002e9a844242ef0b0aa1eb3</id>
<content type='text'>
This patch introduces a new ipc_lock_check() routine interface:
   . each time ipc_checkid() is called, this is done after calling ipc_lock().
     ipc_checkid() is now called from inside ipc_lock_check().

[akpm@linux-foundation.org: build fix]
[akpm@linux-foundation.org: fix RCU locking]
Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: remove the ipc_get() routine</title>
<updated>2007-10-19T18:53:44Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=637c36634029e4e7c81112796dafc32d56355b4a'/>
<id>urn:sha1:637c36634029e4e7c81112796dafc32d56355b4a</id>
<content type='text'>
This is a trivial patch that removes the ipc_get() routine: it is replaced
by a call to idr_find().

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: unify the syscalls code</title>
<updated>2007-10-19T18:53:44Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7748dbfaa010b12d5fb9ddf80199534c565c6bce'/>
<id>urn:sha1:7748dbfaa010b12d5fb9ddf80199534c565c6bce</id>
<content type='text'>
This patch introduces a change into the sys_msgget(), sys_semget() and
sys_shmget() routines: they now share a common code, which is better for
maintainability.

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>ipc: store ipcs into IDRs</title>
<updated>2007-10-19T18:53:44Z</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2007-10-19T06:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7ca7e564e049d8b350ec9d958ff25eaa24226352'/>
<id>urn:sha1:7ca7e564e049d8b350ec9d958ff25eaa24226352</id>
<content type='text'>
This patch introduces ipcs storage into IDRs. The main changes are:
  . This ipc_ids structure is changed: the entries array is changed into a
    root idr structure.
  . The grow_ary() routine is removed: it is not needed anymore when adding
    an ipc structure, since we are now using the IDR facility.
  . The ipc_rmid() routine interface is changed:
       . there is no need for this routine to return the pointer passed in as
         argument: it is now declared as a void
       . since the id is now part of the kern_ipc_perm structure, no need to
         have it as an argument to the routine

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>remove CONFIG_UTS_NS and CONFIG_IPC_NS</title>
<updated>2007-07-16T16:05:47Z</updated>
<author>
<name>Cedric Le Goater</name>
<email>clg@fr.ibm.com</email>
</author>
<published>2007-07-16T06:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d69a1f4a72b18876c99c697692b78339d491568'/>
<id>urn:sha1:7d69a1f4a72b18876c99c697692b78339d491568</id>
<content type='text'>
CONFIG_UTS_NS and CONFIG_IPC_NS have very little value as they only
deactivate the unshare of the uts and ipc namespaces and do not improve
performance.

Signed-off-by: Cedric Le Goater &lt;clg@fr.ibm.com&gt;
Acked-by: "Serge E. Hallyn" &lt;serue@us.ibm.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Herbert Poetzl &lt;herbert@13thfloor.at&gt;
Cc: Pavel Emelianov &lt;xemul@openvz.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
