+ nommu-fix-sysv-ipc-shm.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     NOMMU: Fix SYSV IPC SHM
has been added to the -mm tree.  Its filename is
     nommu-fix-sysv-ipc-shm.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: NOMMU: Fix SYSV IPC SHM
From: David Howells <dhowells@xxxxxxxxxx>

Fix the SYSV IPC SHM to work with the changes applied by the new fault handler
patches when CONFIG_MMU=n.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ramfs/file-nommu.c |    7 ++++++-
 ipc/shm.c             |    2 ++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff -puN fs/ramfs/file-nommu.c~nommu-fix-sysv-ipc-shm fs/ramfs/file-nommu.c
--- a/fs/ramfs/file-nommu.c~nommu-fix-sysv-ipc-shm
+++ a/fs/ramfs/file-nommu.c
@@ -295,5 +295,10 @@ unsigned long ramfs_nommu_get_unmapped_a
  */
 int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma)
 {
-	return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS;
+	if (!(vma->vm_flags & VM_SHARED))
+		return -ENOSYS;
+
+	file_accessed(file);
+	vma->vm_ops = &generic_file_vm_ops;
+	return 0;
 }
diff -puN ipc/shm.c~nommu-fix-sysv-ipc-shm ipc/shm.c
--- a/ipc/shm.c~nommu-fix-sysv-ipc-shm
+++ a/ipc/shm.c
@@ -268,7 +268,9 @@ static int shm_mmap(struct file * file, 
 	if (ret != 0)
 		return ret;
 	sfd->vm_ops = vma->vm_ops;
+#ifdef CONFIG_MMU
 	BUG_ON(!sfd->vm_ops->fault);
+#endif
 	vma->vm_ops = &shm_vm_ops;
 	shm_open(vma);
 
_

Patches currently in -mm which might be from dhowells@xxxxxxxxxx are

nommu-fix-sysv-ipc-shm.patch
nommu-present-backing-device-capabilities-for-mtd.patch
nommu-add-support-for-direct-mapping-through-mtdconcat.patch
during-vm-oom-condition-kill-all-threads-in-process-group.patch
afs-fix-file-locking.patch
ecryptfs-add-key-list-structure-search-keyring.patch
64-bit-i_version-afs-fixes.patch
mutex-subsystem-synchro-test-module.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux