diff options
author | Jes Sorensen <jes@sgi.com> | 2007-10-21 20:56:22 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 01:49:48 -0400 |
commit | 891ff65ff50bb6affdaebb2cda3a4c58a6442b4d (patch) | |
tree | 737603293be49ce612e05fa49ec00a75e1b501a1 | |
parent | babed5c00225f109d6ebea368ad2deea2abcce32 (diff) |
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 <jes@sgi.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jes Sorensen <jes@sgi.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
-rw-r--r-- | 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 db6caace3b9c..5ecd60b54201 100644 --- a/drivers/lguest/hypercalls.c +++ b/drivers/lguest/hypercalls.c | |||
@@ -295,6 +295,6 @@ void write_timestamp(struct lguest *lg) | |||
295 | { | 295 | { |
296 | struct timespec now; | 296 | struct timespec now; |
297 | ktime_get_real_ts(&now); | 297 | ktime_get_real_ts(&now); |
298 | if (put_user(now, &lg->lguest_data->time)) | 298 | if (copy_to_user(&lg->lguest_data->time, &now, sizeof(struct timespec))) |
299 | kill_guest(lg, "Writing timestamp"); | 299 | kill_guest(lg, "Writing timestamp"); |
300 | } | 300 | } |