]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/lockdep.h
fat: cleanup fat_parse_long() error handling
[linux-2.6-omap-h63xx.git] / include / linux / lockdep.h
index 67f42b300c65ce81ec09d03b70053c6691f4b6fc..331e5f1c2d8ec4439bc69294337dc1b00345f3d8 100644 (file)
@@ -190,8 +190,13 @@ struct lock_chain {
        u64                             chain_key;
 };
 
-#define MAX_LOCKDEP_KEYS_BITS          11
-#define MAX_LOCKDEP_KEYS               (1UL << MAX_LOCKDEP_KEYS_BITS)
+#define MAX_LOCKDEP_KEYS_BITS          13
+/*
+ * 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 {
        /*