diff options
-rw-r--r-- | include/linux/poison.h | 7 | ||||
-rw-r--r-- | kernel/mutex-debug.c | 5 | ||||
-rw-r--r-- | security/keys/key.c | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/include/linux/poison.h b/include/linux/poison.h index 4109f37b7b66..a5347c02432e 100644 --- a/include/linux/poison.h +++ b/include/linux/poison.h | |||
@@ -45,6 +45,13 @@ | |||
45 | /********** drivers/atm/ **********/ | 45 | /********** drivers/atm/ **********/ |
46 | #define ATM_POISON_FREE 0x12 | 46 | #define ATM_POISON_FREE 0x12 |
47 | 47 | ||
48 | /********** kernel/mutexes **********/ | ||
49 | #define MUTEX_DEBUG_INIT 0x11 | ||
50 | #define MUTEX_DEBUG_FREE 0x22 | ||
51 | |||
52 | /********** security/ **********/ | ||
53 | #define KEY_DESTROY 0xbd | ||
54 | |||
48 | /********** sound/oss/ **********/ | 55 | /********** sound/oss/ **********/ |
49 | #define OSS_POISON_FREE 0xAB | 56 | #define OSS_POISON_FREE 0xAB |
50 | 57 | ||
diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c index 036b6285b15c..e38e4bac97ca 100644 --- a/kernel/mutex-debug.c +++ b/kernel/mutex-debug.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/poison.h> | ||
19 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
20 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
21 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
@@ -381,7 +382,7 @@ void debug_mutex_set_owner(struct mutex *lock, | |||
381 | 382 | ||
382 | void debug_mutex_init_waiter(struct mutex_waiter *waiter) | 383 | void debug_mutex_init_waiter(struct mutex_waiter *waiter) |
383 | { | 384 | { |
384 | memset(waiter, 0x11, sizeof(*waiter)); | 385 | memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter)); |
385 | waiter->magic = waiter; | 386 | waiter->magic = waiter; |
386 | INIT_LIST_HEAD(&waiter->list); | 387 | INIT_LIST_HEAD(&waiter->list); |
387 | } | 388 | } |
@@ -397,7 +398,7 @@ void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter) | |||
397 | void debug_mutex_free_waiter(struct mutex_waiter *waiter) | 398 | void debug_mutex_free_waiter(struct mutex_waiter *waiter) |
398 | { | 399 | { |
399 | DEBUG_WARN_ON(!list_empty(&waiter->list)); | 400 | DEBUG_WARN_ON(!list_empty(&waiter->list)); |
400 | memset(waiter, 0x22, sizeof(*waiter)); | 401 | memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter)); |
401 | } | 402 | } |
402 | 403 | ||
403 | void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, | 404 | void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, |
diff --git a/security/keys/key.c b/security/keys/key.c index 43295ca37b5d..80de8c3e9cc3 100644 --- a/security/keys/key.c +++ b/security/keys/key.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/poison.h> | ||
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
16 | #include <linux/security.h> | 17 | #include <linux/security.h> |
@@ -988,7 +989,7 @@ void unregister_key_type(struct key_type *ktype) | |||
988 | if (key->type == ktype) { | 989 | if (key->type == ktype) { |
989 | if (ktype->destroy) | 990 | if (ktype->destroy) |
990 | ktype->destroy(key); | 991 | ktype->destroy(key); |
991 | memset(&key->payload, 0xbd, sizeof(key->payload)); | 992 | memset(&key->payload, KEY_DESTROY, sizeof(key->payload)); |
992 | } | 993 | } |
993 | } | 994 | } |
994 | 995 | ||