Skip to contentSkip to conversation

nommu - nommu patch for fs/namei.c

PATCH In review Hyok S. Choi 1 participant 1 message May 7, 2005 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 nommu - nommu patch for fs/namei.c

nommu patch against 2.6.12-rc3-mm3, fs/namei.c, do_getname() :
to test the segment if it is KERNEL_DS or not is valid for nommu architecture. need to skip it if it is nommu.

fs/namei.c +0 -0
Index: linux-2.6.12-rc3-mm3/fs/namei.c
================================================================

17:45:01.000000000 +0900
@@ -116,12 +116,14 @@
int retval;
unsigned long len = PATH_MAX;

+#ifdef CONFIG_MMU
if (!segment_eq(get_fs(), KERNEL_DS)) {
if ((unsigned long) filename >= TASK_SIZE)
return -EFAULT;
if (TASK_SIZE - (unsigned long) filename < PATH_MAX)
len = TASK_SIZE - (unsigned long) filename;
}
+#endif

retval = strncpy_from_user(page, filename, len); if (retval > 0) {