public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel/itimer.c: for return value, using -EINVAL instead of -EFAULT
@ 2013-06-20  6:22 Chen Gang
  2013-06-20  6:59 ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Gang @ 2013-06-20  6:22 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel@vger.kernel.org


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

Signed-off-by: Chen Gang <gang.chen@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-20  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  6:22 [PATCH] kernel/itimer.c: for return value, using -EINVAL instead of -EFAULT Chen Gang
2013-06-20  6:59 ` Thomas Gleixner
2013-06-20  7:18   ` Chen Gang
2013-06-20  7:44     ` Thomas Gleixner
2013-06-20  8:16       ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox