From 4dd1199066da3798f72a80ad2f19deb8dba9f73f Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 11 Aug 2008 12:34:42 +0200 Subject: [PATCH] --- yaml --- r: 108188 b: refs/heads/master c: b42e737e576339c795d9ac77a1fce6057f6bc0cf h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/lockdep.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 62c094d1a9a3..248682821b06 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3295f0ef9ff048a4619ede597ad9ec9cab725654 +refs/heads/master: b42e737e576339c795d9ac77a1fce6057f6bc0cf diff --git a/trunk/include/linux/lockdep.h b/trunk/include/linux/lockdep.h index 67f42b300c65..c88aa3d8e87f 100644 --- a/trunk/include/linux/lockdep.h +++ b/trunk/include/linux/lockdep.h @@ -191,7 +191,12 @@ struct lock_chain { }; #define MAX_LOCKDEP_KEYS_BITS 11 -#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) +/* + * Subtract one because we offset hlock->class_idx by 1 in order + * to make 0 mean no class. This avoids overflowing the class_idx + * bitfield and hitting the BUG in hlock_class(). + */ +#define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1) struct held_lock { /*