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] [day] [month] [year] [list]
Date:   Mon, 01 Jun 2020 22:11:28 +0100
From:   David Howells <dhowells@...hat.com>
To:     Markus Elfring <Markus.Elfring@....de>
Cc:     dhowells@...hat.com, linux-afs@...ts.infradead.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: afs: Improve exception handling in afs_net_init()

Markus Elfring <Markus.Elfring@....de> wrote:

> I have accidentally taken another look at the implementation of
> the function "afs_net_init".
> I noticed that the statement "net->live = false;" was specified three times
> for exception handling at the end.
> https://elixir.bootlin.com/linux/v5.7/source/fs/afs/main.c#L127
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/afs/main.c?id=9bf9511e3d9f328c03f6f79bfb741c3d18f2f2c0#n127
> 
> Can it be that two of these assignments are redundant then?

Kind of yes, but no.

I want to set "net->live = false" as soon as an error occurs because there are
various async mechanisms that check for it and abort their operation if they
see it, but there are multiple error labels.

So it needs to be cleared before afs_cell_purge() or afs_purge_servers() is
called and it used to be required for something else as well, but that's now
gone.

In the afs_net_init() function, it now probably only needs to be cleared after
"error_open_socket:".  I'm a bit leary of removing the clearances in case I
add a new dependency on it later.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ