Skip to content

Commit

Permalink
Merge branch 'liblockdep-fixes' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/sashal/linux into locking/urgent

Pull liblockdep fixes from Sasha Levin:

  " ... three fixes for liblockdep. Just keeping up with kernel
    code changes and new gcc versions."

Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Nov 9, 2015
2 parents 66ef349 + 2b62c2d commit b32e1f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/lib/lockdep/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ __attribute__((constructor)) static void liblockdep_init(void)

__attribute__((destructor)) static void liblockdep_exit(void)
{
debug_check_no_locks_held(&current_obj);
debug_check_no_locks_held();
}

struct task_struct *__curr(void)
Expand Down
2 changes: 2 additions & 0 deletions tools/lib/lockdep/include/liblockdep/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass,
struct lockdep_map *nest_lock, unsigned long ip);
void lock_release(struct lockdep_map *lock, int nested,
unsigned long ip);
extern void debug_check_no_locks_freed(const void *from, unsigned long len);
extern void lockdep_init(void);

#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
{ .name = (_name), .key = (void *)(_key), }
Expand Down
2 changes: 2 additions & 0 deletions tools/lib/lockdep/uinclude/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@

#define __used __attribute__((__unused__))
#define unlikely
#define WRITE_ONCE(x, val) x=(val)
#define RCU_INIT_POINTER(p, v) p=(v)

#endif
3 changes: 2 additions & 1 deletion tools/lib/lockdep/uinclude/linux/lockdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <string.h>
#include <limits.h>
#include <linux/utsname.h>

#include <linux/compiler.h>

#define MAX_LOCK_DEPTH 2000UL

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

#define debug_show_all_locks()
extern void debug_check_no_locks_held(void);

#endif

0 comments on commit b32e1f5

Please sign in to comment.