* [PATCH] fix logic error in ipc compat semctl()
@ 2007-06-29 16:46 Alexander Graf
0 siblings, 0 replies; only message in thread
From: Alexander Graf @ 2007-06-29 16:46 UTC (permalink / raw)
To: linux-kernel, akpm
Hi,
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>
Index: linux/ipc/compat.c
===================================================================
--- linux.orig/ipc/compat.c
+++ linux/ipc/compat.c
@@ -225,7 +225,7 @@ static inline int put_compat_semid_ds(st
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-29 16:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29 16:46 [PATCH] fix logic error in ipc compat semctl() Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox