提交 d99d5917 编写于 作者: L Linus Torvalds

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar:
 "liblockdep fixes and mutex debugging fixes"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/mutex: Fix debug_mutexes
  tools/liblockdep: Add proper versioning to the shared obj
  tools/liblockdep: Ignore asmlinkage and visible
...@@ -71,9 +71,7 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter, ...@@ -71,9 +71,7 @@ void mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter,
void debug_mutex_unlock(struct mutex *lock) void debug_mutex_unlock(struct mutex *lock)
{ {
if (unlikely(!debug_locks)) if (likely(debug_locks)) {
return;
DEBUG_LOCKS_WARN_ON(lock->magic != lock); DEBUG_LOCKS_WARN_ON(lock->magic != lock);
if (!lock->owner) if (!lock->owner)
...@@ -83,6 +81,7 @@ void debug_mutex_unlock(struct mutex *lock) ...@@ -83,6 +81,7 @@ void debug_mutex_unlock(struct mutex *lock)
DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next); DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
mutex_clear_owner(lock); mutex_clear_owner(lock);
}
/* /*
* __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug
......
# liblockdep version
LL_VERSION = 0
LL_PATCHLEVEL = 0
LL_EXTRAVERSION = 1
# file format version # file format version
FILE_VERSION = 1 FILE_VERSION = 1
MAKEFLAGS += --no-print-directory MAKEFLAGS += --no-print-directory
LIBLOCKDEP_VERSION=$(shell make -sC ../../.. kernelversion)
# Makefiles suck: This macro sets a default value of $(2) for the # Makefiles suck: This macro sets a default value of $(2) for the
# variable named by $(1), unless the variable has been set by # variable named by $(1), unless the variable has been set by
...@@ -98,7 +93,7 @@ export prefix libdir bindir src obj ...@@ -98,7 +93,7 @@ export prefix libdir bindir src obj
libdir_SQ = $(subst ','\'',$(libdir)) libdir_SQ = $(subst ','\'',$(libdir))
bindir_SQ = $(subst ','\'',$(bindir)) bindir_SQ = $(subst ','\'',$(bindir))
LIB_FILE = liblockdep.a liblockdep.so LIB_FILE = liblockdep.a liblockdep.so.$(LIBLOCKDEP_VERSION)
BIN_FILE = lockdep BIN_FILE = lockdep
CONFIG_INCLUDES = CONFIG_INCLUDES =
...@@ -110,8 +105,6 @@ N = ...@@ -110,8 +105,6 @@ N =
export Q VERBOSE export Q VERBOSE
LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION)
INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES) INCLUDES = -I. -I/usr/local/include -I./uinclude -I./include $(CONFIG_INCLUDES)
# Set compile option CFLAGS if not set elsewhere # Set compile option CFLAGS if not set elsewhere
...@@ -146,7 +139,7 @@ do_app_build = \ ...@@ -146,7 +139,7 @@ do_app_build = \
do_compile_shared_library = \ do_compile_shared_library = \
($(print_shared_lib_compile) \ ($(print_shared_lib_compile) \
$(CC) --shared $^ -o $@ -lpthread -ldl) $(CC) --shared $^ -o $@ -lpthread -ldl -Wl,-soname='"$@"';$(shell ln -s $@ liblockdep.so))
do_build_static_lib = \ do_build_static_lib = \
($(print_static_lib_build) \ ($(print_static_lib_build) \
...@@ -177,7 +170,7 @@ all: all_cmd ...@@ -177,7 +170,7 @@ all: all_cmd
all_cmd: $(CMD_TARGETS) all_cmd: $(CMD_TARGETS)
liblockdep.so: $(PEVENT_LIB_OBJS) liblockdep.so.$(LIBLOCKDEP_VERSION): $(PEVENT_LIB_OBJS)
$(Q)$(do_compile_shared_library) $(Q)$(do_compile_shared_library)
liblockdep.a: $(PEVENT_LIB_OBJS) liblockdep.a: $(PEVENT_LIB_OBJS)
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#define MAX_LOCK_DEPTH 2000UL #define MAX_LOCK_DEPTH 2000UL
#define asmlinkage
#define __visible
#include "../../../include/linux/lockdep.h" #include "../../../include/linux/lockdep.h"
struct task_struct { struct task_struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册