summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2007-07-06 11:39:53 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-06 19:23:43 +0200
commitd57d973101e87b2e30ccfa899fe36c4b2e32d217 (patch)
treec08ddbb512ae9da4c26866515de8f335d7505e35 /ipc
parentx86_64: fix headers_install (diff)
downloadlinux-d57d973101e87b2e30ccfa899fe36c4b2e32d217.tar.xz
linux-d57d973101e87b2e30ccfa899fe36c4b2e32d217.zip
fix logic error in ipc compat semctl()
When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is unevaluated. This patch fixes this. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/compat.c b/ipc/compat.c
index 8b44aa9a7c95..ab76fb0ef844 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -225,7 +225,7 @@ static inline int put_compat_semid_ds(struct semid64_ds *s,
int err;
if (!access_ok (VERIFY_WRITE, up, sizeof(*up)))
- err = -EFAULT;
+ return -EFAULT;
err = __put_compat_ipc_perm(&s->sem_perm, &up->sem_perm);
err |= __put_user(s->sem_otime, &up->sem_otime);
err |= __put_user(s->sem_ctime, &up->sem_ctime);