diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-09 08:07:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-09 08:07:24 -0800 |
commit | 975e32c287a9b144cf115d3f42ca18664b3331df (patch) | |
tree | c45cb3cd1bcaf2d09efeeaec192d344c898f2c70 /kernel/lockdep.c | |
parent | 031af165b1cd295ef04d2bfbcae9bc3cb9180735 (diff) | |
parent | 167e33c32845a30368463dac5a4fe2be5edcc34a (diff) |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf: Do no try to schedule task events if there are none
lockdep, kmemcheck: Annotate ->lock in lockdep_init_map()
perf header: Use event_name() to get an event name
perf stat: Failure with "Operation not supported"
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index e69434b070d..b2e08c932d9 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c @@ -44,6 +44,7 @@ #include <linux/stringify.h> #include <linux/bitops.h> #include <linux/gfp.h> +#include <linux/kmemcheck.h> #include <asm/sections.h> @@ -2948,7 +2949,12 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, void lockdep_init_map(struct lockdep_map *lock, const char *name, struct lock_class_key *key, int subclass) { - memset(lock, 0, sizeof(*lock)); + int i; + + kmemcheck_mark_initialized(lock, sizeof(*lock)); + + for (i = 0; i < NR_LOCKDEP_CACHING_CLASSES; i++) + lock->class_cache[i] = NULL; #ifdef CONFIG_LOCK_STAT lock->cpu = raw_smp_processor_id(); |