For the system call getitimer(), if the parameter 'value' is NULL, need
return -EINVAL, not -EFAULT.

Signed-off-by: Chen Gang <gang.c...@asianux.com>
---
 kernel/itimer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/itimer.c b/kernel/itimer.c
index 8d262b4..6f9d757 100644
--- a/kernel/itimer.c
+++ b/kernel/itimer.c
@@ -102,7 +102,7 @@ int do_getitimer(int which, struct itimerval *value)
 
 SYSCALL_DEFINE2(getitimer, int, which, struct itimerval __user *, value)
 {
-       int error = -EFAULT;
+       int error = -EINVAL;
        struct itimerval get_buffer;
 
        if (value) {
-- 
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to