#include <linux/kallsyms.h>
#include <linux/interrupt.h>
-#include <asm/mutex.h>
-
#include "mutex-debug.h"
/*
* is destroyed or reinitialized - this code checks whether there is
* any held lock in the memory range of <from> to <to>:
*/
-void mutex_debug_check_no_locks_freed(const void *from, const void *to)
+void mutex_debug_check_no_locks_freed(const void *from, unsigned long len)
{
struct list_head *curr, *next;
+ const void *to = from + len;
unsigned long flags;
struct mutex *lock;
void *lock_addr;
/*
* Make sure we are not reinitializing a held lock:
*/
- mutex_debug_check_no_locks_freed((void *)lock, (void *)(lock + 1));
+ mutex_debug_check_no_locks_freed((void *)lock, sizeof(*lock));
lock->owner = NULL;
INIT_LIST_HEAD(&lock->held_list);
lock->name = name;
}
EXPORT_SYMBOL_GPL(mutex_destroy);
-