Skip to content

Commit

Permalink
fix logic error in ipc compat semctl()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
agraf authored and Linus Torvalds committed Jul 6, 2007
1 parent 0db19c4 commit d57d973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipc/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d57d973

Please sign in to comment.