]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/lguest/hypercalls.c
Use copy_to_user() not put_user for struct timespec
[linux-2.6-omap-h63xx.git] / drivers / lguest / hypercalls.c
index db6caace3b9c22a7ce16a85580de212d318c4cd2..5ecd60b54201f86584ab90bca2cd9fa47ab51c73 100644 (file)
@@ -295,6 +295,6 @@ void write_timestamp(struct lguest *lg)
 {
        struct timespec now;
        ktime_get_real_ts(&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");
 }