提交 d57d9731 编写于 作者: A Alexander Graf 提交者: Linus Torvalds

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: NAlexander Graf <agraf@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0db19c41
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册