Skip to contentSkip to conversation

locking fixes

GIT PULL Ingo Molnar 1 participant 1 message Sep 15, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest locking-urgent-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-urgent-for-linus

# HEAD: 0b405c65ad459f5f4d3db1672246172bd19d946d locking/ww_mutex: Fix spelling mistake "cylic" -> "cyclic"

Misc fixes: liblockdep fixes and ww_mutex fixes.

Thanks,

Ingo

------------------>
Ben Hutchings (1):
locking/lockdep: Delete unnecessary #include

Borislav Petkov (1):
jump_label: Fix typo in warning message

Colin Ian King (1):

      locking/ww_mutex: Fix spelling mistake "cylic" -> "cyclic"

Sasha Levin (3):
tools/lib/lockdep: Update Sasha Levin email to MSFT tools/lib/lockdep: Add empty nmi.h tools/lib/lockdep: Add dummy task_struct state member

Thomas Hellstrom (1):
locking/mutex: Fix mutex debug call and ww_mutex documentation

 MAINTAINERS                    | 2 +-
 kernel/jump_label.c            | 2 +-
 kernel/locking/lockdep.c       | 1 -
 kernel/locking/mutex.c         | 3 +--
 kernel/locking/test-ww_mutex.c | 2 +-
 tools/include/linux/lockdep.h  | 3 +++
 tools/include/linux/nmi.h      | 0
 7 files changed, 7 insertions(+), 6 deletions(-)
 create mode 100644 tools/include/linux/nmi.h
MAINTAINERS +1 -1
index d870cb57c887..f999786cfa90 100644
@@ -8300,7 +8300,7 @@ F:	include/linux/libata.h
 F:	Documentation/devicetree/bindings/ata/
 
 LIBLOCKDEP
-M:	Sasha Levin <[email protected]>
+M:	Sasha Levin <[email protected]>
 S:	Maintained
 F:	tools/lib/lockdep/
 
kernel/jump_label.c +1 -1
index 01ebdf1f9f40..2e62503bea0d 100644
@@ -678,7 +678,7 @@ jump_label_module_notify(struct notifier_block *self, unsigned long val,
 	case MODULE_STATE_COMING:
 		ret = jump_label_add_module(mod);
 		if (ret) {
-			WARN(1, "Failed to allocatote memory: jump_label may not work properly.\n");
+			WARN(1, "Failed to allocate memory: jump_label may not work properly.\n");
 			jump_label_del_module(mod);
 		}
 		break;
kernel/locking/lockdep.c +0 -1
index e406c5fdb41e..dd13f865ad40 100644
@@ -55,7 +55,6 @@
 
 #include "lockdep_internals.h"
 
-#include <trace/events/preemptirq.h>
 #define CREATE_TRACE_POINTS
 #include <trace/events/lock.h>
 
kernel/locking/mutex.c +1 -2
index 1a81a1257b3f..3f8a35104285 100644
@@ -389,7 +389,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
 		/*
 		 * wake_up_process() paired with set_current_state()
 		 * inserts sufficient barriers to make sure @owner either sees
-		 * it's wounded in __ww_mutex_lock_check_stamp() or has a
+		 * it's wounded in __ww_mutex_check_kill() or has a
 		 * wakeup pending to re-read the wounded state.
 		 */
 		if (owner != current)
@@ -946,7 +946,6 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass,
 	}
 
 	debug_mutex_lock_common(lock, &waiter);
-	debug_mutex_add_waiter(lock, &waiter, current);
 
 	lock_contended(&lock->dep_map, ip);
 
kernel/locking/test-ww_mutex.c +1 -1
index 5b915b370d5a..0be047dbd897 100644
@@ -324,7 +324,7 @@ static int __test_cycle(unsigned int nthreads)
 		if (!cycle->result)
 			continue;
 
-		pr_err("cylic deadlock not resolved, ret[%d/%d] = %d\n",
+		pr_err("cyclic deadlock not resolved, ret[%d/%d] = %d\n",
 		       n, nthreads, cycle->result);
 		ret = -EINVAL;
 		break;
tools/include/linux/lockdep.h +3 -0
index 6b0c36a58fcb..e56997288f2b 100644
@@ -30,9 +30,12 @@ struct task_struct {
 	struct held_lock held_locks[MAX_LOCK_DEPTH];
 	gfp_t lockdep_reclaim_gfp;
 	int pid;
+	int state;
 	char comm[17];
 };
 
+#define TASK_RUNNING 0
+
 extern struct task_struct *__curr(void);
 
 #define current (__curr())
tools/include/linux/nmi.h new file +0 -0
new file mode 100644
index 000000000000..e69de29bb2d1