diff options
author | hunt <hunt> | 2006-02-10 05:30:08 +0000 |
---|---|---|
committer | hunt <hunt> | 2006-02-10 05:30:08 +0000 |
commit | 4c57703c9d46d81d60d82ed079a1b9468d038e5c (patch) | |
tree | 1a779da99c77398ad0d71e699f37c738ae1d8bad | |
parent | f7ae2c6051cebf8affb3891f345a66e1c0929d4c (diff) | |
download | systemtap-steved-4c57703c9d46d81d60d82ed079a1b9468d038e5c.tar.gz systemtap-steved-4c57703c9d46d81d60d82ed079a1b9468d038e5c.tar.xz systemtap-steved-4c57703c9d46d81d60d82ed079a1b9468d038e5c.zip |
2006-02-09 Martin Hunt <hunt@redhat.com>
* copy.c (_stp_copy_from_user): If access fails,
return -1.
-rw-r--r-- | runtime/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/copy.c | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index 546b907e..ca6b7c46 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2006-02-09 Martin Hunt <hunt@redhat.com> + + * copy.c (_stp_copy_from_user): If access fails, + return -1. + 2006-01-25 Martin Hunt <hunt@redhat.com> * stat.c (_stp_stat_init): Use _stp_alloc_percpu(). diff --git a/runtime/copy.c b/runtime/copy.c index 7e28a6a6..0822902d 100644 --- a/runtime/copy.c +++ b/runtime/copy.c @@ -157,8 +157,10 @@ _stp_copy_from_user (char *dst, const char __user *src, unsigned long count) if (count) { if (access_ok(VERIFY_READ, src, count)) count = __copy_from_user_inatomic(dst, src, count); - else + else { memset(dst, 0, count); + count = -1; + } } return count; } |