aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/mutex-debug.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@bruce>2006-01-11 21:34:47 -0500
committerNathan Scott <nathans@bruce>2006-01-11 21:34:47 -0500
commitddae9c2ea79449beb00027cf77fca6dc489f2d15 (patch)
tree047c2d7c8d6cbb0721f017514e1d83a20e278d43 /kernel/mutex-debug.c
parent0d1335b3106687d87fcfa0e4d90f2a961bd7e1db (diff)
parenta4fc7ab1d065a9dd89ed0e74439ef87d4a16e980 (diff)
Merge HEAD from oss.sgi.com:/oss/git/linux-2.6.git
Diffstat (limited to 'kernel/mutex-debug.c')
-rw-r--r--kernel/mutex-debug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c
index 3dec75363786..f4913c376950 100644
--- a/kernel/mutex-debug.c
+++ b/kernel/mutex-debug.c
@@ -333,9 +333,10 @@ void mutex_debug_check_no_locks_held(struct task_struct *task)
333 * is destroyed or reinitialized - this code checks whether there is 333 * is destroyed or reinitialized - this code checks whether there is
334 * any held lock in the memory range of <from> to <to>: 334 * any held lock in the memory range of <from> to <to>:
335 */ 335 */
336void mutex_debug_check_no_locks_freed(const void *from, const void *to) 336void mutex_debug_check_no_locks_freed(const void *from, unsigned long len)
337{ 337{
338 struct list_head *curr, *next; 338 struct list_head *curr, *next;
339 const void *to = from + len;
339 unsigned long flags; 340 unsigned long flags;
340 struct mutex *lock; 341 struct mutex *lock;
341 void *lock_addr; 342 void *lock_addr;
@@ -437,7 +438,7 @@ void debug_mutex_init(struct mutex *lock, const char *name)
437 /* 438 /*
438 * Make sure we are not reinitializing a held lock: 439 * Make sure we are not reinitializing a held lock:
439 */ 440 */
440 mutex_debug_check_no_locks_freed((void *)lock, (void *)(lock + 1)); 441 mutex_debug_check_no_locks_freed((void *)lock, sizeof(*lock));
441 lock->owner = NULL; 442 lock->owner = NULL;
442 INIT_LIST_HEAD(&lock->held_list); 443 INIT_LIST_HEAD(&lock->held_list);
443 lock->name = name; 444 lock->name = name;
@@ -459,4 +460,3 @@ void fastcall mutex_destroy(struct mutex *lock)
459} 460}
460 461
461EXPORT_SYMBOL_GPL(mutex_destroy); 462EXPORT_SYMBOL_GPL(mutex_destroy);
462