All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] NOMMU: Fix SYSV SHM for NOMMU
@ 2010-01-08 22:05 ` David Howells
  0 siblings, 0 replies; 27+ messages in thread
From: David Howells @ 2010-01-08 22:05 UTC (permalink / raw)
  To: viro, vapier, lethal; +Cc: dhowells, linux-mm, linux-kernel

Commit c4caa778157dbbf04116f0ac2111e389b5cd7a29 broke SYSV SHM for NOMMU by
taking away the pointer to shm_get_unmapped_area() from shm_file_operations.

Put it back conditionally on CONFIG_MMU=n.

file->f_ops->get_unmapped_area() is used to find out the base address for a
mapping of a mappable chardev device or mappable memory-based file (such as a
ramfs file).  It needs to be called prior to file->f_ops->mmap() being called.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 ipc/shm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/ipc/shm.c b/ipc/shm.c
index 92fe923..f2da7d2 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -298,6 +298,7 @@ static const struct file_operations shm_file_operations = {
 	.mmap		= shm_mmap,
 	.fsync		= shm_fsync,
 	.release	= shm_release,
+	.get_unmapped_area	= shm_get_unmapped_area,
 };
 
 static const struct file_operations shm_file_operations_huge = {


^ permalink raw reply related	[flat|nested] 27+ messages in thread
* [PATCH 1/6] NOMMU: Fix SYSV SHM for NOMMU
@ 2010-01-14 13:58 ` David Howells
  0 siblings, 0 replies; 27+ messages in thread
From: David Howells @ 2010-01-14 13:58 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: viro, vapier, lethal, dhowells, linux-mm, linux-kernel

Commit c4caa778157dbbf04116f0ac2111e389b5cd7a29 broke SYSV SHM for NOMMU by
taking away the pointer to shm_get_unmapped_area() from shm_file_operations.

Put it back conditionally on CONFIG_MMU=n.

file->f_ops->get_unmapped_area() is used to find out the base address for a
mapping of a mappable chardev device or mappable memory-based file (such as a
ramfs file).  It needs to be called prior to file->f_ops->mmap() being called.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
---

 ipc/shm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/ipc/shm.c b/ipc/shm.c
index 92fe923..23256b8 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -298,6 +298,9 @@ static const struct file_operations shm_file_operations = {
 	.mmap		= shm_mmap,
 	.fsync		= shm_fsync,
 	.release	= shm_release,
+#ifndef CONFIG_MMU
+	.get_unmapped_area	= shm_get_unmapped_area,
+#endif
 };
 
 static const struct file_operations shm_file_operations_huge = {


^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2010-01-14 14:01 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-08 22:05 [PATCH 1/6] NOMMU: Fix SYSV SHM for NOMMU David Howells
2010-01-08 22:05 ` David Howells
2010-01-08 22:05 ` [PATCH 2/6] NOMMU: struct vm_region's vm_usage count need not be atomic David Howells
2010-01-08 22:05   ` David Howells
2010-01-08 22:05 ` [PATCH 3/6] NOMMU: Remove a superfluous check of vm_region::vm_usage David Howells
2010-01-08 22:05   ` David Howells
2010-01-08 22:05 ` [PATCH 4/6] NOMMU: Don't need get_unmapped_area() for NOMMU David Howells
2010-01-08 22:05   ` David Howells
2010-01-09  0:55   ` Mike Frysinger
2010-01-09  0:55     ` Mike Frysinger
2010-01-11 12:11     ` David Howells
2010-01-11 12:11       ` David Howells
2010-01-08 22:05 ` [PATCH 5/6] NOMMU: Fix race between ramfs truncation and shared mmap David Howells
2010-01-08 22:05   ` David Howells
2010-01-09  0:57   ` Mike Frysinger
2010-01-09  0:57     ` Mike Frysinger
2010-01-09  0:57   ` Mike Frysinger
2010-01-08 22:05 ` [PATCH 6/6] NOMMU: Fix shared mmap after truncate shrinkage problems David Howells
2010-01-08 22:05   ` David Howells
2010-01-08 22:10 ` [PATCH 1/6] NOMMU: Fix SYSV SHM for NOMMU David Howells
2010-01-08 22:10   ` David Howells
2010-01-14  5:36   ` Al Viro
2010-01-14  5:36     ` Al Viro
2010-01-14 13:57     ` David Howells
2010-01-14 13:57       ` David Howells
  -- strict thread matches above, loose matches on Subject: below --
2010-01-14 13:58 David Howells
2010-01-14 13:58 ` David Howells

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.