aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 4335f12a27c6..e2c07ece367d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2932,7 +2932,7 @@ static void zap_class(struct lock_class *class)
2932 2932
2933} 2933}
2934 2934
2935static inline int within(void *addr, void *start, unsigned long size) 2935static inline int within(const void *addr, void *start, unsigned long size)
2936{ 2936{
2937 return addr >= start && addr < start + size; 2937 return addr >= start && addr < start + size;
2938} 2938}
@@ -2955,9 +2955,12 @@ void lockdep_free_key_range(void *start, unsigned long size)
2955 head = classhash_table + i; 2955 head = classhash_table + i;
2956 if (list_empty(head)) 2956 if (list_empty(head))
2957 continue; 2957 continue;
2958 list_for_each_entry_safe(class, next, head, hash_entry) 2958 list_for_each_entry_safe(class, next, head, hash_entry) {
2959 if (within(class->key, start, size)) 2959 if (within(class->key, start, size))
2960 zap_class(class); 2960 zap_class(class);
2961 else if (within(class->name, start, size))
2962 zap_class(class);
2963 }
2961 } 2964 }
2962 2965
2963 if (locked) 2966 if (locked)