Skip to content

Commit 8f98e29

Browse files
committed
Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull liblockdep fixes from Thomas Gleixner: "Three small patches to synchronize liblockdep with the latest core changes" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/liblockdep: explicitly declare lockdep API we call from liblockdep tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER tools/liblockdep: remove task argument from debug_check_no_locks_held
2 parents bba072d + b32e1f5 commit 8f98e29

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

tools/lib/lockdep/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ __attribute__((constructor)) static void liblockdep_init(void)
1818

1919
__attribute__((destructor)) static void liblockdep_exit(void)
2020
{
21-
debug_check_no_locks_held(&current_obj);
21+
debug_check_no_locks_held();
2222
}
2323

2424
struct task_struct *__curr(void)

tools/lib/lockdep/include/liblockdep/common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
4343
struct lockdep_map *nest_lock, unsigned long ip);
4444
void lock_release(struct lockdep_map *lock, int nested,
4545
unsigned long ip);
46+
extern void debug_check_no_locks_freed(const void *from, unsigned long len);
47+
extern void lockdep_init(void);
4648

4749
#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
4850
{ .name = (_name), .key = (void *)(_key), }

tools/lib/lockdep/uinclude/linux/compiler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33

44
#define __used __attribute__((__unused__))
55
#define unlikely
6+
#define WRITE_ONCE(x, val) x=(val)
7+
#define RCU_INIT_POINTER(p, v) p=(v)
68

79
#endif

tools/lib/lockdep/uinclude/linux/lockdep.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <string.h>
77
#include <limits.h>
88
#include <linux/utsname.h>
9-
9+
#include <linux/compiler.h>
1010

1111
#define MAX_LOCK_DEPTH 2000UL
1212

@@ -54,5 +54,6 @@ static struct new_utsname *init_utsname(void)
5454
#define static_obj(x) 1
5555

5656
#define debug_show_all_locks()
57+
extern void debug_check_no_locks_held(void);
5758

5859
#endif

0 commit comments

Comments
 (0)