projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
babed5c
)
Use copy_to_user() not put_user for struct timespec
author
Jes Sorensen
<
[email protected]
>
Mon, 22 Oct 2007 00:56:22 +0000
(10:56 +1000)
committer
Rusty Russell
<
[email protected]
>
Tue, 23 Oct 2007 05:49:48 +0000
(15:49 +1000)
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
patch
|
blob
|
history
diff --git
a/drivers/lguest/hypercalls.c
b/drivers/lguest/hypercalls.c
index db6caace3b9c22a7ce16a85580de212d318c4cd2..5ecd60b54201f86584ab90bca2cd9fa47ab51c73 100644
(file)
--- a/
drivers/lguest/hypercalls.c
+++ b/
drivers/lguest/hypercalls.c
@@
-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");
}