copy_mount_options in 2.3.99-pre9

Richard Jerrell (jerrell@missioncriticallinux.com)
Tue, 27 Jun 2000 17:13:03 -0400 (EDT)


There is a bug in copy_mount_options in kernel 2.3.99-pre9. In

fs/super.c:1182 i = copy_from_user((void *)page, data, PAGE_SIZE);

This will cause an exception problem, when the parameters being passed
happen to reside somewhere in the last page of a virtual memory
region. At that point we get a nasty little Exception notice
stuffed into the dmesg buffer. Even if the mount is successful, we get
this message. So in order to fix it, just switch back to the version in
2.2.15 where we round off the address to find the page and how much space
is left before we fault and copy that amount instead of a full page
always. Here is a snapshot of the dmesg I get when the function is broken

VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 448k freed
mount: Exception at [<fffffc00004c0480>] (fffffc00004c04c0)

-
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/