From: Alexander Graf <agraf@suse.de>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: [PATCH] fix logic error in ipc compat semctl()
Date: Fri, 29 Jun 2007 18:46:28 +0200 [thread overview]
Message-ID: <46853764.8020608@suse.de> (raw)
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);
reply other threads:[~2007-06-29 16:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46853764.8020608@suse.de \
--to=agraf@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox