[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] /dev/mem write function should use copy_from_user, not copy_to_user.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 9f4efb238f5bf31fd313cfd11e203db4d7b247ab
# Parent  592d8f74d23dc1753ccfc049cc08a368f7badf1b
/dev/mem write function should use copy_from_user, not copy_to_user.

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 592d8f74d23d -r 9f4efb238f5b 
linux-2.6-xen-sparse/arch/xen/kernel/devmem.c
--- a/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c     Wed Nov 16 10:33:13 2005
+++ b/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c     Wed Nov 16 10:34:19 2005
@@ -79,7 +79,7 @@
 
        if ((v = ioremap(p, count)) == NULL)
                return -EFAULT;
-       if (copy_to_user(v, buf, count))
+       if (copy_from_user(v, buf, count))
                goto out;
 
        written = count;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.