From 4c57703c9d46d81d60d82ed079a1b9468d038e5c Mon Sep 17 00:00:00 2001 From: hunt Date: Fri, 10 Feb 2006 05:30:08 +0000 Subject: 2006-02-09 Martin Hunt * copy.c (_stp_copy_from_user): If access fails, return -1. --- runtime/copy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/copy.c') 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; } -- cgit