<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/ipc/shm.c, branch linux-2.6.28.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2009-02-12T17:50:23+00:00</updated>
<entry>
<title>shm: fix shmctl(SHM_INFO) lockup with !CONFIG_SHMEM</title>
<updated>2009-02-12T17:50:23+00:00</updated>
<author>
<name>Tony Battersby</name>
<email>tonyb@cybernetics.com</email>
</author>
<published>2009-02-04T23:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05dc727926f3fdff4cabd368aaf36812cb9ce01a'/>
<id>urn:sha1:05dc727926f3fdff4cabd368aaf36812cb9ce01a</id>
<content type='text'>
commit a68e61e8ff2d46327a37b69056998b47745db6fa upstream.

shm_get_stat() assumes that the inode is a "struct shmem_inode_info",
which is incorrect for !CONFIG_SHMEM (see fs/ramfs/inode.c:
ramfs_get_inode() vs.  mm/shmem.c: shmem_get_inode()).

This bad assumption can cause shmctl(SHM_INFO) to lockup when
shm_get_stat() tries to spin_lock(&amp;info-&gt;lock).  Users of !CONFIG_SHMEM
may encounter this lockup simply by invoking the 'ipcs' command.

Reported by Jiri Olsa back in February 2008:
http://lkml.org/lkml/2008/2/29/74

Signed-off-by: Tony Battersby &lt;tonyb@cybernetics.com&gt;
Cc: Jiri Kosina &lt;jkosina@suse.cz&gt;
Reported-by: Jiri Olsa &lt;olsajiri@gmail.com&gt;
Cc: Hugh Dickins &lt;hugh@veritas.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>System call wrappers part 25</title>
<updated>2009-01-18T18:44:00+00:00</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2009-01-14T13:14:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b7d26f440c19da8e5ac1e8a3f53b7a3fdd1151bd'/>
<id>urn:sha1:b7d26f440c19da8e5ac1e8a3f53b7a3fdd1151bd</id>
<content type='text'>
commit d5460c9974a321a194aded4a8c4daaac68ea8171 upstream.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] introduce fmode_t, do annotations</title>
<updated>2008-10-21T11:47:06+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-09-02T19:28:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=aeb5d727062a0238a2f96c9c380fbd2be4640c6f'/>
<id>urn:sha1:aeb5d727062a0238a2f96c9c380fbd2be4640c6f</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>SHM_LOCKED pages are unevictable</title>
<updated>2008-10-20T15:50:26+00:00</updated>
<author>
<name>Lee Schermerhorn</name>
<email>Lee.Schermerhorn@hp.com</email>
</author>
<published>2008-10-19T03:26:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89e004ea55abe201b29e2d6e35124101f1288ef7'/>
<id>urn:sha1:89e004ea55abe201b29e2d6e35124101f1288ef7</id>
<content type='text'>
Shmem segments locked into memory via shmctl(SHM_LOCKED) should not be
kept on the normal LRU, since scanning them is a waste of time and might
throw off kswapd's balancing algorithms.  Place them on the unevictable
LRU list instead.

Use the AS_UNEVICTABLE flag to mark address_space of SHM_LOCKed shared
memory regions as unevictable.  Then these pages will be culled off the
normal LRU lists during vmscan.

Add new wrapper function to clear the mapping's unevictable state when/if
shared memory segment is munlocked.

Add 'scan_mapping_unevictable_page()' to mm/vmscan.c to scan all pages in
the shmem segment's mapping [struct address_space] for evictability now
that they're no longer locked.  If so, move them to the appropriate zone
lru list.

Changes depend on [CONFIG_]UNEVICTABLE_LRU.

[kosaki.motohiro@jp.fujitsu.com: revert shm change]
Signed-off-by: Lee Schermerhorn &lt;lee.schermerhorn@hp.com&gt;
Signed-off-by: Rik van Riel &lt;riel@redhat.com&gt;
Signed-off-by: Kosaki Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&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: get rid of ipc_lock_down()</title>
<updated>2008-07-25T17:53:42+00:00</updated>
<author>
<name>Nadia Derbey</name>
<email>Nadia.Derbey@bull.net</email>
</author>
<published>2008-07-25T08:48:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00c2bf85d8febfcfddde63822043462b026134ff'/>
<id>urn:sha1:00c2bf85d8febfcfddde63822043462b026134ff</id>
<content type='text'>
Remove the ipc_lock_down() routines: they used to call idr_find() locklessly
(given that the ipc ids lock was already held), so they are not needed
anymore.

Signed-off-by: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Acked-by: "Paul E. McKenney" &lt;paulmck@us.ibm.com&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Cc: Jim Houston &lt;jim.houston@comcast.net&gt;
Cc: Pierre Peiffer &lt;peifferp@gmail.com&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&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>hugetlb: modular state for hugetlb page size</title>
<updated>2008-07-24T17:47:17+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2008-07-24T04:27:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5516438959d90b071ff0a484ce4f3f523dc3152'/>
<id>urn:sha1:a5516438959d90b071ff0a484ce4f3f523dc3152</id>
<content type='text'>
The goal of this patchset is to support multiple hugetlb page sizes.  This
is achieved by introducing a new struct hstate structure, which
encapsulates the important hugetlb state and constants (eg.  huge page
size, number of huge pages currently allocated, etc).

The hstate structure is then passed around the code which requires these
fields, they will do the right thing regardless of the exact hstate they
are operating on.

This patch adds the hstate structure, with a single global instance of it
(default_hstate), and does the basic work of converting hugetlb to use the
hstate.

Future patches will add more hstate structures to allow for different
hugetlbfs mounts to have different page sizes.

[akpm@linux-foundation.org: coding-style fixes]
Acked-by: Adam Litke &lt;agl@us.ibm.com&gt;
Acked-by: Nishanth Aravamudan &lt;nacc@us.ibm.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Nick Piggin &lt;npiggin@suse.de&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>/proc/sysvipc/shm: fix 32-bit truncation of segment sizes</title>
<updated>2008-06-13T01:05:41+00:00</updated>
<author>
<name>Paul Menage</name>
<email>menage@google.com</email>
</author>
<published>2008-06-12T22:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c826818ff55eae7702b778b5f8bdf765af3b2af'/>
<id>urn:sha1:6c826818ff55eae7702b778b5f8bdf765af3b2af</id>
<content type='text'>
sysvipc_shm_proc_show() picks between format strings (based on the
expected maximum length of a SHM segment) in a way that prevents gcc from
performing format checks on the seq_printf() parameters.  This hid two
format errors - shp-&gt;shm_segsz and shp-&gt;shm_nattach are both unsigned
long, but were being printed as unsigned int and signed int respectively.
This leads to 32-bit truncation of SHM segment sizes reported in
/proc/sysvipc/shm.  (And for nattach, but that's less of a problem for
most users).

This patch makes the format string directly visible to gcc's format
specifier checker, and fixes the two broken format specifiers.

Signed-off-by: Paul Menage &lt;menage@google.com&gt;
Cc: Nadia Derbey &lt;Nadia.Derbey@bull.net&gt;
Cc: Manfred Spraul &lt;manfred@colorfullife.com&gt;
Cc: Pierre Peiffer &lt;peifferp@gmail.com&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>shm: Remove silly double assignment</title>
<updated>2008-06-10T14:58:00+00:00</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2008-06-10T12:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c592713b3e124ce0719e6af4bc2520424c49cbae'/>
<id>urn:sha1:c592713b3e124ce0719e6af4bc2520424c49cbae</id>
<content type='text'>
Found a silly double assignment of err is do_shmat.  Silly, but good to
clean up the useless code.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>IPC: consolidate all xxxctl_down() functions</title>
<updated>2008-04-29T15:06:14+00:00</updated>
<author>
<name>Pierre Peiffer</name>
<email>pierre.peiffer@bull.net</email>
</author>
<published>2008-04-29T08:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5f75e7f256f75759ec3d6dbef0ba932f1b397d2'/>
<id>urn:sha1:a5f75e7f256f75759ec3d6dbef0ba932f1b397d2</id>
<content type='text'>
semctl_down(), msgctl_down() and shmctl_down() are used to handle the same set
of commands for each kind of IPC.  They all start to do the same job (they
retrieve the ipc and do some permission checks) before handling the commands
on their own.

This patch proposes to consolidate this by moving these same pieces of code
into one common function called ipcctl_pre_down().

It simplifies a little these xxxctl_down() functions and increases a little
the maintainability.

Signed-off-by: Pierre Peiffer &lt;pierre.peiffer@bull.net&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&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>IPC: introduce ipc_update_perm()</title>
<updated>2008-04-29T15:06:13+00:00</updated>
<author>
<name>Pierre Peiffer</name>
<email>pierre.peiffer@bull.net</email>
</author>
<published>2008-04-29T08:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f4a3809c18ff3107bdbb1fabe3f4e5d2a928321'/>
<id>urn:sha1:8f4a3809c18ff3107bdbb1fabe3f4e5d2a928321</id>
<content type='text'>
The IPC_SET command performs the same permission setting for all IPCs.  This
patch introduces a common ipc_update_perm() function to update these
permissions and makes use of it for all IPCs.

Signed-off-by: Pierre Peiffer &lt;pierre.peiffer@bull.net&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&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>
</feed>
