When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is unevaluated. This patch fixes this.
Unified · Split
| @@ -225,7 +225,7 @@ static inline int put_compat_semid_ds(struct semid64_ds *s, · 224 unmodified lines | ||
| 225 | 225 | int err; |
| 226 | 226 | |
| 227 | 227 | if (!access_ok (VERIFY_WRITE, up, sizeof(*up))) |
| 228 | − err = -EFAULT; | |
| 228 | + return -EFAULT; | |
| 229 | 229 | err = __put_compat_ipc_perm(&s->sem_perm, &up->sem_perm); |
| 230 | 230 | err |= __put_user(s->sem_otime, &up->sem_otime); |
| 231 | 231 | err |= __put_user(s->sem_ctime, &up->sem_ctime); |