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 <jes@xxxxxxx> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx> Cc: Jes Sorensen <jes@xxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxx> --- drivers/lguest/hypercalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== --- linux-2.6.23-rc4.orig/drivers/lguest/hypercalls.c +++ linux-2.6.23-rc4/drivers/lguest/hypercalls.c @@ -243,6 +243,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"); } -- there are those who do and those who hang on and you don't see too many doers quoting their contemporaries. -- Larry McVoy _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization