Commit:     891ff65ff50bb6affdaebb2cda3a4c58a6442b4d
Parent:     babed5c00225f109d6ebea368ad2deea2abcce32
Author:     Jes Sorensen <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 10:56:22 2007 +1000
Committer:  Rusty Russell <[EMAIL PROTECTED]>
CommitDate: Tue Oct 23 15:49:48 2007 +1000

    Use copy_to_user() not put_user for struct timespec
    Use copy_to_user() when copying a struct timespec to the guest -
    put_user() cannot handle two long's in one go on a 64bit arch.
    Signed-off-by: Jes Sorensen <[EMAIL PROTECTED]>
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
    Cc: Jes Sorensen <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
 drivers/lguest/hypercalls.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/lguest/hypercalls.c b/drivers/lguest/hypercalls.c
index db6caac..5ecd60b 100644
--- a/drivers/lguest/hypercalls.c
+++ b/drivers/lguest/hypercalls.c
@@ -295,6 +295,6 @@ void write_timestamp(struct lguest *lg)
        struct timespec now;
-       if (put_user(now, &lg->lguest_data->time))
+       if (copy_to_user(&lg->lguest_data->time, &now, sizeof(struct timespec)))
                kill_guest(lg, "Writing timestamp");
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to