From: Greg Kroah-Hartman Date: Wed, 31 Oct 2007 16:25:41 +0000 (-0700) Subject: added another 2.6.22-review patch X-Git-Tag: v2.6.22.11~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c02618d8f7923784bc2918db80bd336036e97c97;p=thirdparty%2Fkernel%2Fstable-queue.git added another 2.6.22-review patch --- diff --git a/review-2.6.22/lockdep-fix-mismatched-lockdep_depth-curr_chain_hash.patch b/review-2.6.22/lockdep-fix-mismatched-lockdep_depth-curr_chain_hash.patch new file mode 100644 index 00000000000..fb6cf80e38c --- /dev/null +++ b/review-2.6.22/lockdep-fix-mismatched-lockdep_depth-curr_chain_hash.patch @@ -0,0 +1,50 @@ +From stable-bounces@linux.kernel.org Wed Oct 31 08:47:05 2007 +From: Gregory Haskins +Date: Wed, 31 Oct 2007 11:44:05 -0400 +Subject: lockdep: fix mismatched lockdep_depth/curr_chain_hash +To: Greg KH +Cc: Peter Zijlstra , linux-kernel , Chuck Ebbert , mingo@elte.hu, Gregory Haskins , stable +Message-ID: <20071031154313.15685.72379.stgit@ghaskins-t60p.haskins.net> + +From: Gregory Haskins + +patch 3aa416b07f0adf01c090baab26fb70c35ec17623 in mainline. + +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 +Signed-off-by: Peter Zijlstra +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/lockdep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- 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 diff --git a/review-2.6.22/series b/review-2.6.22/series index ae6152e4cc3..c13f4390e79 100644 --- a/review-2.6.22/series +++ b/review-2.6.22/series @@ -24,3 +24,4 @@ hwmon-w83627hf-fix-setting-fan-min-right-after-driver-load.patch hwmon-w83627hf-don-t-assume-bank-0.patch i915-fix-vbl-swap-allocation-size.patch powerpc-fix-handling-of-stfiwx-math-emulation.patch +lockdep-fix-mismatched-lockdep_depth-curr_chain_hash.patch