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, 29 Mar 2019 14:27:55 -0700
From:   "Paul E. McKenney" <paulmck@...ux.ibm.com>
To:     Neeraj Upadhyay <neeraju@...eaurora.org>
Cc:     Mukesh Ojha <mojha@...eaurora.org>, josh@...htriplett.org,
        rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
        jiangshanlai@...il.com, joel@...lfernandes.org,
        rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: tree_stall: Correctly unlock root node in
 rcu_check_gp_start_stall

On Fri, Mar 29, 2019 at 07:52:15PM +0530, Neeraj Upadhyay wrote:
> 
> 
> On 3/29/19 6:58 PM, Mukesh Ojha wrote:
> >
> >On 3/29/2019 4:57 PM, Neeraj Upadhyay wrote:
> >>Only unlock the root node, if current node (rnp) is not
> >>root node.
> >>
> >>Signed-off-by: Neeraj Upadhyay <neeraju@...eaurora.org>
> >
> >
> >
> >>---
> >>  kernel/rcu/tree_stall.h | 4 +++-
> >>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h
> >>index f65a73a..0651833 100644
> >>--- a/kernel/rcu/tree_stall.h
> >>+++ b/kernel/rcu/tree_stall.h
> >
> >
> >why this is showing as under tree_stall.h while it is under
> >"kernel/rcu/tree.c"
> 
> It's moved in https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?h=dev&id=10462d6f58fb6dbde7563e9343505d98d5bfba3d
> 
> Please see linux-rcu dev tree for other changes, which moves code to
> this file.
> 
> 
> Thanks
> Neeraj
> 
> >
> >>@@ -630,7 +630,9 @@ static void rcu_check_gp_start_stall(struct
> >>rcu_node *rnp, struct rcu_data *rdp,
> >>          time_before(j, rcu_state.gp_req_activity + gpssdelay) ||
> >>          time_before(j, rcu_state.gp_activity + gpssdelay) ||
> >>          atomic_xchg(&warned, 1)) {
> >>-        raw_spin_unlock_rcu_node(rnp_root); /* irqs remain disabled. */
> >>+        if (rnp_root != rnp)
> >>+            /* irqs remain disabled. */
> >>+            raw_spin_unlock_rcu_node(rnp_root);
> >
> >Looks good as it will balance the lock .if it is the root_node,
> >which was not there earlier, and unlock was happening without any
> >lock on root.
> >
> >Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>

Applied, again thank you both!

In both cases, I updated the commit log, so please check to make sure
that I didn't mess anything up.

							Thanx, Paul

> >Cheers,
> >-Mukesh
> >
> >>          raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
> >>          return;
> >>      }
> 
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
> member of the Code Aurora Forum, hosted by The Linux Foundation
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ