Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: 2.2.14pre13 - exception in __copy_user when running mount()
@ 1999-12-16 23:04 Michal Jaegermann
  1999-12-17  0:38 ` David S. Miller
  1999-12-20 23:05 ` Where Kan I get latest MILO sources ? Uncle George
  0 siblings, 2 replies; 8+ messages in thread
From: Michal Jaegermann @ 1999-12-16 23:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan, axp-list, linux-alpha

Ok, this particular code change in 2.2.14-pre1[34] is responsible
for an exception in __copy_user on every attemp to mount or unmount
a file system (at least ext2 file system).

--- linux-2.2.14/fs/super.c	Sun Dec  5 15:24:34 1999
+++ linux-2.2.14p/fs/super.c	Thu Dec 16 10:21:38 1999
@@ -983,6 +983,7 @@
 	if (!data)
 		return 0;
 
+#if 0
 	vma = find_vma(current->mm, (unsigned long) data);
 	if (!vma || (unsigned long) data < vma->vm_start)
 		return -EFAULT;
@@ -991,13 +992,13 @@
 	i = vma->vm_end - (unsigned long) data;
 	if (PAGE_SIZE <= (unsigned long) i)
 		i = PAGE_SIZE-1;
-	if (!(page = __get_free_page(GFP_KERNEL))) {
+#else
+	i = PAGE_SIZE;		
+#endif		
+	if (!(page = get_free_page(GFP_KERNEL))) {
 		return -ENOMEM;
 	}
-	if (copy_from_user((void *) page,data,i)) {
-		free_page(page); 
-		return -EFAULT;
-	}
+	copy_from_user((void *) page,data,i);
 	*where = page;
 	return 0;
 }

Who own to this change, why it was done and what is missing?

An exception in question appears to happen in the follwing code
from arch/alpha/lib/copy_user.S:

........
   100		subq $0,1,$0
   101		addq $6,1,$6
   102		addq $7,1,$7
   103		bne $0,$57
   104		br $31,$41
   105		.align 4
   106	$43:
   107		beq $4,$65
   108		.align 5
   109	$66:
   110		EXI( ldq $1,0($7) )   <---- here!!!
   111		subq $4,8,$4
   112		EXO( stq $1,0($6) )
   113		addq $7,8,$7
   114		subq $0,8,$0
   115		addq $6,8,$6
   116		bne $4,$66
................

   Michal


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

end of thread, other threads:[~1999-12-22 22:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-12-16 23:04 2.2.14pre13 - exception in __copy_user when running mount() Michal Jaegermann
1999-12-17  0:38 ` David S. Miller
1999-12-17  0:38   ` David S. Miller
1999-12-17  2:33   ` Dan Frasnelli
1999-12-17  9:53   ` Uncle George
     [not found]   ` <199912170044.TAA15491@devserv.devel.redhat.com>
     [not found]     ` <19991217075331.V829@mff.cuni.cz>
1999-12-17 11:57       ` David S. Miller
1999-12-20 23:05 ` Where Kan I get latest MILO sources ? Uncle George
1999-12-21  1:57   ` Thorsten Kranzkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox