From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 6157 invoked from network); 16 Dec 1999 23:04:52 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 16 Dec 1999 23:04:52 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA03123; Thu, 16 Dec 1999 18:04:51 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id QAA07583; Thu, 16 Dec 1999 16:04:46 -0700 From: Michal Jaegermann Message-Id: <199912162304.QAA07583@ellpspace.math.ualberta.ca> Subject: Re: 2.2.14pre13 - exception in __copy_user when running mount() To: linux-kernel@vger.rutgers.edu Date: Thu, 16 Dec 1999 16:04:46 -0700 (MST) Cc: alan@redhat.com, axp-list@redhat.com, linux-alpha@vger.rutgers.edu Content-Type: text 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