diff -ur linux-2.4.6.uc0pre0.orig/fs/proc/kcore.c linux-2.4.6.uc0pre0.actiontec/fs/proc/kcore.c
--- linux-2.4.6.uc0pre0.orig/fs/proc/kcore.c	2001-01-16 01:54:20.000000000 +0100
+++ linux-2.4.6.uc0pre0.actiontec/fs/proc/kcore.c	2004-12-06 19:35:49.000000000 +0100
@@ -119,6 +119,11 @@
 
 	*num_vma = 0;
 	size = ((size_t)high_memory - PAGE_OFFSET + PAGE_SIZE);
+#ifdef NO_MM
+	/* vmlist is not available then */
+	*elf_buflen = PAGE_SIZE;
+	return size;
+#else
 	if (!vmlist) {
 		*elf_buflen = PAGE_SIZE;
 		return (size);
@@ -135,6 +140,7 @@
 			3 * sizeof(struct memelfnote);
 	*elf_buflen = PAGE_ALIGN(*elf_buflen);
 	return (size - PAGE_OFFSET + *elf_buflen);
+#endif
 }
 
 
@@ -243,6 +249,7 @@
 	phdr->p_filesz	= phdr->p_memsz = ((unsigned long)high_memory - PAGE_OFFSET);
 	phdr->p_align	= PAGE_SIZE;
 
+#ifndef NO_MM
 	/* setup ELF PT_LOAD program header for every vmalloc'd area */
 	for (m=vmlist; m; m=m->next) {
 		if (m->flags & VM_IOREMAP) /* don't dump ioremap'd stuff! (TA) */
@@ -260,6 +267,7 @@
 		phdr->p_filesz	= phdr->p_memsz	= m->size;
 		phdr->p_align	= PAGE_SIZE;
 	}
+#endif /* NO_MM */
 
 	/*
 	 * Set up the notes in similar form to SVR4 core dumps made
@@ -318,12 +326,16 @@
 	int num_vma;
 	unsigned long start;
 
+#ifdef NO_MM
+	proc_root_kcore->size = size = get_kcore_size(&num_vma, &elf_buflen);
+#else
 	read_lock(&vmlist_lock);
 	proc_root_kcore->size = size = get_kcore_size(&num_vma, &elf_buflen);
 	if (buflen == 0 || *fpos >= size) {
 		read_unlock(&vmlist_lock);
 		return 0;
 	}
+#endif /* NO_MM */
 
 	/* trim buflen to not go beyond EOF */
 	if (buflen > size - *fpos)
@@ -387,6 +399,7 @@
 		tsz = buflen;
 		
 	while (buflen) {
+#ifndef NO_MM
 		if ((start >= VMALLOC_START) && (start < VMALLOC_END)) {
 			char * elf_buf;
 			struct vm_struct *m;
@@ -432,7 +445,9 @@
 				return -EFAULT;
 			}
 			kfree(elf_buf);
-		} else if ((start > PAGE_OFFSET) && (start < 
+		} else
+#endif /* NO_MM */
+		if ((start > PAGE_OFFSET) && (start < 
 						(unsigned long)high_memory)) {
 			if (kern_addr_valid(start)) {
 				if (copy_to_user(buffer, (char *)start, tsz))

