diff --git a/ipc/sem.c b/ipc/sem.c index dbef95b15941..b4c1641a33a1 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -608,6 +608,8 @@ static unsigned long copy_semid_to_user(void __user *buf, struct semid64_ds *in, { struct semid_ds out; + memset(&out, 0, sizeof(out)); + ipc64_perm_to_ipc_perm(&in->sem_perm, &out.sem_perm); out.sem_otime = in->sem_otime;