lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30aa1413-de9c-ffb9-223f-b091b7990a85@redhat.com>
Date:   Sat, 9 Apr 2022 04:47:00 -0700
From:   Tom Rix <trix@...hat.com>
To:     Michal Orzel <michalorzel.eng@...il.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] ipc/sem: Remove redundant assignments


On 4/9/22 3:19 AM, Michal Orzel wrote:
> Get rid of redundant assignments which end up in values not being
> read either because they are overwritten or the function ends.
>
> Reported by clang-tidy [deadcode.DeadStores]
>
> Signed-off-by: Michal Orzel <michalorzel.eng@...il.com>
Reviewed-by: Tom Rix <trix@...hat.com>
> ---
>   ipc/sem.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/ipc/sem.c b/ipc/sem.c
> index 0dbdb98fdf2d..38ef91a63edd 100644
> --- a/ipc/sem.c
> +++ b/ipc/sem.c
> @@ -766,7 +766,6 @@ static int perform_atomic_semop(struct sem_array *sma, struct sem_queue *q)
>   	for (sop = sops; sop < sops + nsops; sop++) {
>   		curr = &sma->sems[sop->sem_num];
>   		sem_op = sop->sem_op;
> -		result = curr->semval;
>   
>   		if (sop->sem_flg & SEM_UNDO) {
>   			int undo = un->semadj[sop->sem_num] - sem_op;
> @@ -1430,7 +1429,6 @@ static int semctl_main(struct ipc_namespace *ns, int semid, int semnum,
>   	if (err)
>   		goto out_rcu_wakeup;
>   
> -	err = -EACCES;
>   	switch (cmd) {
>   	case GETALL:
>   	{

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ