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 Signed-off-by: Rusty Russell Cc: Jes Sorensen Cc: Al Viro --- 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