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]
Date:   Fri, 17 Nov 2017 22:21:47 +0000
From:   David Howells <dhowells@...hat.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>
Cc:     dhowells@...hat.com, linux-afs@...ts.infradead.org,
        linux-kernel@...r.kernel.org
Subject: Re: Logically dead code at fs/afs/cell.c:206

Gustavo A. R. Silva <garsilva@...eddedor.com> wrote:

> Today Coverity reported a "Logically dead code" issue at fs/afs/cell.c:206:
> 
>         if (!excl) {
>                 rcu_read_lock();
>                 cell = afs_lookup_cell_rcu(net, name, namesz);
>                 rcu_read_unlock();
>                 if (!IS_ERR(cell)) {
>                         if (excl) {
>                                 afs_put_cell(net, cell);
>                                 return ERR_PTR(-EEXIST);
>                         }
>                         goto wait_for_cell;
>                 }
>         }
> 
> The problem is that when this code block is executed, the code block
> starting at line 211 makes no sense, as _excl_ can never be true.

Good catch.  The interior "if (excl) { ... }" statement and body needs
removing entirely.  Originally the outer "if (!excl)" wrapping it wasn't
there.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ