aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/mutex-debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/mutex-debug.c')
-rw-r--r--kernel/mutex-debug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/mutex-debug.c b/kernel/mutex-debug.c
index 4fcb051a8b9e..f4913c376950 100644
--- a/kernel/mutex-debug.c
+++ b/kernel/mutex-debug.c
@@ -20,8 +20,6 @@
20#include <linux/kallsyms.h> 20#include <linux/kallsyms.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22 22
23#include <asm/mutex.h>
24
25#include "mutex-debug.h" 23#include "mutex-debug.h"
26 24
27/* 25/*
@@ -335,9 +333,10 @@ void mutex_debug_check_no_locks_held(struct task_struct *task)
335 * is destroyed or reinitialized - this code checks whether there is 333 * is destroyed or reinitialized - this code checks whether there is
336 * any held lock in the memory range of <from> to <to>: 334 * any held lock in the memory range of <from> to <to>:
337 */ 335 */
338void 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)
339{ 337{
340 struct list_head *curr, *next; 338 struct list_head *curr, *next;
339 const void *to = from + len;
341 unsigned long flags; 340 unsigned long flags;
342 struct mutex *lock; 341 struct mutex *lock;
343 void *lock_addr; 342 void *lock_addr;
@@ -439,7 +438,7 @@ void debug_mutex_init(struct mutex *lock, const char *name)
439 /* 438 /*
440 * Make sure we are not reinitializing a held lock: 439 * Make sure we are not reinitializing a held lock:
441 */ 440 */
442 mutex_debug_check_no_locks_freed((void *)lock, (void *)(lock + 1)); 441 mutex_debug_check_no_locks_freed((void *)lock, sizeof(*lock));
443 lock->owner = NULL; 442 lock->owner = NULL;
444 INIT_LIST_HEAD(&lock->held_list); 443 INIT_LIST_HEAD(&lock->held_list);
445 lock->name = name; 444 lock->name = name;
@@ -461,4 +460,3 @@ void fastcall mutex_destroy(struct mutex *lock)
461} 460}
462 461
463EXPORT_SYMBOL_GPL(mutex_destroy); 462EXPORT_SYMBOL_GPL(mutex_destroy);
464