]> sourceware.org Git - systemtap.git/commitdiff
2006-02-09 Martin Hunt <hunt@redhat.com>
authorhunt <hunt>
Fri, 10 Feb 2006 05:30:08 +0000 (05:30 +0000)
committerhunt <hunt>
Fri, 10 Feb 2006 05:30:08 +0000 (05:30 +0000)
* copy.c (_stp_copy_from_user): If access fails,
return -1.

runtime/ChangeLog
runtime/copy.c

index 546b907e6ce900a767722b7771785c2651f66c69..ca6b7c468319e3a7d436f4f57189c2d94264bc5f 100644 (file)
@@ -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().
index 7e28a6a68403014e43112e812fd2a1b202ed1daa..0822902d3e54440da02d331feb9e0f785d9a8e7b 100644 (file)
@@ -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;
 }
This page took 0.02982 seconds and 5 git commands to generate.