Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30747
b: refs/heads/master
c: a7807a3
h: refs/heads/master
i:
  30745: 5c42147
  30743: 31f9214
v: v3
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Jun 28, 2006
1 parent 27b8685 commit 1f17bd1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3c681e09193559ba15f6c9562bd37045f120a96
refs/heads/master: a7807a32bbb027ab9955b96734fdc7f1e6497a9f
7 changes: 7 additions & 0 deletions trunk/include/linux/poison.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@
/********** drivers/atm/ **********/
#define ATM_POISON_FREE 0x12

/********** kernel/mutexes **********/
#define MUTEX_DEBUG_INIT 0x11
#define MUTEX_DEBUG_FREE 0x22

/********** security/ **********/
#define KEY_DESTROY 0xbd

/********** sound/oss/ **********/
#define OSS_POISON_FREE 0xAB

Expand Down
5 changes: 3 additions & 2 deletions trunk/kernel/mutex-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/poison.h>
#include <linux/spinlock.h>
#include <linux/kallsyms.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -381,7 +382,7 @@ void debug_mutex_set_owner(struct mutex *lock,

void debug_mutex_init_waiter(struct mutex_waiter *waiter)
{
memset(waiter, 0x11, sizeof(*waiter));
memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
waiter->magic = waiter;
INIT_LIST_HEAD(&waiter->list);
}
Expand All @@ -397,7 +398,7 @@ void debug_mutex_wake_waiter(struct mutex *lock, struct mutex_waiter *waiter)
void debug_mutex_free_waiter(struct mutex_waiter *waiter)
{
DEBUG_WARN_ON(!list_empty(&waiter->list));
memset(waiter, 0x22, sizeof(*waiter));
memset(waiter, MUTEX_DEBUG_FREE, sizeof(*waiter));
}

void debug_mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
Expand Down
3 changes: 2 additions & 1 deletion trunk/security/keys/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include <linux/module.h>
#include <linux/init.h>
#include <linux/poison.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/security.h>
Expand Down Expand Up @@ -988,7 +989,7 @@ void unregister_key_type(struct key_type *ktype)
if (key->type == ktype) {
if (ktype->destroy)
ktype->destroy(key);
memset(&key->payload, 0xbd, sizeof(key->payload));
memset(&key->payload, KEY_DESTROY, sizeof(key->payload));
}
}

Expand Down

0 comments on commit 1f17bd1

Please sign in to comment.