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: <3549e916-3829-40b8-b2ae-7a969826105c@paulmck-laptop>
Date:   Wed, 26 Jul 2023 21:02:48 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Joel Fernandes <joel@...lfernandes.org>
Cc:     linux-kernel@...r.kernel.org,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Josh Triplett <josh@...htriplett.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        "open list:SLEEPABLE READ-COPY UPDATE (SRCU)" <rcu@...r.kernel.org>
Subject: Re: [PATCH 2/5] srcu: Fix error handling in init_srcu_struct_fields()

On Wed, Jul 26, 2023 at 11:04:04PM -0400, Joel Fernandes wrote:
> 
> 
> On 7/26/23 17:07, Paul E. McKenney wrote:
> >> -				free_percpu(ssp->sda);
> >> -				ssp->sda = NULL;
> >> -				kfree(ssp->srcu_sup);
> >> -				return -ENOMEM;
> >> -			}
> >> -		} else {
> >> +		if (!init_srcu_struct_nodes(ssp, GFP_ATOMIC))
> >> +			goto err_free_sda;
> >> +		else
> >>  			WRITE_ONCE(ssp->srcu_sup->srcu_size_state, SRCU_SIZE_BIG);
> > Given that the "then" clause is a goto, what is the "else" clause doing
> > for us?
> > 
> 
> Not much. Agreed we can get rid of "else" and reduce indent of the
> WRITE_ONCE that follows.
> 
> Would you mind making this fixup in the patch for your apply, or would
> you like me to refresh the patch? Let me know either way, thank you!

Please include it with your next series, which has at least one other
change anyway.  ;-)

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ