lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 12 Dec 2007 08:27:32 +0100
From:	"Berkhan, Enrik (GE Infra, Oil & Gas)" <enrik.berkhan@...com>
To:	<trond.myklebust@....uio.no>
Cc:	<linux-kernel@...r.kernel.org>
Subject: [PATCH 1/1] replace 2.6.24-rc1 nfs_file_mmap by generic_file_mmap for nommu systems

Use generic_file_mmap (which is noop in this case) instead of nfs_file_mmap
for nommu systems as suggested by Trond Myklebust.

Signed-Off-By: Enrik Berkhan <Enrik.Berkhan@...com>

---
 fs/nfs/file.c |    8 ++++++++
 1 files changed, 8 insertions(+)

Index: fs/nfs/file.c
===================================================================
--- fs/nfs/file.c.orig	2007-12-04 05:26:10.000000000 +0100
+++ fs/nfs/file.c	2007-12-12 08:15:16.000000000 +0100
@@ -41,7 +41,9 @@
 static int nfs_file_open(struct inode *, struct file *);
 static int nfs_file_release(struct inode *, struct file *);
 static loff_t nfs_file_llseek(struct file *file, loff_t offset, int origin);
+#ifdef CONFIG_MMU
 static int  nfs_file_mmap(struct file *, struct vm_area_struct *);
+#endif
 static ssize_t nfs_file_splice_read(struct file *filp, loff_t *ppos,
 					struct pipe_inode_info *pipe,
 					size_t count, unsigned int flags);
@@ -64,7 +66,11 @@ const struct file_operations nfs_file_op
 	.write		= do_sync_write,
 	.aio_read	= nfs_file_read,
 	.aio_write	= nfs_file_write,
+#ifdef CONFIG_MMU
 	.mmap		= nfs_file_mmap,
+#else
+	.mmap		= generic_file_mmap,
+#endif
 	.open		= nfs_file_open,
 	.flush		= nfs_file_flush,
 	.release	= nfs_file_release,
@@ -269,6 +275,7 @@ nfs_file_splice_read(struct file *filp, 
 	return res;
 }
 
+#ifdef CONFIG_MMU
 static int
 nfs_file_mmap(struct file * file, struct vm_area_struct * vma)
 {
@@ -287,6 +294,7 @@ nfs_file_mmap(struct file * file, struct
 	}
 	return status;
 }
+#endif
 
 /*
  * Flush any dirty pages for this process, and check for write errors.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ