* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-05 9:31 ` [PATCH] lockdep: " Peter Zijlstra
@ 2007-10-08 17:24 ` Greg KH
2007-10-08 17:36 ` Peter Zijlstra
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2007-10-08 17:24 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Gregory Haskins, stable, mingo, linux-kernel
On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
>
> Stable team,
>
> please consider this patch for the next 22-stable.
I don't see this patch in Linus's upstream tree. We need it there to be
able to accept it for -stable. Or is this just a bugfix of other things
that are already in his tree?
thanks,
greg k-h
>
> ---
> Subject: lockdep: fix mismatched lockdep_depth/curr_chain_hash
> From: Gregory Haskins <ghaskins@novell.com>
>
> It is possible for the current->curr_chain_key to become inconsistent with the
> current index if the chain fails to validate. The end result is that future
> lock_acquire() operations may inadvertently fail to find a hit in the cache
> resulting in a new node being added to the graph for every acquire.
>
> [ peterz: this might explain some of the lockdep is so _slow_ complaints. ]
> [ mingo: this does not impact the correctness of validation, but may slow
> down future operations significantly, if the chain gets very long. ]
>
> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
> kernel/lockdep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-2.6/kernel/lockdep.c
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep.c
> +++ linux-2.6/kernel/lockdep.c
> @@ -2166,7 +2166,6 @@ out_calc_hash:
> }
> #endif
> chain_key = iterate_chain_key(chain_key, id);
> - curr->curr_chain_key = chain_key;
>
> /*
> * Trylock needs to maintain the stack of held locks, but it
> @@ -2215,6 +2214,7 @@ out_calc_hash:
> if (unlikely(!debug_locks))
> return 0;
>
> + curr->curr_chain_key = chain_key;
> curr->lockdep_depth++;
> check_chain_key(curr);
> #ifdef CONFIG_DEBUG_LOCKDEP
>
>
> _______________________________________________
> stable mailing list
> stable@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-08 17:24 ` [stable] " Greg KH
@ 2007-10-08 17:36 ` Peter Zijlstra
2007-10-08 17:39 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Peter Zijlstra @ 2007-10-08 17:36 UTC (permalink / raw)
To: Greg KH; +Cc: Gregory Haskins, stable, mingo, linux-kernel
On Mon, 2007-10-08 at 10:24 -0700, Greg KH wrote:
> On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
> >
> > Stable team,
> >
> > please consider this patch for the next 22-stable.
>
> I don't see this patch in Linus's upstream tree. We need it there to be
> able to accept it for -stable. Or is this just a bugfix of other things
> that are already in his tree?
I send Linus a similar patch, haven´t seem him pick it up yet.
I´ll notify you when and if he picks it up.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-08 17:36 ` Peter Zijlstra
@ 2007-10-08 17:39 ` Greg KH
2007-10-25 17:48 ` Peter Zijlstra
0 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2007-10-08 17:39 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Gregory Haskins, stable, mingo, linux-kernel
On Mon, Oct 08, 2007 at 07:36:10PM +0200, Peter Zijlstra wrote:
>
> On Mon, 2007-10-08 at 10:24 -0700, Greg KH wrote:
> > On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
> > >
> > > Stable team,
> > >
> > > please consider this patch for the next 22-stable.
> >
> > I don't see this patch in Linus's upstream tree. We need it there to be
> > able to accept it for -stable. Or is this just a bugfix of other things
> > that are already in his tree?
>
> I send Linus a similar patch, haven??t seem him pick it up yet.
> I??ll notify you when and if he picks it up.
Great, that would be great for us -stable monkeys...
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-08 17:39 ` Greg KH
@ 2007-10-25 17:48 ` Peter Zijlstra
2007-10-25 18:55 ` Chuck Ebbert
0 siblings, 1 reply; 10+ messages in thread
From: Peter Zijlstra @ 2007-10-25 17:48 UTC (permalink / raw)
To: Greg KH; +Cc: Gregory Haskins, stable, mingo, linux-kernel
On Mon, 2007-10-08 at 10:39 -0700, Greg KH wrote:
> On Mon, Oct 08, 2007 at 07:36:10PM +0200, Peter Zijlstra wrote:
> >
> > On Mon, 2007-10-08 at 10:24 -0700, Greg KH wrote:
> > > On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
> > > >
> > > > Stable team,
> > > >
> > > > please consider this patch for the next 22-stable.
> > >
> > > I don't see this patch in Linus's upstream tree. We need it there to be
> > > able to accept it for -stable. Or is this just a bugfix of other things
> > > that are already in his tree?
> >
> > I send Linus a similar patch, haven??t seem him pick it up yet.
> > I??ll notify you when and if he picks it up.
>
> Great, that would be great for us -stable monkeys...
3aa416b07f0adf01c090baab26fb70c35ec17623
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-25 17:48 ` Peter Zijlstra
@ 2007-10-25 18:55 ` Chuck Ebbert
2007-10-31 14:37 ` Greg KH
0 siblings, 1 reply; 10+ messages in thread
From: Chuck Ebbert @ 2007-10-25 18:55 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: Greg KH, Gregory Haskins, stable, mingo, linux-kernel
On 10/25/2007 01:48 PM, Peter Zijlstra wrote:
> On Mon, 2007-10-08 at 10:39 -0700, Greg KH wrote:
>> On Mon, Oct 08, 2007 at 07:36:10PM +0200, Peter Zijlstra wrote:
>>> On Mon, 2007-10-08 at 10:24 -0700, Greg KH wrote:
>>>> On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
>>>>> Stable team,
>>>>>
>>>>> please consider this patch for the next 22-stable.
>>>> I don't see this patch in Linus's upstream tree. We need it there to be
>>>> able to accept it for -stable. Or is this just a bugfix of other things
>>>> that are already in his tree?
>>> I send Linus a similar patch, haven??t seem him pick it up yet.
>>> I??ll notify you when and if he picks it up.
>> Great, that would be great for us -stable monkeys...
>
> 3aa416b07f0adf01c090baab26fb70c35ec17623
>
>
And for both 2.6.22 and 2.6.23...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-25 18:55 ` Chuck Ebbert
@ 2007-10-31 14:37 ` Greg KH
0 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2007-10-31 14:37 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: Peter Zijlstra, Gregory Haskins, stable, mingo, linux-kernel
On Thu, Oct 25, 2007 at 02:55:05PM -0400, Chuck Ebbert wrote:
> On 10/25/2007 01:48 PM, Peter Zijlstra wrote:
> > On Mon, 2007-10-08 at 10:39 -0700, Greg KH wrote:
> >> On Mon, Oct 08, 2007 at 07:36:10PM +0200, Peter Zijlstra wrote:
> >>> On Mon, 2007-10-08 at 10:24 -0700, Greg KH wrote:
> >>>> On Fri, Oct 05, 2007 at 11:31:26AM +0200, Peter Zijlstra wrote:
> >>>>> Stable team,
> >>>>>
> >>>>> please consider this patch for the next 22-stable.
> >>>> I don't see this patch in Linus's upstream tree. We need it there to be
> >>>> able to accept it for -stable. Or is this just a bugfix of other things
> >>>> that are already in his tree?
> >>> I send Linus a similar patch, haven??t seem him pick it up yet.
> >>> I??ll notify you when and if he picks it up.
> >> Great, that would be great for us -stable monkeys...
> >
> > 3aa416b07f0adf01c090baab26fb70c35ec17623
> >
> >
>
> And for both 2.6.22 and 2.6.23...
It does not apply to 2.6.22 at all, so unless someone sends us a
backported version, I'll not apply it there.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
@ 2007-10-31 15:03 Gregory Haskins
0 siblings, 0 replies; 10+ messages in thread
From: Gregory Haskins @ 2007-10-31 15:03 UTC (permalink / raw)
To: greg, cebbert; +Cc: mingo, peterz, stable, linux-kernel
>>> Greg KH <greg@kroah.com> 10/31/07 10:37 AM >>>
>It does not apply to 2.6.22 at all, so unless someone sends us a
>backported version, I'll not apply it there.
Ill take care of this for you, Greg.
-Greg
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
@ 2007-10-31 15:44 Gregory Haskins
2007-10-31 16:19 ` Peter Zijlstra
2007-10-31 16:24 ` [stable] " Greg KH
0 siblings, 2 replies; 10+ messages in thread
From: Gregory Haskins @ 2007-10-31 15:44 UTC (permalink / raw)
To: Greg KH
Cc: Chuck Ebbert, Gregory Haskins, Peter Zijlstra, stable, mingo,
linux-kernel
Hi Greg,
Here is the backported version of the patch. I applied it on top of
2.6.22.10. Let me know if you have any issues.
-Greg
------------------------------
lockdep: fix mismatched lockdep_depth/curr_chain_hash
It is possible for the current->curr_chain_key to become inconsistent with the
current index if the chain fails to validate. The end result is that future
lock_acquire() operations may inadvertently fail to find a hit in the cache
resulting in a new node being added to the graph for every acquire.
[ peterz: this might explain some of the lockdep is so _slow_ complaints. ]
[ mingo: this does not impact the correctness of validation, but may slow
down future operations significantly, if the chain gets very long. ]
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/lockdep.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 1a5ff22..072cf25 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2166,7 +2166,6 @@ out_calc_hash:
}
#endif
chain_key = iterate_chain_key(chain_key, id);
- curr->curr_chain_key = chain_key;
/*
* Trylock needs to maintain the stack of held locks, but it
@@ -2215,6 +2214,7 @@ out_calc_hash:
if (unlikely(!debug_locks))
return 0;
+ curr->curr_chain_key = chain_key;
curr->lockdep_depth++;
check_chain_key(curr);
#ifdef CONFIG_DEBUG_LOCKDEP
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-31 15:44 [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash Gregory Haskins
@ 2007-10-31 16:19 ` Peter Zijlstra
2007-10-31 16:24 ` [stable] " Greg KH
1 sibling, 0 replies; 10+ messages in thread
From: Peter Zijlstra @ 2007-10-31 16:19 UTC (permalink / raw)
To: Gregory Haskins; +Cc: Greg KH, Chuck Ebbert, stable, mingo, linux-kernel
On Wed, 2007-10-31 at 11:44 -0400, Gregory Haskins wrote:
> Hi Greg,
> Here is the backported version of the patch. I applied it on top of
> 2.6.22.10. Let me know if you have any issues.
>
> -Greg
Thanks Gregory!
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [stable] [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash
2007-10-31 15:44 [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash Gregory Haskins
2007-10-31 16:19 ` Peter Zijlstra
@ 2007-10-31 16:24 ` Greg KH
1 sibling, 0 replies; 10+ messages in thread
From: Greg KH @ 2007-10-31 16:24 UTC (permalink / raw)
To: Gregory Haskins; +Cc: Peter Zijlstra, linux-kernel, Chuck Ebbert, mingo, stable
On Wed, Oct 31, 2007 at 11:44:05AM -0400, Gregory Haskins wrote:
> Hi Greg,
> Here is the backported version of the patch. I applied it on top of
> 2.6.22.10. Let me know if you have any issues.
Looks good, thanks. I've added it to the -stable queue and will add it
to the current 2.6.22-stable release.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-10-31 16:26 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 15:44 [PATCH] lockdep: fix mismatched lockdep_depth/curr_chain_hash Gregory Haskins
2007-10-31 16:19 ` Peter Zijlstra
2007-10-31 16:24 ` [stable] " Greg KH
-- strict thread matches above, loose matches on Subject: below --
2007-10-31 15:03 Gregory Haskins
2007-10-05 4:03 [PATCH] LOCKDEP: " Gregory Haskins
2007-10-05 9:31 ` [PATCH] lockdep: " Peter Zijlstra
2007-10-08 17:24 ` [stable] " Greg KH
2007-10-08 17:36 ` Peter Zijlstra
2007-10-08 17:39 ` Greg KH
2007-10-25 17:48 ` Peter Zijlstra
2007-10-25 18:55 ` Chuck Ebbert
2007-10-31 14:37 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox