* [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start()
@ 2018-02-14 8:59 Byungchul Park
2018-02-14 21:42 ` Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Byungchul Park @ 2018-02-14 8:59 UTC (permalink / raw)
To: jiangshanlai, paulmck, josh, rostedt, mathieu.desnoyers
Cc: linux-kernel, kernel-team
We should've kept sp->srcu_gp_seq_needed_exp the furthest. But
it probably fails because of the incorrect condition. Fix it.
Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
kernel/rcu/srcutree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index d5cea81..44bc0fa 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -626,7 +626,7 @@ static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp,
spin_unlock_irqrestore_rcu_node(snp, flags);
}
spin_lock_irqsave_rcu_node(sp, flags);
- if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
+ if (ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
sp->srcu_gp_seq_needed_exp = s;
spin_unlock_irqrestore_rcu_node(sp, flags);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start()
2018-02-14 8:59 [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start() Byungchul Park
@ 2018-02-14 21:42 ` Paul E. McKenney
2018-02-18 23:36 ` Byungchul Park
0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2018-02-14 21:42 UTC (permalink / raw)
To: Byungchul Park
Cc: jiangshanlai, josh, rostedt, mathieu.desnoyers, linux-kernel,
kernel-team
On Wed, Feb 14, 2018 at 05:59:54PM +0900, Byungchul Park wrote:
> We should've kept sp->srcu_gp_seq_needed_exp the furthest. But
> it probably fails because of the incorrect condition. Fix it.
>
> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Good catch, and thank you for reviewing the SRCU code, but Ildar Ismagilov
beat you to this one. Please see 574428dee1f3 ("rcu: Fix misprint in
srcu_funnel_exp_start") in -rcu.
Thanx, Paul
> ---
> kernel/rcu/srcutree.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
> index d5cea81..44bc0fa 100644
> --- a/kernel/rcu/srcutree.c
> +++ b/kernel/rcu/srcutree.c
> @@ -626,7 +626,7 @@ static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp,
> spin_unlock_irqrestore_rcu_node(snp, flags);
> }
> spin_lock_irqsave_rcu_node(sp, flags);
> - if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
> + if (ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
> sp->srcu_gp_seq_needed_exp = s;
> spin_unlock_irqrestore_rcu_node(sp, flags);
> }
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start()
2018-02-14 21:42 ` Paul E. McKenney
@ 2018-02-18 23:36 ` Byungchul Park
2018-02-19 1:04 ` Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Byungchul Park @ 2018-02-18 23:36 UTC (permalink / raw)
To: paulmck
Cc: jiangshanlai, josh, rostedt, mathieu.desnoyers, linux-kernel,
kernel-team
On 2/15/2018 6:42 AM, Paul E. McKenney wrote:
> On Wed, Feb 14, 2018 at 05:59:54PM +0900, Byungchul Park wrote:
>> We should've kept sp->srcu_gp_seq_needed_exp the furthest. But
>> it probably fails because of the incorrect condition. Fix it.
>>
>> Signed-off-by: Byungchul Park <byungchul.park@lge.com>
>
> Good catch, and thank you for reviewing the SRCU code, but Ildar Ismagilov
> beat you to this one. Please see 574428dee1f3 ("rcu: Fix misprint in
> srcu_funnel_exp_start") in -rcu.
Hi Paul,
I'm sorry I'm late. It's been Lunar New Year holiday since last
thursday.
Do you mean:
git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
Is this rcu's main dev-tree?
Thanks for replying anyway, and happy new year~
>
> Thanx, Paul
>
>> ---
>> kernel/rcu/srcutree.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
>> index d5cea81..44bc0fa 100644
>> --- a/kernel/rcu/srcutree.c
>> +++ b/kernel/rcu/srcutree.c
>> @@ -626,7 +626,7 @@ static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp,
>> spin_unlock_irqrestore_rcu_node(snp, flags);
>> }
>> spin_lock_irqsave_rcu_node(sp, flags);
>> - if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
>> + if (ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
>> sp->srcu_gp_seq_needed_exp = s;
>> spin_unlock_irqrestore_rcu_node(sp, flags);
>> }
>> --
>> 1.9.1
>>
>
>
--
Thanks,
Byungchul
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start()
2018-02-18 23:36 ` Byungchul Park
@ 2018-02-19 1:04 ` Paul E. McKenney
0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2018-02-19 1:04 UTC (permalink / raw)
To: Byungchul Park
Cc: jiangshanlai, josh, rostedt, mathieu.desnoyers, linux-kernel,
kernel-team
On Mon, Feb 19, 2018 at 08:36:30AM +0900, Byungchul Park wrote:
> On 2/15/2018 6:42 AM, Paul E. McKenney wrote:
> >On Wed, Feb 14, 2018 at 05:59:54PM +0900, Byungchul Park wrote:
> >>We should've kept sp->srcu_gp_seq_needed_exp the furthest. But
> >>it probably fails because of the incorrect condition. Fix it.
> >>
> >>Signed-off-by: Byungchul Park <byungchul.park@lge.com>
> >
> >Good catch, and thank you for reviewing the SRCU code, but Ildar Ismagilov
> >beat you to this one. Please see 574428dee1f3 ("rcu: Fix misprint in
> >srcu_funnel_exp_start") in -rcu.
>
> Hi Paul,
>
> I'm sorry I'm late. It's been Lunar New Year holiday since last
> thursday.
Not a problem!
> Do you mean:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
>
> Is this rcu's main dev-tree?
It is indeed!
> Thanks for replying anyway, and happy new year~
And a very happy Lunar New Year to you and yours!!!
Thanx, Paul
> >>---
> >> kernel/rcu/srcutree.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >>diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
> >>index d5cea81..44bc0fa 100644
> >>--- a/kernel/rcu/srcutree.c
> >>+++ b/kernel/rcu/srcutree.c
> >>@@ -626,7 +626,7 @@ static void srcu_funnel_exp_start(struct srcu_struct *sp, struct srcu_node *snp,
> >> spin_unlock_irqrestore_rcu_node(snp, flags);
> >> }
> >> spin_lock_irqsave_rcu_node(sp, flags);
> >>- if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
> >>+ if (ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s))
> >> sp->srcu_gp_seq_needed_exp = s;
> >> spin_unlock_irqrestore_rcu_node(sp, flags);
> >> }
> >>--
> >>1.9.1
> >>
> >
> >
>
> --
> Thanks,
> Byungchul
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-19 1:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-14 8:59 [PATCH] srcu: Fix incorrect condition in srcu_funnel_exp_start() Byungchul Park
2018-02-14 21:42 ` Paul E. McKenney
2018-02-18 23:36 ` Byungchul Park
2018-02-19 1:04 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).