Re: 2.2.14pre13 - exception in __copy_user when running mount()

Michal Jaegermann (michal@ellpspace.math.ualberta.ca)
Thu, 16 Dec 1999 16:04:46 -0700 (MST)


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/