All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/13] locking/lockdep: restore cross-release checks
@ 2018-11-07 15:30 Daniel Vetter
  2018-11-07 15:30 ` [PATCH 02/13] kthread: finer-grained lockdep/cross-release completion Daniel Vetter
                   ` (28 more replies)
  0 siblings, 29 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

This reverts the following commits:

commit 527187d28569 ("locking/lockdep: Remove cross-release leftovers")
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")
commit e966eaeeb623 ("locking/lockdep: Remove the cross-release locking checks")
commit 44318d5b07be ("locking/lockdep: Remove add_chain_cache_classes()")

Since the first two are just fixups for the cross-release removal I
figured I'll squash them all into one.

v2: Revert more cleanup patches.

Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: Thymo van Beers <thymovanbeers@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Waiman Long <longman@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Yury Norov <ynorov@caviumnetworks.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 .../admin-guide/kernel-parameters.txt         |   3 +
 Documentation/locking/crossrelease.txt        | 874 ++++++++++++++++++
 include/linux/completion.h                    |  46 +
 include/linux/irqflags.h                      |   4 +
 include/linux/lockdep.h                       | 127 +++
 include/linux/sched.h                         |  11 +
 kernel/locking/lockdep.c                      | 722 ++++++++++++++-
 kernel/sched/completion.c                     |   5 +
 lib/Kconfig.debug                             |  33 +
 9 files changed, 1790 insertions(+), 35 deletions(-)
 create mode 100644 Documentation/locking/crossrelease.txt

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 81d1d5a74728..4c85bd20ac5e 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -724,6 +724,9 @@
 			It will be ignored when crashkernel=X,high is not used
 			or memory reserved is below 4G.
 
+	crossrelease_fullstack
+			[KNL] Allow to record full stack trace in cross-release
+
 	cryptomgr.notests
 			[KNL] Disable crypto self-tests
 
diff --git a/Documentation/locking/crossrelease.txt b/Documentation/locking/crossrelease.txt
new file mode 100644
index 000000000000..bdf1423d5f99
--- /dev/null
+++ b/Documentation/locking/crossrelease.txt
@@ -0,0 +1,874 @@
+Crossrelease
+============
+
+Started by Byungchul Park <byungchul.park@lge.com>
+
+Contents:
+
+ (*) Background
+
+     - What causes deadlock
+     - How lockdep works
+
+ (*) Limitation
+
+     - Limit lockdep
+     - Pros from the limitation
+     - Cons from the limitation
+     - Relax the limitation
+
+ (*) Crossrelease
+
+     - Introduce crossrelease
+     - Introduce commit
+
+ (*) Implementation
+
+     - Data structures
+     - How crossrelease works
+
+ (*) Optimizations
+
+     - Avoid duplication
+     - Lockless for hot paths
+
+ (*) APPENDIX A: What lockdep does to work aggresively
+
+ (*) APPENDIX B: How to avoid adding false dependencies
+
+
+==========
+Background
+==========
+
+What causes deadlock
+--------------------
+
+A deadlock occurs when a context is waiting for an event to happen,
+which is impossible because another (or the) context who can trigger the
+event is also waiting for another (or the) event to happen, which is
+also impossible due to the same reason.
+
+For example:
+
+   A context going to trigger event C is waiting for event A to happen.
+   A context going to trigger event A is waiting for event B to happen.
+   A context going to trigger event B is waiting for event C to happen.
+
+A deadlock occurs when these three wait operations run at the same time,
+because event C cannot be triggered if event A does not happen, which in
+turn cannot be triggered if event B does not happen, which in turn
+cannot be triggered if event C does not happen. After all, no event can
+be triggered since any of them never meets its condition to wake up.
+
+A dependency might exist between two waiters and a deadlock might happen
+due to an incorrect releationship between dependencies. Thus, we must
+define what a dependency is first. A dependency exists between them if:
+
+   1. There are two waiters waiting for each event at a given time.
+   2. The only way to wake up each waiter is to trigger its event.
+   3. Whether one can be woken up depends on whether the other can.
+
+Each wait in the example creates its dependency like:
+
+   Event C depends on event A.
+   Event A depends on event B.
+   Event B depends on event C.
+
+   NOTE: Precisely speaking, a dependency is one between whether a
+   waiter for an event can be woken up and whether another waiter for
+   another event can be woken up. However from now on, we will describe
+   a dependency as if it's one between an event and another event for
+   simplicity.
+
+And they form circular dependencies like:
+
+    -> C -> A -> B -
+   /                \
+   \                /
+    ----------------
+
+   where 'A -> B' means that event A depends on event B.
+
+Such circular dependencies lead to a deadlock since no waiter can meet
+its condition to wake up as described.
+
+CONCLUSION
+
+Circular dependencies cause a deadlock.
+
+
+How lockdep works
+-----------------
+
+Lockdep tries to detect a deadlock by checking dependencies created by
+lock operations, acquire and release. Waiting for a lock corresponds to
+waiting for an event, and releasing a lock corresponds to triggering an
+event in the previous section.
+
+In short, lockdep does:
+
+   1. Detect a new dependency.
+   2. Add the dependency into a global graph.
+   3. Check if that makes dependencies circular.
+   4. Report a deadlock or its possibility if so.
+
+For example, consider a graph built by lockdep that looks like:
+
+   A -> B -
+           \
+            -> E
+           /
+   C -> D -
+
+   where A, B,..., E are different lock classes.
+
+Lockdep will add a dependency into the graph on detection of a new
+dependency. For example, it will add a dependency 'E -> C' when a new
+dependency between lock E and lock C is detected. Then the graph will be:
+
+       A -> B -
+               \
+                -> E -
+               /      \
+    -> C -> D -        \
+   /                   /
+   \                  /
+    ------------------
+
+   where A, B,..., E are different lock classes.
+
+This graph contains a subgraph which demonstrates circular dependencies:
+
+                -> E -
+               /      \
+    -> C -> D -        \
+   /                   /
+   \                  /
+    ------------------
+
+   where C, D and E are different lock classes.
+
+This is the condition under which a deadlock might occur. Lockdep
+reports it on detection after adding a new dependency. This is the way
+how lockdep works.
+
+CONCLUSION
+
+Lockdep detects a deadlock or its possibility by checking if circular
+dependencies were created after adding each new dependency.
+
+
+==========
+Limitation
+==========
+
+Limit lockdep
+-------------
+
+Limiting lockdep to work on only typical locks e.g. spin locks and
+mutexes, which are released within the acquire context, the
+implementation becomes simple but its capacity for detection becomes
+limited. Let's check pros and cons in next section.
+
+
+Pros from the limitation
+------------------------
+
+Given the limitation, when acquiring a lock, locks in a held_locks
+cannot be released if the context cannot acquire it so has to wait to
+acquire it, which means all waiters for the locks in the held_locks are
+stuck. It's an exact case to create dependencies between each lock in
+the held_locks and the lock to acquire.
+
+For example:
+
+   CONTEXT X
+   ---------
+   acquire A
+   acquire B /* Add a dependency 'A -> B' */
+   release B
+   release A
+
+   where A and B are different lock classes.
+
+When acquiring lock A, the held_locks of CONTEXT X is empty thus no
+dependency is added. But when acquiring lock B, lockdep detects and adds
+a new dependency 'A -> B' between lock A in the held_locks and lock B.
+They can be simply added whenever acquiring each lock.
+
+And data required by lockdep exists in a local structure, held_locks
+embedded in task_struct. Forcing to access the data within the context,
+lockdep can avoid racy problems without explicit locks while handling
+the local data.
+
+Lastly, lockdep only needs to keep locks currently being held, to build
+a dependency graph. However, relaxing the limitation, it needs to keep
+even locks already released, because a decision whether they created
+dependencies might be long-deferred.
+
+To sum up, we can expect several advantages from the limitation:
+
+   1. Lockdep can easily identify a dependency when acquiring a lock.
+   2. Races are avoidable while accessing local locks in a held_locks.
+   3. Lockdep only needs to keep locks currently being held.
+
+CONCLUSION
+
+Given the limitation, the implementation becomes simple and efficient.
+
+
+Cons from the limitation
+------------------------
+
+Given the limitation, lockdep is applicable only to typical locks. For
+example, page locks for page access or completions for synchronization
+cannot work with lockdep.
+
+Can we detect deadlocks below, under the limitation?
+
+Example 1:
+
+   CONTEXT X	   CONTEXT Y	   CONTEXT Z
+   ---------	   ---------	   ----------
+		   mutex_lock A
+   lock_page B
+		   lock_page B
+				   mutex_lock A /* DEADLOCK */
+				   unlock_page B held by X
+		   unlock_page B
+		   mutex_unlock A
+				   mutex_unlock A
+
+   where A and B are different lock classes.
+
+No, we cannot.
+
+Example 2:
+
+   CONTEXT X		   CONTEXT Y
+   ---------		   ---------
+			   mutex_lock A
+   mutex_lock A
+			   wait_for_complete B /* DEADLOCK */
+   complete B
+			   mutex_unlock A
+   mutex_unlock A
+
+   where A is a lock class and B is a completion variable.
+
+No, we cannot.
+
+CONCLUSION
+
+Given the limitation, lockdep cannot detect a deadlock or its
+possibility caused by page locks or completions.
+
+
+Relax the limitation
+--------------------
+
+Under the limitation, things to create dependencies are limited to
+typical locks. However, synchronization primitives like page locks and
+completions, which are allowed to be released in any context, also
+create dependencies and can cause a deadlock. So lockdep should track
+these locks to do a better job. We have to relax the limitation for
+these locks to work with lockdep.
+
+Detecting dependencies is very important for lockdep to work because
+adding a dependency means adding an opportunity to check whether it
+causes a deadlock. The more lockdep adds dependencies, the more it
+thoroughly works. Thus Lockdep has to do its best to detect and add as
+many true dependencies into a graph as possible.
+
+For example, considering only typical locks, lockdep builds a graph like:
+
+   A -> B -
+           \
+            -> E
+           /
+   C -> D -
+
+   where A, B,..., E are different lock classes.
+
+On the other hand, under the relaxation, additional dependencies might
+be created and added. Assuming additional 'FX -> C' and 'E -> GX' are
+added thanks to the relaxation, the graph will be:
+
+         A -> B -
+                 \
+                  -> E -> GX
+                 /
+   FX -> C -> D -
+
+   where A, B,..., E, FX and GX are different lock classes, and a suffix
+   'X' is added on non-typical locks.
+
+The latter graph gives us more chances to check circular dependencies
+than the former. However, it might suffer performance degradation since
+relaxing the limitation, with which design and implementation of lockdep
+can be efficient, might introduce inefficiency inevitably. So lockdep
+should provide two options, strong detection and efficient detection.
+
+Choosing efficient detection:
+
+   Lockdep works with only locks restricted to be released within the
+   acquire context. However, lockdep works efficiently.
+
+Choosing strong detection:
+
+   Lockdep works with all synchronization primitives. However, lockdep
+   suffers performance degradation.
+
+CONCLUSION
+
+Relaxing the limitation, lockdep can add additional dependencies giving
+additional opportunities to check circular dependencies.
+
+
+============
+Crossrelease
+============
+
+Introduce crossrelease
+----------------------
+
+In order to allow lockdep to handle additional dependencies by what
+might be released in any context, namely 'crosslock', we have to be able
+to identify those created by crosslocks. The proposed 'crossrelease'
+feature provoides a way to do that.
+
+Crossrelease feature has to do:
+
+   1. Identify dependencies created by crosslocks.
+   2. Add the dependencies into a dependency graph.
+
+That's all. Once a meaningful dependency is added into graph, then
+lockdep would work with the graph as it did. The most important thing
+crossrelease feature has to do is to correctly identify and add true
+dependencies into the global graph.
+
+A dependency e.g. 'A -> B' can be identified only in the A's release
+context because a decision required to identify the dependency can be
+made only in the release context. That is to decide whether A can be
+released so that a waiter for A can be woken up. It cannot be made in
+other than the A's release context.
+
+It's no matter for typical locks because each acquire context is same as
+its release context, thus lockdep can decide whether a lock can be
+released in the acquire context. However for crosslocks, lockdep cannot
+make the decision in the acquire context but has to wait until the
+release context is identified.
+
+Therefore, deadlocks by crosslocks cannot be detected just when it
+happens, because those cannot be identified until the crosslocks are
+released. However, deadlock possibilities can be detected and it's very
+worth. See 'APPENDIX A' section to check why.
+
+CONCLUSION
+
+Using crossrelease feature, lockdep can work with what might be released
+in any context, namely crosslock.
+
+
+Introduce commit
+----------------
+
+Since crossrelease defers the work adding true dependencies of
+crosslocks until they are actually released, crossrelease has to queue
+all acquisitions which might create dependencies with the crosslocks.
+Then it identifies dependencies using the queued data in batches at a
+proper time. We call it 'commit'.
+
+There are four types of dependencies:
+
+1. TT type: 'typical lock A -> typical lock B'
+
+   Just when acquiring B, lockdep can see it's in the A's release
+   context. So the dependency between A and B can be identified
+   immediately. Commit is unnecessary.
+
+2. TC type: 'typical lock A -> crosslock BX'
+
+   Just when acquiring BX, lockdep can see it's in the A's release
+   context. So the dependency between A and BX can be identified
+   immediately. Commit is unnecessary, too.
+
+3. CT type: 'crosslock AX -> typical lock B'
+
+   When acquiring B, lockdep cannot identify the dependency because
+   there's no way to know if it's in the AX's release context. It has
+   to wait until the decision can be made. Commit is necessary.
+
+4. CC type: 'crosslock AX -> crosslock BX'
+
+   When acquiring BX, lockdep cannot identify the dependency because
+   there's no way to know if it's in the AX's release context. It has
+   to wait until the decision can be made. Commit is necessary.
+   But, handling CC type is not implemented yet. It's a future work.
+
+Lockdep can work without commit for typical locks, but commit step is
+necessary once crosslocks are involved. Introducing commit, lockdep
+performs three steps. What lockdep does in each step is:
+
+1. Acquisition: For typical locks, lockdep does what it originally did
+   and queues the lock so that CT type dependencies can be checked using
+   it at the commit step. For crosslocks, it saves data which will be
+   used at the commit step and increases a reference count for it.
+
+2. Commit: No action is reauired for typical locks. For crosslocks,
+   lockdep adds CT type dependencies using the data saved at the
+   acquisition step.
+
+3. Release: No changes are required for typical locks. When a crosslock
+   is released, it decreases a reference count for it.
+
+CONCLUSION
+
+Crossrelease introduces commit step to handle dependencies of crosslocks
+in batches at a proper time.
+
+
+==============
+Implementation
+==============
+
+Data structures
+---------------
+
+Crossrelease introduces two main data structures.
+
+1. hist_lock
+
+   This is an array embedded in task_struct, for keeping lock history so
+   that dependencies can be added using them at the commit step. Since
+   it's local data, it can be accessed locklessly in the owner context.
+   The array is filled at the acquisition step and consumed at the
+   commit step. And it's managed in circular manner.
+
+2. cross_lock
+
+   One per lockdep_map exists. This is for keeping data of crosslocks
+   and used at the commit step.
+
+
+How crossrelease works
+----------------------
+
+It's the key of how crossrelease works, to defer necessary works to an
+appropriate point in time and perform in at once at the commit step.
+Let's take a look with examples step by step, starting from how lockdep
+works without crossrelease for typical locks.
+
+   acquire A /* Push A onto held_locks */
+   acquire B /* Push B onto held_locks and add 'A -> B' */
+   acquire C /* Push C onto held_locks and add 'B -> C' */
+   release C /* Pop C from held_locks */
+   release B /* Pop B from held_locks */
+   release A /* Pop A from held_locks */
+
+   where A, B and C are different lock classes.
+
+   NOTE: This document assumes that readers already understand how
+   lockdep works without crossrelease thus omits details. But there's
+   one thing to note. Lockdep pretends to pop a lock from held_locks
+   when releasing it. But it's subtly different from the original pop
+   operation because lockdep allows other than the top to be poped.
+
+In this case, lockdep adds 'the top of held_locks -> the lock to acquire'
+dependency every time acquiring a lock.
+
+After adding 'A -> B', a dependency graph will be:
+
+   A -> B
+
+   where A and B are different lock classes.
+
+And after adding 'B -> C', the graph will be:
+
+   A -> B -> C
+
+   where A, B and C are different lock classes.
+
+Let's performs commit step even for typical locks to add dependencies.
+Of course, commit step is not necessary for them, however, it would work
+well because this is a more general way.
+
+   acquire A
+   /*
+    * Queue A into hist_locks
+    *
+    * In hist_locks: A
+    * In graph: Empty
+    */
+
+   acquire B
+   /*
+    * Queue B into hist_locks
+    *
+    * In hist_locks: A, B
+    * In graph: Empty
+    */
+
+   acquire C
+   /*
+    * Queue C into hist_locks
+    *
+    * In hist_locks: A, B, C
+    * In graph: Empty
+    */
+
+   commit C
+   /*
+    * Add 'C -> ?'
+    * Answer the following to decide '?'
+    * What has been queued since acquire C: Nothing
+    *
+    * In hist_locks: A, B, C
+    * In graph: Empty
+    */
+
+   release C
+
+   commit B
+   /*
+    * Add 'B -> ?'
+    * Answer the following to decide '?'
+    * What has been queued since acquire B: C
+    *
+    * In hist_locks: A, B, C
+    * In graph: 'B -> C'
+    */
+
+   release B
+
+   commit A
+   /*
+    * Add 'A -> ?'
+    * Answer the following to decide '?'
+    * What has been queued since acquire A: B, C
+    *
+    * In hist_locks: A, B, C
+    * In graph: 'B -> C', 'A -> B', 'A -> C'
+    */
+
+   release A
+
+   where A, B and C are different lock classes.
+
+In this case, dependencies are added at the commit step as described.
+
+After commits for A, B and C, the graph will be:
+
+   A -> B -> C
+
+   where A, B and C are different lock classes.
+
+   NOTE: A dependency 'A -> C' is optimized out.
+
+We can see the former graph built without commit step is same as the
+latter graph built using commit steps. Of course the former way leads to
+earlier finish for building the graph, which means we can detect a
+deadlock or its possibility sooner. So the former way would be prefered
+when possible. But we cannot avoid using the latter way for crosslocks.
+
+Let's look at how commit steps work for crosslocks. In this case, the
+commit step is performed only on crosslock AX as real. And it assumes
+that the AX release context is different from the AX acquire context.
+
+   BX RELEASE CONTEXT		   BX ACQUIRE CONTEXT
+   ------------------		   ------------------
+				   acquire A
+				   /*
+				    * Push A onto held_locks
+				    * Queue A into hist_locks
+				    *
+				    * In held_locks: A
+				    * In hist_locks: A
+				    * In graph: Empty
+				    */
+
+				   acquire BX
+				   /*
+				    * Add 'the top of held_locks -> BX'
+				    *
+				    * In held_locks: A
+				    * In hist_locks: A
+				    * In graph: 'A -> BX'
+				    */
+
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   It must be guaranteed that the following operations are seen after
+   acquiring BX globally. It can be done by things like barrier.
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+   acquire C
+   /*
+    * Push C onto held_locks
+    * Queue C into hist_locks
+    *
+    * In held_locks: C
+    * In hist_locks: C
+    * In graph: 'A -> BX'
+    */
+
+   release C
+   /*
+    * Pop C from held_locks
+    *
+    * In held_locks: Empty
+    * In hist_locks: C
+    * In graph: 'A -> BX'
+    */
+				   acquire D
+				   /*
+				    * Push D onto held_locks
+				    * Queue D into hist_locks
+				    * Add 'the top of held_locks -> D'
+				    *
+				    * In held_locks: A, D
+				    * In hist_locks: A, D
+				    * In graph: 'A -> BX', 'A -> D'
+				    */
+   acquire E
+   /*
+    * Push E onto held_locks
+    * Queue E into hist_locks
+    *
+    * In held_locks: E
+    * In hist_locks: C, E
+    * In graph: 'A -> BX', 'A -> D'
+    */
+
+   release E
+   /*
+    * Pop E from held_locks
+    *
+    * In held_locks: Empty
+    * In hist_locks: D, E
+    * In graph: 'A -> BX', 'A -> D'
+    */
+				   release D
+				   /*
+				    * Pop D from held_locks
+				    *
+				    * In held_locks: A
+				    * In hist_locks: A, D
+				    * In graph: 'A -> BX', 'A -> D'
+				    */
+   commit BX
+   /*
+    * Add 'BX -> ?'
+    * What has been queued since acquire BX: C, E
+    *
+    * In held_locks: Empty
+    * In hist_locks: D, E
+    * In graph: 'A -> BX', 'A -> D',
+    *           'BX -> C', 'BX -> E'
+    */
+
+   release BX
+   /*
+    * In held_locks: Empty
+    * In hist_locks: D, E
+    * In graph: 'A -> BX', 'A -> D',
+    *           'BX -> C', 'BX -> E'
+    */
+				   release A
+				   /*
+				    * Pop A from held_locks
+				    *
+				    * In held_locks: Empty
+				    * In hist_locks: A, D
+				    * In graph: 'A -> BX', 'A -> D',
+				    *           'BX -> C', 'BX -> E'
+				    */
+
+   where A, BX, C,..., E are different lock classes, and a suffix 'X' is
+   added on crosslocks.
+
+Crossrelease considers all acquisitions after acqiuring BX are
+candidates which might create dependencies with BX. True dependencies
+will be determined when identifying the release context of BX. Meanwhile,
+all typical locks are queued so that they can be used at the commit step.
+And then two dependencies 'BX -> C' and 'BX -> E' are added at the
+commit step when identifying the release context.
+
+The final graph will be, with crossrelease:
+
+               -> C
+              /
+       -> BX -
+      /       \
+   A -         -> E
+      \
+       -> D
+
+   where A, BX, C,..., E are different lock classes, and a suffix 'X' is
+   added on crosslocks.
+
+However, the final graph will be, without crossrelease:
+
+   A -> D
+
+   where A and D are different lock classes.
+
+The former graph has three more dependencies, 'A -> BX', 'BX -> C' and
+'BX -> E' giving additional opportunities to check if they cause
+deadlocks. This way lockdep can detect a deadlock or its possibility
+caused by crosslocks.
+
+CONCLUSION
+
+We checked how crossrelease works with several examples.
+
+
+=============
+Optimizations
+=============
+
+Avoid duplication
+-----------------
+
+Crossrelease feature uses a cache like what lockdep already uses for
+dependency chains, but this time it's for caching CT type dependencies.
+Once that dependency is cached, the same will never be added again.
+
+
+Lockless for hot paths
+----------------------
+
+To keep all locks for later use at the commit step, crossrelease adopts
+a local array embedded in task_struct, which makes access to the data
+lockless by forcing it to happen only within the owner context. It's
+like how lockdep handles held_locks. Lockless implmentation is important
+since typical locks are very frequently acquired and released.
+
+
+=================================================
+APPENDIX A: What lockdep does to work aggresively
+=================================================
+
+A deadlock actually occurs when all wait operations creating circular
+dependencies run at the same time. Even though they don't, a potential
+deadlock exists if the problematic dependencies exist. Thus it's
+meaningful to detect not only an actual deadlock but also its potential
+possibility. The latter is rather valuable. When a deadlock occurs
+actually, we can identify what happens in the system by some means or
+other even without lockdep. However, there's no way to detect possiblity
+without lockdep unless the whole code is parsed in head. It's terrible.
+Lockdep does the both, and crossrelease only focuses on the latter.
+
+Whether or not a deadlock actually occurs depends on several factors.
+For example, what order contexts are switched in is a factor. Assuming
+circular dependencies exist, a deadlock would occur when contexts are
+switched so that all wait operations creating the dependencies run
+simultaneously. Thus to detect a deadlock possibility even in the case
+that it has not occured yet, lockdep should consider all possible
+combinations of dependencies, trying to:
+
+1. Use a global dependency graph.
+
+   Lockdep combines all dependencies into one global graph and uses them,
+   regardless of which context generates them or what order contexts are
+   switched in. Aggregated dependencies are only considered so they are
+   prone to be circular if a problem exists.
+
+2. Check dependencies between classes instead of instances.
+
+   What actually causes a deadlock are instances of lock. However,
+   lockdep checks dependencies between classes instead of instances.
+   This way lockdep can detect a deadlock which has not happened but
+   might happen in future by others but the same class.
+
+3. Assume all acquisitions lead to waiting.
+
+   Although locks might be acquired without waiting which is essential
+   to create dependencies, lockdep assumes all acquisitions lead to
+   waiting since it might be true some time or another.
+
+CONCLUSION
+
+Lockdep detects not only an actual deadlock but also its possibility,
+and the latter is more valuable.
+
+
+==================================================
+APPENDIX B: How to avoid adding false dependencies
+==================================================
+
+Remind what a dependency is. A dependency exists if:
+
+   1. There are two waiters waiting for each event at a given time.
+   2. The only way to wake up each waiter is to trigger its event.
+   3. Whether one can be woken up depends on whether the other can.
+
+For example:
+
+   acquire A
+   acquire B /* A dependency 'A -> B' exists */
+   release B
+   release A
+
+   where A and B are different lock classes.
+
+A depedency 'A -> B' exists since:
+
+   1. A waiter for A and a waiter for B might exist when acquiring B.
+   2. Only way to wake up each is to release what it waits for.
+   3. Whether the waiter for A can be woken up depends on whether the
+      other can. IOW, TASK X cannot release A if it fails to acquire B.
+
+For another example:
+
+   TASK X			   TASK Y
+   ------			   ------
+				   acquire AX
+   acquire B /* A dependency 'AX -> B' exists */
+   release B
+   release AX held by Y
+
+   where AX and B are different lock classes, and a suffix 'X' is added
+   on crosslocks.
+
+Even in this case involving crosslocks, the same rule can be applied. A
+depedency 'AX -> B' exists since:
+
+   1. A waiter for AX and a waiter for B might exist when acquiring B.
+   2. Only way to wake up each is to release what it waits for.
+   3. Whether the waiter for AX can be woken up depends on whether the
+      other can. IOW, TASK X cannot release AX if it fails to acquire B.
+
+Let's take a look at more complicated example:
+
+   TASK X			   TASK Y
+   ------			   ------
+   acquire B
+   release B
+   fork Y
+				   acquire AX
+   acquire C /* A dependency 'AX -> C' exists */
+   release C
+   release AX held by Y
+
+   where AX, B and C are different lock classes, and a suffix 'X' is
+   added on crosslocks.
+
+Does a dependency 'AX -> B' exist? Nope.
+
+Two waiters are essential to create a dependency. However, waiters for
+AX and B to create 'AX -> B' cannot exist at the same time in this
+example. Thus the dependency 'AX -> B' cannot be created.
+
+It would be ideal if the full set of true ones can be considered. But
+we can ensure nothing but what actually happened. Relying on what
+actually happens at runtime, we can anyway add only true ones, though
+they might be a subset of true ones. It's similar to how lockdep works
+for typical locks. There might be more true dependencies than what
+lockdep has detected in runtime. Lockdep has no choice but to rely on
+what actually happens. Crossrelease also relies on it.
+
+CONCLUSION
+
+Relying on what actually happens, lockdep can avoid adding false
+dependencies.
diff --git a/include/linux/completion.h b/include/linux/completion.h
index 519e94915d18..0662a417febe 100644
--- a/include/linux/completion.h
+++ b/include/linux/completion.h
@@ -10,6 +10,9 @@
  */
 
 #include <linux/wait.h>
+#ifdef CONFIG_LOCKDEP_COMPLETIONS
+#include <linux/lockdep.h>
+#endif
 
 /*
  * struct completion - structure used to maintain state for a "completion"
@@ -26,15 +29,58 @@
 struct completion {
 	unsigned int done;
 	wait_queue_head_t wait;
+#ifdef CONFIG_LOCKDEP_COMPLETIONS
+	struct lockdep_map_cross map;
+#endif
 };
 
+#ifdef CONFIG_LOCKDEP_COMPLETIONS
+static inline void complete_acquire(struct completion *x)
+{
+	lock_acquire_exclusive((struct lockdep_map *)&x->map, 0, 0, NULL, _RET_IP_);
+}
+
+static inline void complete_release(struct completion *x)
+{
+	lock_release((struct lockdep_map *)&x->map, 0, _RET_IP_);
+}
+
+static inline void complete_release_commit(struct completion *x)
+{
+	lock_commit_crosslock((struct lockdep_map *)&x->map);
+}
+
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)
+
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)
+#else
 #define init_completion_map(x, m) __init_completion(x)
 #define init_completion(x) __init_completion(x)
 static inline void complete_acquire(struct completion *x) {}
 static inline void complete_release(struct completion *x) {}
+static inline void complete_release_commit(struct completion *x) {}
+#endif
 
+#ifdef CONFIG_LOCKDEP_COMPLETIONS
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }
+#else
 #define COMPLETION_INITIALIZER(work) \
 	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
+#endif
 
 #define COMPLETION_INITIALIZER_ONSTACK_MAP(work, map) \
 	(*({ init_completion_map(&(work), &(map)); &(work); }))
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
index 21619c92c377..bd1bda7248bf 100644
--- a/include/linux/irqflags.h
+++ b/include/linux/irqflags.h
@@ -38,18 +38,22 @@
 # define trace_hardirq_enter()			\
 do {						\
 	current->hardirq_context++;		\
+	crossrelease_hist_start(XHLOCK_HARD);	\
 } while (0)
 # define trace_hardirq_exit()			\
 do {						\
 	current->hardirq_context--;		\
+	crossrelease_hist_end(XHLOCK_HARD);	\
 } while (0)
 # define lockdep_softirq_enter()		\
 do {						\
 	current->softirq_context++;		\
+	crossrelease_hist_start(XHLOCK_SOFT);	\
 } while (0)
 # define lockdep_softirq_exit()			\
 do {						\
 	current->softirq_context--;		\
+	crossrelease_hist_end(XHLOCK_SOFT);	\
 } while (0)
 #else
 # define trace_hardirqs_on()		do { } while (0)
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 1fd82ff99c65..bf98a8cc0d65 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -153,6 +153,12 @@ struct lockdep_map {
 	int				cpu;
 	unsigned long			ip;
 #endif
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+	/*
+	 * Whether it's a crosslock.
+	 */
+	int				cross;
+#endif
 };
 
 static inline void lockdep_copy_map(struct lockdep_map *to,
@@ -256,8 +262,95 @@ struct held_lock {
 	unsigned int hardirqs_off:1;
 	unsigned int references:12;					/* 32 bits */
 	unsigned int pin_count;
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+	/*
+	 * Generation id.
+	 *
+	 * A value of cross_gen_id will be stored when holding this,
+	 * which is globally increased whenever each crosslock is held.
+	 */
+	unsigned int gen_id;
+#endif
+};
+
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+#define MAX_XHLOCK_TRACE_ENTRIES 5
+
+/*
+ * This is for keeping locks waiting for commit so that true dependencies
+ * can be added at commit step.
+ */
+struct hist_lock {
+	/*
+	 * Id for each entry in the ring buffer. This is used to
+	 * decide whether the ring buffer was overwritten or not.
+	 *
+	 * For example,
+	 *
+	 *           |<----------- hist_lock ring buffer size ------->|
+	 *           pppppppppppppppppppppiiiiiiiiiiiiiiiiiiiiiiiiiiiii
+	 * wrapped > iiiiiiiiiiiiiiiiiiiiiiiiiii.......................
+	 *
+	 *           where 'p' represents an acquisition in process
+	 *           context, 'i' represents an acquisition in irq
+	 *           context.
+	 *
+	 * In this example, the ring buffer was overwritten by
+	 * acquisitions in irq context, that should be detected on
+	 * rollback or commit.
+	 */
+	unsigned int hist_id;
+
+	/*
+	 * Seperate stack_trace data. This will be used at commit step.
+	 */
+	struct stack_trace	trace;
+	unsigned long		trace_entries[MAX_XHLOCK_TRACE_ENTRIES];
+
+	/*
+	 * Seperate hlock instance. This will be used at commit step.
+	 *
+	 * TODO: Use a smaller data structure containing only necessary
+	 * data. However, we should make lockdep code able to handle the
+	 * smaller one first.
+	 */
+	struct held_lock	hlock;
 };
 
+/*
+ * To initialize a lock as crosslock, lockdep_init_map_crosslock() should
+ * be called instead of lockdep_init_map().
+ */
+struct cross_lock {
+	/*
+	 * When more than one acquisition of crosslocks are overlapped,
+	 * we have to perform commit for them based on cross_gen_id of
+	 * the first acquisition, which allows us to add more true
+	 * dependencies.
+	 *
+	 * Moreover, when no acquisition of a crosslock is in progress,
+	 * we should not perform commit because the lock might not exist
+	 * any more, which might cause incorrect memory access. So we
+	 * have to track the number of acquisitions of a crosslock.
+	 */
+	int nr_acquire;
+
+	/*
+	 * Seperate hlock instance. This will be used at commit step.
+	 *
+	 * TODO: Use a smaller data structure containing only necessary
+	 * data. However, we should make lockdep code able to handle the
+	 * smaller one first.
+	 */
+	struct held_lock	hlock;
+};
+
+struct lockdep_map_cross {
+	struct lockdep_map map;
+	struct cross_lock xlock;
+};
+#endif
+
 /*
  * Initialization, self-test and debugging-output methods:
  */
@@ -459,6 +552,37 @@ enum xhlock_context_t {
 	XHLOCK_CTX_NR,
 };
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,
+				       const char *name,
+				       struct lock_class_key *key,
+				       int subclass);
+extern void lock_commit_crosslock(struct lockdep_map *lock);
+
+/*
+ * What we essencially have to initialize is 'nr_acquire'. Other members
+ * will be initialized in add_xlock().
+ */
+#define STATIC_CROSS_LOCK_INIT() \
+	{ .nr_acquire = 0,}
+
+#define STATIC_CROSS_LOCKDEP_MAP_INIT(_name, _key) \
+	{ .map.name = (_name), .map.key = (void *)(_key), \
+	  .map.cross = 1, .xlock = STATIC_CROSS_LOCK_INIT(), }
+
+/*
+ * To initialize a lockdep_map statically use this macro.
+ * Note that _name must not be NULL.
+ */
+#define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
+	{ .name = (_name), .key = (void *)(_key), .cross = 0, }
+
+extern void crossrelease_hist_start(enum xhlock_context_t c);
+extern void crossrelease_hist_end(enum xhlock_context_t c);
+extern void lockdep_invariant_state(bool force);
+extern void lockdep_init_task(struct task_struct *task);
+extern void lockdep_free_task(struct task_struct *task);
+#else /* !CROSSRELEASE */
 #define lockdep_init_map_crosslock(m, n, k, s) do {} while (0)
 /*
  * To initialize a lockdep_map statically use this macro.
@@ -467,9 +591,12 @@ enum xhlock_context_t {
 #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \
 	{ .name = (_name), .key = (void *)(_key), }
 
+static inline void crossrelease_hist_start(enum xhlock_context_t c) {}
+static inline void crossrelease_hist_end(enum xhlock_context_t c) {}
 static inline void lockdep_invariant_state(bool force) {}
 static inline void lockdep_init_task(struct task_struct *task) {}
 static inline void lockdep_free_task(struct task_struct *task) {}
+#endif /* CROSSRELEASE */
 
 #ifdef CONFIG_LOCK_STAT
 
diff --git a/include/linux/sched.h b/include/linux/sched.h
index a51c13c2b1a0..43e9eade0a67 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -940,6 +940,17 @@ struct task_struct {
 	struct held_lock		held_locks[MAX_LOCK_DEPTH];
 #endif
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+#define MAX_XHLOCKS_NR 64UL
+	struct hist_lock *xhlocks; /* Crossrelease history locks */
+	unsigned int xhlock_idx;
+	/* For restoring at history boundaries */
+	unsigned int xhlock_idx_hist[XHLOCK_CTX_NR];
+	unsigned int hist_id;
+	/* For overwrite check at each context exit */
+	unsigned int hist_id_save[XHLOCK_CTX_NR];
+#endif
+
 #ifdef CONFIG_UBSAN
 	unsigned int			in_ubsan;
 #endif
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 1efada2dd9dd..e74add63f317 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -58,6 +58,10 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/lock.h>
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+#include <linux/slab.h>
+#endif
+
 #ifdef CONFIG_PROVE_LOCKING
 int prove_locking = 1;
 module_param(prove_locking, int, 0644);
@@ -72,6 +76,19 @@ module_param(lock_stat, int, 0644);
 #define lock_stat 0
 #endif
 
+#ifdef CONFIG_BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
+static int crossrelease_fullstack = 1;
+#else
+static int crossrelease_fullstack;
+#endif
+static int __init allow_crossrelease_fullstack(char *str)
+{
+	crossrelease_fullstack = 1;
+	return 0;
+}
+
+early_param("crossrelease_fullstack", allow_crossrelease_fullstack);
+
 /*
  * lockdep_lock: protects the lockdep graph, the hashes and the
  *               class/list/hash allocators.
@@ -731,6 +748,18 @@ static bool assign_lock_key(struct lockdep_map *lock)
 	return true;
 }
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+static void cross_init(struct lockdep_map *lock, int cross);
+static int cross_lock(struct lockdep_map *lock);
+static int lock_acquire_crosslock(struct held_lock *hlock);
+static int lock_release_crosslock(struct lockdep_map *lock);
+#else
+static inline void cross_init(struct lockdep_map *lock, int cross) {}
+static inline int cross_lock(struct lockdep_map *lock) { return 0; }
+static inline int lock_acquire_crosslock(struct held_lock *hlock) { return 2; }
+static inline int lock_release_crosslock(struct lockdep_map *lock) { return 2; }
+#endif
+
 /*
  * Register a lock's class in the hash-table, if the class is not present
  * yet. Otherwise we look it up. We cache the result in the lock object
@@ -1125,22 +1154,41 @@ print_circular_lock_scenario(struct held_lock *src,
 		printk(KERN_CONT "\n\n");
 	}
 
-	printk(" Possible unsafe locking scenario:\n\n");
-	printk("       CPU0                    CPU1\n");
-	printk("       ----                    ----\n");
-	printk("  lock(");
-	__print_lock_name(target);
-	printk(KERN_CONT ");\n");
-	printk("                               lock(");
-	__print_lock_name(parent);
-	printk(KERN_CONT ");\n");
-	printk("                               lock(");
-	__print_lock_name(target);
-	printk(KERN_CONT ");\n");
-	printk("  lock(");
-	__print_lock_name(source);
-	printk(KERN_CONT ");\n");
-	printk("\n *** DEADLOCK ***\n\n");
+	if (cross_lock(tgt->instance)) {
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");
+		printk("       CPU0                    CPU1\n");
+		printk("       ----                    ----\n");
+		printk("  lock(");
+		__print_lock_name(parent);
+		printk(KERN_CONT ");\n");
+		printk("  lock(");
+		__print_lock_name(target);
+		printk(KERN_CONT ");\n");
+		printk("                               lock(");
+		__print_lock_name(source);
+		printk(KERN_CONT ");\n");
+		printk("                               unlock(");
+		__print_lock_name(target);
+		printk(KERN_CONT ");\n");
+		printk("\n *** DEADLOCK ***\n\n");
+	} else {
+		printk(" Possible unsafe locking scenario:\n\n");
+		printk("       CPU0                    CPU1\n");
+		printk("       ----                    ----\n");
+		printk("  lock(");
+		__print_lock_name(target);
+		printk(KERN_CONT ");\n");
+		printk("                               lock(");
+		__print_lock_name(parent);
+		printk(KERN_CONT ");\n");
+		printk("                               lock(");
+		__print_lock_name(target);
+		printk(KERN_CONT ");\n");
+		printk("  lock(");
+		__print_lock_name(source);
+		printk(KERN_CONT ");\n");
+		printk("\n *** DEADLOCK ***\n\n");
+	}
 }
 
 /*
@@ -1166,7 +1214,10 @@ print_circular_bug_header(struct lock_list *entry, unsigned int depth,
 		curr->comm, task_pid_nr(curr));
 	print_lock(check_src);
 
-	pr_warn("\nbut task is already holding lock:\n");
+	if (cross_lock(check_tgt->instance))
+		pr_warn("\nbut now in release context of a crosslock acquired at the following:\n");
+	else
+		pr_warn("\nbut task is already holding lock:\n");
 
 	print_lock(check_tgt);
 	pr_warn("\nwhich lock already depends on the new lock.\n\n");
@@ -1196,7 +1247,9 @@ static noinline int print_circular_bug(struct lock_list *this,
 	if (!debug_locks_off_graph_unlock() || debug_locks_silent)
 		return 0;
 
-	if (!save_trace(&this->trace))
+	if (cross_lock(check_tgt->instance))
+		this->trace = *trace;
+	else if (!save_trace(&this->trace))
 		return 0;
 
 	depth = get_lock_depth(target);
@@ -1802,6 +1855,9 @@ check_deadlock(struct task_struct *curr, struct held_lock *next,
 		if (nest)
 			return 2;
 
+		if (cross_lock(prev->instance))
+			continue;
+
 		return print_deadlock_bug(curr, prev, next);
 	}
 	return 1;
@@ -1967,26 +2023,31 @@ check_prevs_add(struct task_struct *curr, struct held_lock *next)
 	for (;;) {
 		int distance = curr->lockdep_depth - depth + 1;
 		hlock = curr->held_locks + depth - 1;
-
 		/*
-		 * Only non-recursive-read entries get new dependencies
-		 * added:
+		 * Only non-crosslock entries get new dependencies added.
+		 * Crosslock entries will be added by commit later:
 		 */
-		if (hlock->read != 2 && hlock->check) {
-			int ret = check_prev_add(curr, hlock, next, distance, &trace, save_trace);
-			if (!ret)
-				return 0;
-
+		if (!cross_lock(hlock->instance)) {
 			/*
-			 * Stop after the first non-trylock entry,
-			 * as non-trylock entries have added their
-			 * own direct dependencies already, so this
-			 * lock is connected to them indirectly:
+			 * Only non-recursive-read entries get new dependencies
+			 * added:
 			 */
-			if (!hlock->trylock)
-				break;
-		}
+			if (hlock->read != 2 && hlock->check) {
+				int ret = check_prev_add(curr, hlock, next,
+							 distance, &trace, save_trace);
+				if (!ret)
+					return 0;
 
+				/*
+				 * Stop after the first non-trylock entry,
+				 * as non-trylock entries have added their
+				 * own direct dependencies already, so this
+				 * lock is connected to them indirectly:
+				 */
+				if (!hlock->trylock)
+					break;
+			}
+		}
 		depth--;
 		/*
 		 * End of lock-stack?
@@ -2149,6 +2210,76 @@ static int check_no_collision(struct task_struct *curr,
 	return 1;
 }
 
+/*
+ * This is for building a chain between just two different classes,
+ * instead of adding a new hlock upon current, which is done by
+ * add_chain_cache().
+ *
+ * This can be called in any context with two classes, while
+ * add_chain_cache() must be done within the lock owener's context
+ * since it uses hlock which might be racy in another context.
+ */
+static inline int add_chain_cache_classes(unsigned int prev,
+					  unsigned int next,
+					  unsigned int irq_context,
+					  u64 chain_key)
+{
+	struct hlist_head *hash_head = chainhashentry(chain_key);
+	struct lock_chain *chain;
+
+	/*
+	 * Allocate a new chain entry from the static array, and add
+	 * it to the hash:
+	 */
+
+	/*
+	 * We might need to take the graph lock, ensure we've got IRQs
+	 * disabled to make this an IRQ-safe lock.. for recursion reasons
+	 * lockdep won't complain about its own locking errors.
+	 */
+	if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
+		return 0;
+
+	if (unlikely(nr_lock_chains >= MAX_LOCKDEP_CHAINS)) {
+		if (!debug_locks_off_graph_unlock())
+			return 0;
+
+		print_lockdep_off("BUG: MAX_LOCKDEP_CHAINS too low!");
+		dump_stack();
+		return 0;
+	}
+
+	chain = lock_chains + nr_lock_chains++;
+	chain->chain_key = chain_key;
+	chain->irq_context = irq_context;
+	chain->depth = 2;
+	if (likely(nr_chain_hlocks + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) {
+		chain->base = nr_chain_hlocks;
+		nr_chain_hlocks += chain->depth;
+		chain_hlocks[chain->base] = prev - 1;
+		chain_hlocks[chain->base + 1] = next -1;
+	}
+#ifdef CONFIG_DEBUG_LOCKDEP
+	/*
+	 * Important for check_no_collision().
+	 */
+	else {
+		if (!debug_locks_off_graph_unlock())
+			return 0;
+
+		print_lockdep_off("BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!");
+		dump_stack();
+		return 0;
+	}
+#endif
+
+	hlist_add_head_rcu(&chain->entry, hash_head);
+	debug_atomic_inc(chain_lookup_misses);
+	inc_chains();
+
+	return 1;
+}
+
 /*
  * Adds a dependency chain into chain hashtable. And must be called with
  * graph_lock held.
@@ -3148,10 +3279,21 @@ static void __lockdep_init_map(struct lockdep_map *lock, const char *name,
 void lockdep_init_map(struct lockdep_map *lock, const char *name,
 		      struct lock_class_key *key, int subclass)
 {
+	cross_init(lock, 0);
 	__lockdep_init_map(lock, name, key, subclass);
 }
 EXPORT_SYMBOL_GPL(lockdep_init_map);
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)
+{
+	cross_init(lock, 1);
+	__lockdep_init_map(lock, name, key, subclass);
+}
+EXPORT_SYMBOL_GPL(lockdep_init_map_crosslock);
+#endif
+
 struct lock_class_key __lockdep_no_validate__;
 EXPORT_SYMBOL_GPL(__lockdep_no_validate__);
 
@@ -3211,6 +3353,7 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 	int chain_head = 0;
 	int class_idx;
 	u64 chain_key;
+	int ret;
 
 	if (unlikely(!debug_locks))
 		return 0;
@@ -3253,7 +3396,8 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 
 	class_idx = class - lock_classes + 1;
 
-	if (depth) {
+	/* TODO: nest_lock is not implemented for crosslock yet. */
+	if (depth && !cross_lock(lock)) {
 		hlock = curr->held_locks + depth - 1;
 		if (hlock->class_idx == class_idx && nest_lock) {
 			if (hlock->references) {
@@ -3341,6 +3485,14 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass,
 	if (!validate_chain(curr, lock, hlock, chain_head, chain_key))
 		return 0;
 
+	ret = lock_acquire_crosslock(hlock);
+	/*
+	 * 2 means normal acquire operations are needed. Otherwise, it's
+	 * ok just to return with '0:fail, 1:success'.
+	 */
+	if (ret != 2)
+		return ret;
+
 	curr->curr_chain_key = chain_key;
 	curr->lockdep_depth++;
 	check_chain_key(curr);
@@ -3582,11 +3734,19 @@ __lock_release(struct lockdep_map *lock, int nested, unsigned long ip)
 	struct task_struct *curr = current;
 	struct held_lock *hlock;
 	unsigned int depth;
-	int i;
+	int ret, i;
 
 	if (unlikely(!debug_locks))
 		return 0;
 
+	ret = lock_release_crosslock(lock);
+	/*
+	 * 2 means normal release operations are needed. Otherwise, it's
+	 * ok just to return with '0:fail, 1:success'.
+	 */
+	if (ret != 2)
+		return ret;
+
 	depth = curr->lockdep_depth;
 	/*
 	 * So we're all set to release this lock.. wait what lock? We don't
@@ -4480,3 +4640,495 @@ void lockdep_rcu_suspicious(const char *file, const int line, const char *s)
 	dump_stack();
 }
 EXPORT_SYMBOL_GPL(lockdep_rcu_suspicious);
+
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+
+/*
+ * Crossrelease works by recording a lock history for each thread and
+ * connecting those historic locks that were taken after the
+ * wait_for_completion() in the complete() context.
+ *
+ * Task-A				Task-B
+ *
+ *					mutex_lock(&A);
+ *					mutex_unlock(&A);
+ *
+ * wait_for_completion(&C);
+ *   lock_acquire_crosslock();
+ *     atomic_inc_return(&cross_gen_id);
+ *                                |
+ *				  |	mutex_lock(&B);
+ *				  |	mutex_unlock(&B);
+ *                                |
+ *				  |	complete(&C);
+ *				  `--	  lock_commit_crosslock();
+ *
+ * Which will then add a dependency between B and C.
+ */
+
+#define xhlock(i)         (current->xhlocks[(i) % MAX_XHLOCKS_NR])
+
+/*
+ * Whenever a crosslock is held, cross_gen_id will be increased.
+ */
+static atomic_t cross_gen_id; /* Can be wrapped */
+
+/*
+ * Make an entry of the ring buffer invalid.
+ */
+static inline void invalidate_xhlock(struct hist_lock *xhlock)
+{
+	/*
+	 * Normally, xhlock->hlock.instance must be !NULL.
+	 */
+	xhlock->hlock.instance = NULL;
+}
+
+/*
+ * Lock history stacks; we have 2 nested lock history stacks:
+ *
+ *   HARD(IRQ)
+ *   SOFT(IRQ)
+ *
+ * The thing is that once we complete a HARD/SOFT IRQ the future task locks
+ * should not depend on any of the locks observed while running the IRQ.  So
+ * what we do is rewind the history buffer and erase all our knowledge of that
+ * temporal event.
+ */
+
+void crossrelease_hist_start(enum xhlock_context_t c)
+{
+	struct task_struct *cur = current;
+
+	if (!cur->xhlocks)
+		return;
+
+	cur->xhlock_idx_hist[c] = cur->xhlock_idx;
+	cur->hist_id_save[c]    = cur->hist_id;
+}
+
+void crossrelease_hist_end(enum xhlock_context_t c)
+{
+	struct task_struct *cur = current;
+
+	if (cur->xhlocks) {
+		unsigned int idx = cur->xhlock_idx_hist[c];
+		struct hist_lock *h = &xhlock(idx);
+
+		cur->xhlock_idx = idx;
+
+		/* Check if the ring was overwritten. */
+		if (h->hist_id != cur->hist_id_save[c])
+			invalidate_xhlock(h);
+	}
+}
+
+/*
+ * lockdep_invariant_state() is used to annotate independence inside a task, to
+ * make one task look like multiple independent 'tasks'.
+ *
+ * Take for instance workqueues; each work is independent of the last. The
+ * completion of a future work does not depend on the completion of a past work
+ * (in general). Therefore we must not carry that (lock) dependency across
+ * works.
+ *
+ * This is true for many things; pretty much all kthreads fall into this
+ * pattern, where they have an invariant state and future completions do not
+ * depend on past completions. Its just that since they all have the 'same'
+ * form -- the kthread does the same over and over -- it doesn't typically
+ * matter.
+ *
+ * The same is true for system-calls, once a system call is completed (we've
+ * returned to userspace) the next system call does not depend on the lock
+ * history of the previous system call.
+ *
+ * They key property for independence, this invariant state, is that it must be
+ * a point where we hold no locks and have no history. Because if we were to
+ * hold locks, the restore at _end() would not necessarily recover it's history
+ * entry. Similarly, independence per-definition means it does not depend on
+ * prior state.
+ */
+void lockdep_invariant_state(bool force)
+{
+	/*
+	 * We call this at an invariant point, no current state, no history.
+	 * Verify the former, enforce the latter.
+	 */
+	WARN_ON_ONCE(!force && current->lockdep_depth);
+	if (current->xhlocks)
+		invalidate_xhlock(&xhlock(current->xhlock_idx));
+}
+
+static int cross_lock(struct lockdep_map *lock)
+{
+	return lock ? lock->cross : 0;
+}
+
+/*
+ * This is needed to decide the relationship between wrapable variables.
+ */
+static inline int before(unsigned int a, unsigned int b)
+{
+	return (int)(a - b) < 0;
+}
+
+static inline struct lock_class *xhlock_class(struct hist_lock *xhlock)
+{
+	return hlock_class(&xhlock->hlock);
+}
+
+static inline struct lock_class *xlock_class(struct cross_lock *xlock)
+{
+	return hlock_class(&xlock->hlock);
+}
+
+/*
+ * Should we check a dependency with previous one?
+ */
+static inline int depend_before(struct held_lock *hlock)
+{
+	return hlock->read != 2 && hlock->check && !hlock->trylock;
+}
+
+/*
+ * Should we check a dependency with next one?
+ */
+static inline int depend_after(struct held_lock *hlock)
+{
+	return hlock->read != 2 && hlock->check;
+}
+
+/*
+ * Check if the xhlock is valid, which would be false if,
+ *
+ *    1. Has not used after initializaion yet.
+ *    2. Got invalidated.
+ *
+ * Remind hist_lock is implemented as a ring buffer.
+ */
+static inline int xhlock_valid(struct hist_lock *xhlock)
+{
+	/*
+	 * xhlock->hlock.instance must be !NULL.
+	 */
+	return !!xhlock->hlock.instance;
+}
+
+/*
+ * Record a hist_lock entry.
+ *
+ * Irq disable is only required.
+ */
+static void add_xhlock(struct held_lock *hlock)
+{
+	unsigned int idx = ++current->xhlock_idx;
+	struct hist_lock *xhlock = &xhlock(idx);
+
+#ifdef CONFIG_DEBUG_LOCKDEP
+	/*
+	 * This can be done locklessly because they are all task-local
+	 * state, we must however ensure IRQs are disabled.
+	 */
+	WARN_ON_ONCE(!irqs_disabled());
+#endif
+
+	/* Initialize hist_lock's members */
+	xhlock->hlock = *hlock;
+	xhlock->hist_id = ++current->hist_id;
+
+	xhlock->trace.nr_entries = 0;
+	xhlock->trace.max_entries = MAX_XHLOCK_TRACE_ENTRIES;
+	xhlock->trace.entries = xhlock->trace_entries;
+
+	if (crossrelease_fullstack) {
+		xhlock->trace.skip = 3;
+		save_stack_trace(&xhlock->trace);
+	} else {
+		xhlock->trace.nr_entries = 1;
+		xhlock->trace.entries[0] = hlock->acquire_ip;
+	}
+}
+
+static inline int same_context_xhlock(struct hist_lock *xhlock)
+{
+	return xhlock->hlock.irq_context == task_irq_context(current);
+}
+
+/*
+ * This should be lockless as far as possible because this would be
+ * called very frequently.
+ */
+static void check_add_xhlock(struct held_lock *hlock)
+{
+	/*
+	 * Record a hist_lock, only in case that acquisitions ahead
+	 * could depend on the held_lock. For example, if the held_lock
+	 * is trylock then acquisitions ahead never depends on that.
+	 * In that case, we don't need to record it. Just return.
+	 */
+	if (!current->xhlocks || !depend_before(hlock))
+		return;
+
+	add_xhlock(hlock);
+}
+
+/*
+ * For crosslock.
+ */
+static int add_xlock(struct held_lock *hlock)
+{
+	struct cross_lock *xlock;
+	unsigned int gen_id;
+
+	if (!graph_lock())
+		return 0;
+
+	xlock = &((struct lockdep_map_cross *)hlock->instance)->xlock;
+
+	/*
+	 * When acquisitions for a crosslock are overlapped, we use
+	 * nr_acquire to perform commit for them, based on cross_gen_id
+	 * of the first acquisition, which allows to add additional
+	 * dependencies.
+	 *
+	 * Moreover, when no acquisition of a crosslock is in progress,
+	 * we should not perform commit because the lock might not exist
+	 * any more, which might cause incorrect memory access. So we
+	 * have to track the number of acquisitions of a crosslock.
+	 *
+	 * depend_after() is necessary to initialize only the first
+	 * valid xlock so that the xlock can be used on its commit.
+	 */
+	if (xlock->nr_acquire++ && depend_after(&xlock->hlock))
+		goto unlock;
+
+	gen_id = (unsigned int)atomic_inc_return(&cross_gen_id);
+	xlock->hlock = *hlock;
+	xlock->hlock.gen_id = gen_id;
+unlock:
+	graph_unlock();
+	return 1;
+}
+
+/*
+ * Called for both normal and crosslock acquires. Normal locks will be
+ * pushed on the hist_lock queue. Cross locks will record state and
+ * stop regular lock_acquire() to avoid being placed on the held_lock
+ * stack.
+ *
+ * Return: 0 - failure;
+ *         1 - crosslock, done;
+ *         2 - normal lock, continue to held_lock[] ops.
+ */
+static int lock_acquire_crosslock(struct held_lock *hlock)
+{
+	/*
+	 *	CONTEXT 1		CONTEXT 2
+	 *	---------		---------
+	 *	lock A (cross)
+	 *	X = atomic_inc_return(&cross_gen_id)
+	 *	~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	 *				Y = atomic_read_acquire(&cross_gen_id)
+	 *				lock B
+	 *
+	 * atomic_read_acquire() is for ordering between A and B,
+	 * IOW, A happens before B, when CONTEXT 2 see Y >= X.
+	 *
+	 * Pairs with atomic_inc_return() in add_xlock().
+	 */
+	hlock->gen_id = (unsigned int)atomic_read_acquire(&cross_gen_id);
+
+	if (cross_lock(hlock->instance))
+		return add_xlock(hlock);
+
+	check_add_xhlock(hlock);
+	return 2;
+}
+
+static int copy_trace(struct stack_trace *trace)
+{
+	unsigned long *buf = stack_trace + nr_stack_trace_entries;
+	unsigned int max_nr = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries;
+	unsigned int nr = min(max_nr, trace->nr_entries);
+
+	trace->nr_entries = nr;
+	memcpy(buf, trace->entries, nr * sizeof(trace->entries[0]));
+	trace->entries = buf;
+	nr_stack_trace_entries += nr;
+
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
+		if (!debug_locks_off_graph_unlock())
+			return 0;
+
+		print_lockdep_off("BUG: MAX_STACK_TRACE_ENTRIES too low!");
+		dump_stack();
+
+		return 0;
+	}
+
+	return 1;
+}
+
+static int commit_xhlock(struct cross_lock *xlock, struct hist_lock *xhlock)
+{
+	unsigned int xid, pid;
+	u64 chain_key;
+
+	xid = xlock_class(xlock) - lock_classes;
+	chain_key = iterate_chain_key((u64)0, xid);
+	pid = xhlock_class(xhlock) - lock_classes;
+	chain_key = iterate_chain_key(chain_key, pid);
+
+	if (lookup_chain_cache(chain_key))
+		return 1;
+
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))
+		return 0;
+
+	if (!check_prev_add(current, &xlock->hlock, &xhlock->hlock, 1,
+			    &xhlock->trace, copy_trace))
+		return 0;
+
+	return 1;
+}
+
+static void commit_xhlocks(struct cross_lock *xlock)
+{
+	unsigned int cur = current->xhlock_idx;
+	unsigned int prev_hist_id = xhlock(cur).hist_id;
+	unsigned int i;
+
+	if (!graph_lock())
+		return;
+
+	if (xlock->nr_acquire) {
+		for (i = 0; i < MAX_XHLOCKS_NR; i++) {
+			struct hist_lock *xhlock = &xhlock(cur - i);
+
+			if (!xhlock_valid(xhlock))
+				break;
+
+			if (before(xhlock->hlock.gen_id, xlock->hlock.gen_id))
+				break;
+
+			if (!same_context_xhlock(xhlock))
+				break;
+
+			/*
+			 * Filter out the cases where the ring buffer was
+			 * overwritten and the current entry has a bigger
+			 * hist_id than the previous one, which is impossible
+			 * otherwise:
+			 */
+			if (unlikely(before(prev_hist_id, xhlock->hist_id)))
+				break;
+
+			prev_hist_id = xhlock->hist_id;
+
+			/*
+			 * commit_xhlock() returns 0 with graph_lock already
+			 * released if fail.
+			 */
+			if (!commit_xhlock(xlock, xhlock))
+				return;
+		}
+	}
+
+	graph_unlock();
+}
+
+void lock_commit_crosslock(struct lockdep_map *lock)
+{
+	struct cross_lock *xlock;
+	unsigned long flags;
+
+	if (unlikely(!debug_locks || current->lockdep_recursion))
+		return;
+
+	if (!current->xhlocks)
+		return;
+
+	/*
+	 * Do commit hist_locks with the cross_lock, only in case that
+	 * the cross_lock could depend on acquisitions after that.
+	 *
+	 * For example, if the cross_lock does not have the 'check' flag
+	 * then we don't need to check dependencies and commit for that.
+	 * Just skip it. In that case, of course, the cross_lock does
+	 * not depend on acquisitions ahead, either.
+	 *
+	 * WARNING: Don't do that in add_xlock() in advance. When an
+	 * acquisition context is different from the commit context,
+	 * invalid(skipped) cross_lock might be accessed.
+	 */
+	if (!depend_after(&((struct lockdep_map_cross *)lock)->xlock.hlock))
+		return;
+
+	raw_local_irq_save(flags);
+	check_flags(flags);
+	current->lockdep_recursion = 1;
+	xlock = &((struct lockdep_map_cross *)lock)->xlock;
+	commit_xhlocks(xlock);
+	current->lockdep_recursion = 0;
+	raw_local_irq_restore(flags);
+}
+EXPORT_SYMBOL_GPL(lock_commit_crosslock);
+
+/*
+ * Return: 0 - failure;
+ *         1 - crosslock, done;
+ *         2 - normal lock, continue to held_lock[] ops.
+ */
+static int lock_release_crosslock(struct lockdep_map *lock)
+{
+	if (cross_lock(lock)) {
+		if (!graph_lock())
+			return 0;
+		((struct lockdep_map_cross *)lock)->xlock.nr_acquire--;
+		graph_unlock();
+		return 1;
+	}
+	return 2;
+}
+
+static void cross_init(struct lockdep_map *lock, int cross)
+{
+	if (cross)
+		((struct lockdep_map_cross *)lock)->xlock.nr_acquire = 0;
+
+	lock->cross = cross;
+
+	/*
+	 * Crossrelease assumes that the ring buffer size of xhlocks
+	 * is aligned with power of 2. So force it on build.
+	 */
+	BUILD_BUG_ON(MAX_XHLOCKS_NR & (MAX_XHLOCKS_NR - 1));
+}
+
+void lockdep_init_task(struct task_struct *task)
+{
+	int i;
+
+	task->xhlock_idx = UINT_MAX;
+	task->hist_id = 0;
+
+	for (i = 0; i < XHLOCK_CTX_NR; i++) {
+		task->xhlock_idx_hist[i] = UINT_MAX;
+		task->hist_id_save[i] = 0;
+	}
+
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,
+				GFP_KERNEL);
+}
+
+void lockdep_free_task(struct task_struct *task)
+{
+	if (task->xhlocks) {
+		void *tmp = task->xhlocks;
+		/* Diable crossrelease for current */
+		task->xhlocks = NULL;
+		kfree(tmp);
+	}
+}
+#endif
diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c
index a1ad5b7d5521..0f7c442f9dd7 100644
--- a/kernel/sched/completion.c
+++ b/kernel/sched/completion.c
@@ -31,6 +31,11 @@ void complete(struct completion *x)
 
 	spin_lock_irqsave(&x->wait.lock, flags);
 
+	/*
+	 * Perform commit of crossrelease here.
+	 */
+	complete_release_commit(x);
+
 	if (x->done != UINT_MAX)
 		x->done++;
 	__wake_up_locked(&x->wait, TASK_NORMAL, 1);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 4044cd0e3b02..f3d7bff6fa3c 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1055,6 +1055,8 @@ config PROVE_LOCKING
 	select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER
 	select DEBUG_WW_MUTEX_SLOWPATH
 	select DEBUG_LOCK_ALLOC
+	select LOCKDEP_CROSSRELEASE
+	select LOCKDEP_COMPLETIONS
 	select TRACE_IRQFLAGS
 	default n
 	help
@@ -1187,6 +1189,37 @@ config LOCKDEP
 config LOCKDEP_SMALL
 	bool
 
+config LOCKDEP_CROSSRELEASE
+	bool
+	help
+	 This makes lockdep work for crosslock which is a lock allowed to
+	 be released in a different context from the acquisition context.
+	 Normally a lock must be released in the context acquiring the lock.
+	 However, relexing this constraint helps synchronization primitives
+	 such as page locks or completions can use the lock correctness
+	 detector, lockdep.
+
+config LOCKDEP_COMPLETIONS
+	bool
+	help
+	 A deadlock caused by wait_for_completion() and complete() can be
+	 detected by lockdep using crossrelease feature.
+
+config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
+	bool "Enable the boot parameter, crossrelease_fullstack"
+	depends on LOCKDEP_CROSSRELEASE
+	default n
+	help
+	 The lockdep "cross-release" feature needs to record stack traces
+	 (of calling functions) for all acquisitions, for eventual later
+	 use during analysis. By default only a single caller is recorded,
+	 because the unwind operation can be very expensive with deeper
+	 stack chains.
+
+	 However a boot parameter, crossrelease_fullstack, was
+	 introduced since sometimes deeper traces are required for full
+	 analysis. This option turns on the boot parameter.
+
 config DEBUG_LOCKDEP
 	bool "Lock dependency engine debugging"
 	depends on DEBUG_KERNEL && LOCKDEP
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 02/13] kthread: finer-grained lockdep/cross-release completion
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 03/13] lockdep: Remove GFP_NOLOCKDEP annotation Daniel Vetter
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

When cross release was originally merged we've hit a bunch of lockdep
splats around the 2 kthread completions. In all cases they are because
totally independent uses of kthread are mixed up by lockdep into the
same locking class, creating artificial deadlocks.

Fix this by converting kthread code in the same way as e.g.
alloc_workqueue already works: Use macros for the public api so we can
have a callsite specific lockdep key, then pass that through the
entire callchain. Due to the many entry points this is slightly
tedious.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Marta Lofstedt <marta.lofstedt@intel.com>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Shaohua Li <shli@fb.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Cc: Snild Dolkow <snild@sony.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=103950
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
--
Peter acked the original patch but then cross-release got removed
before this one here landed.
-Daniel
---
 include/linux/kthread.h | 48 ++++++++++++++++++++++++-----
 kernel/kthread.c        | 68 ++++++++++++++++++++++++++++-------------
 2 files changed, 88 insertions(+), 28 deletions(-)

diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index c1961761311d..7a9463f0be5c 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -6,10 +6,12 @@
 #include <linux/sched.h>
 #include <linux/cgroup.h>
 
-__printf(4, 5)
-struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
+__printf(6, 7)
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,
 					   int node,
+					   struct lock_class_key *exited_key,
+					   struct lock_class_key *parked_key,
 					   const char namefmt[], ...);
 
 /**
@@ -25,12 +27,27 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
  */
 #define kthread_create(threadfn, data, namefmt, arg...) \
 	kthread_create_on_node(threadfn, data, NUMA_NO_NODE, namefmt, ##arg)
+#define kthread_create_on_node(threadfn, data, node, namefmt, arg...)	\
+({									\
+	static struct lock_class_key __exited_key, __parked_key;	\
+	_kthread_create_on_node(threadfn, data, node, &__exited_key,	\
+			       &__parked_key, namefmt, ##arg);		\
+})
 
 
-struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,
 					  unsigned int cpu,
+					  struct lock_class_key *exited_key,
+					  struct lock_class_key *parked_key,
 					  const char *namefmt);
+#define kthread_create_on_cpu(threadfn, data, cpu, namefmt)		\
+({									\
+	static struct lock_class_key __exited_key, __parked_key;	\
+	_kthread_create_on_cpu(threadfn, data, cpu, &__exited_key,\
+			       &__parked_key, namefmt);			\
+})
+
 
 /**
  * kthread_run - create and wake a thread.
@@ -171,13 +188,30 @@ extern void __kthread_init_worker(struct kthread_worker *worker,
 
 int kthread_worker_fn(void *worker_ptr);
 
-__printf(2, 3)
+__printf(4, 5)
 struct kthread_worker *
-kthread_create_worker(unsigned int flags, const char namefmt[], ...);
+_kthread_create_worker(unsigned int flags,
+		       struct lock_class_key *exited_key,
+		       struct lock_class_key *parked_key,
+		       const char namefmt[], ...);
+#define kthread_create_worker(flags, namefmt...)				\
+({									\
+	static struct lock_class_key __exited_key, __parked_key;	\
+	_kthread_create_worker(flags, &__exited_key, &__parked_key,	\
+			       ##namefmt);				\
+})
 
-__printf(3, 4) struct kthread_worker *
-kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+__printf(5, 6) struct kthread_worker *
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,
+		       struct lock_class_key *parked_key,
 			     const char namefmt[], ...);
+#define kthread_create_worker_on_cpu(cpu, flags, namefmt...)	\
+({									\
+	static struct lock_class_key __exited_key, __parked_key;	\
+	_kthread_create_worker_on_cpu(cpu, flags, &__exited_key, &__parked_key,\
+			       ##namefmt);				\
+})
 
 bool kthread_queue_work(struct kthread_worker *worker,
 			struct kthread_work *work);
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 087d18d771b5..64c0464a17dd 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -32,6 +32,7 @@ struct kthread_create_info
 	int (*threadfn)(void *data);
 	void *data;
 	int node;
+	struct lock_class_key *exited_key, *parked_key;
 
 	/* Result passed back to kthread_create() from kthreadd. */
 	struct task_struct *result;
@@ -229,8 +230,15 @@ static int kthread(void *_create)
 	}
 
 	self->data = data;
-	init_completion(&self->exited);
-	init_completion(&self->parked);
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",
+			create->exited_key, 0);
+	init_completion_map(&self->exited, &self->exited.map.map);
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",
+			create->parked_key, 0);
+	init_completion_map(&self->parked, &self->exited.map.map);
+
 	current->vfork_done = &self->exited;
 
 	/* OK, tell user we're spawned, wait for stop or wakeup */
@@ -280,9 +288,11 @@ static void create_kthread(struct kthread_create_info *create)
 	}
 }
 
-static __printf(4, 0)
+static __printf(6, 0)
 struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data),
 						    void *data, int node,
+						    struct lock_class_key *exited_key,
+						    struct lock_class_key *parked_key,
 						    const char namefmt[],
 						    va_list args)
 {
@@ -297,6 +307,8 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data),
 	create->data = data;
 	create->node = node;
 	create->done = &done;
+	create->exited_key = exited_key;
+	create->parked_key = parked_key;
 
 	spin_lock(&kthread_create_lock);
 	list_add_tail(&create->list, &kthread_create_list);
@@ -367,21 +379,24 @@ struct task_struct *__kthread_create_on_node(int (*threadfn)(void *data),
  *
  * Returns a task_struct or ERR_PTR(-ENOMEM) or ERR_PTR(-EINTR).
  */
-struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
-					   void *data, int node,
-					   const char namefmt[],
-					   ...)
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
+					    void *data, int node,
+					    struct lock_class_key *exited_key,
+					    struct lock_class_key *parked_key,
+					    const char namefmt[],
+					    ...)
 {
 	struct task_struct *task;
 	va_list args;
 
 	va_start(args, namefmt);
-	task = __kthread_create_on_node(threadfn, data, node, namefmt, args);
+	task = __kthread_create_on_node(threadfn, data, node,
+					exited_key, parked_key, namefmt, args);
 	va_end(args);
 
 	return task;
 }
-EXPORT_SYMBOL(kthread_create_on_node);
+EXPORT_SYMBOL(_kthread_create_on_node);
 
 static void __kthread_bind_mask(struct task_struct *p, const struct cpumask *mask, long state)
 {
@@ -435,14 +450,16 @@ EXPORT_SYMBOL(kthread_bind);
  * Description: This helper function creates and names a kernel thread
  * The thread will be woken and put into park mode.
  */
-struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data),
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,
+					  struct lock_class_key *exited_key,
+					  struct lock_class_key *parked_key,
 					  const char *namefmt)
 {
 	struct task_struct *p;
 
-	p = kthread_create_on_node(threadfn, data, cpu_to_node(cpu), namefmt,
-				   cpu);
+	p = _kthread_create_on_node(threadfn, data, cpu_to_node(cpu),
+				    exited_key, parked_key, namefmt, cpu);
 	if (IS_ERR(p))
 		return p;
 	kthread_bind(p, cpu);
@@ -669,8 +686,10 @@ int kthread_worker_fn(void *worker_ptr)
 }
 EXPORT_SYMBOL_GPL(kthread_worker_fn);
 
-static __printf(3, 0) struct kthread_worker *
+static __printf(5, 0) struct kthread_worker *
 __kthread_create_worker(int cpu, unsigned int flags,
+			struct lock_class_key *exited_key,
+			struct lock_class_key *parked_key,
 			const char namefmt[], va_list args)
 {
 	struct kthread_worker *worker;
@@ -686,8 +705,8 @@ __kthread_create_worker(int cpu, unsigned int flags,
 	if (cpu >= 0)
 		node = cpu_to_node(cpu);
 
-	task = __kthread_create_on_node(kthread_worker_fn, worker,
-						node, namefmt, args);
+	task = __kthread_create_on_node(kthread_worker_fn, worker, node,
+					exited_key, parked_key, namefmt, args);
 	if (IS_ERR(task))
 		goto fail_task;
 
@@ -714,18 +733,22 @@ __kthread_create_worker(int cpu, unsigned int flags,
  * when the worker was SIGKILLed.
  */
 struct kthread_worker *
-kthread_create_worker(unsigned int flags, const char namefmt[], ...)
+_kthread_create_worker(unsigned int flags,
+		       struct lock_class_key *exited_key,
+		       struct lock_class_key *parked_key,
+		       const char namefmt[], ...)
 {
 	struct kthread_worker *worker;
 	va_list args;
 
 	va_start(args, namefmt);
-	worker = __kthread_create_worker(-1, flags, namefmt, args);
+	worker = __kthread_create_worker(-1, flags, exited_key, parked_key,
+					 namefmt, args);
 	va_end(args);
 
 	return worker;
 }
-EXPORT_SYMBOL(kthread_create_worker);
+EXPORT_SYMBOL(_kthread_create_worker);
 
 /**
  * kthread_create_worker_on_cpu - create a kthread worker and bind it
@@ -745,19 +768,22 @@ EXPORT_SYMBOL(kthread_create_worker);
  * when the worker was SIGKILLed.
  */
 struct kthread_worker *
-kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+			      struct lock_class_key *exited_key,
+			      struct lock_class_key *parked_key,
 			     const char namefmt[], ...)
 {
 	struct kthread_worker *worker;
 	va_list args;
 
 	va_start(args, namefmt);
-	worker = __kthread_create_worker(cpu, flags, namefmt, args);
+	worker = __kthread_create_worker(cpu, flags, exited_key, parked_key,
+					 namefmt, args);
 	va_end(args);
 
 	return worker;
 }
-EXPORT_SYMBOL(kthread_create_worker_on_cpu);
+EXPORT_SYMBOL(_kthread_create_worker_on_cpu);
 
 /*
  * Returns true when the work could not be queued at the moment.
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 03/13] lockdep: Remove GFP_NOLOCKDEP annotation
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
  2018-11-07 15:30 ` [PATCH 02/13] kthread: finer-grained lockdep/cross-release completion Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 04/13] kernel/lockdep: Make cross-release a config option Daniel Vetter
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

This was originally added in 7e7844226f10 ("lockdep: allow to disable
reclaim lockup detection") but a git log -G "GFP_NOLOCKDEP" indicates
it was never used.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: Huaisheng Ye <yehs1@lenovo.com>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Cc: Aaron Lu <aaron.lu@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: linux-mm@kvack.org
Cc: Dave Chinner <david@fromorbit.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 include/linux/gfp.h | 10 +---------
 mm/page_alloc.c     |  3 ---
 2 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 76f8db0b0e71..ea76fcf320ec 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -39,11 +39,6 @@ struct vm_area_struct;
 #define ___GFP_ACCOUNT		0x100000u
 #define ___GFP_DIRECT_RECLAIM	0x200000u
 #define ___GFP_KSWAPD_RECLAIM	0x400000u
-#ifdef CONFIG_LOCKDEP
-#define ___GFP_NOLOCKDEP	0x800000u
-#else
-#define ___GFP_NOLOCKDEP	0
-#endif
 /* If the above are modified, __GFP_BITS_SHIFT may need updating */
 
 /*
@@ -213,11 +208,8 @@ struct vm_area_struct;
 #define __GFP_COMP	((__force gfp_t)___GFP_COMP)
 #define __GFP_ZERO	((__force gfp_t)___GFP_ZERO)
 
-/* Disable lockdep for GFP context tracking */
-#define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP)
-
 /* Room for N __GFP_FOO bits */
-#define __GFP_BITS_SHIFT (23 + IS_ENABLED(CONFIG_LOCKDEP))
+#define __GFP_BITS_SHIFT 23
 #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1))
 
 /**
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a919ba5cb3c8..62c9cd7eae1a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3719,9 +3719,6 @@ static bool __need_fs_reclaim(gfp_t gfp_mask)
 	if (!(gfp_mask & __GFP_FS))
 		return false;
 
-	if (gfp_mask & __GFP_NOLOCKDEP)
-		return false;
-
 	return true;
 }
 
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 04/13] kernel/lockdep: Make cross-release a config option
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
  2018-11-07 15:30 ` [PATCH 02/13] kthread: finer-grained lockdep/cross-release completion Daniel Vetter
  2018-11-07 15:30 ` [PATCH 03/13] lockdep: Remove GFP_NOLOCKDEP annotation Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 05/13] mm: Check if mmu notifier callbacks are allowed to fail Daniel Vetter
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

cross-release annotations will need some serious amounts of vetting
before they can be enabled by default, or we'll just annoy everyone.

Instead split it into a separate option, which for now stays disabled
by default even if you enable overall lockdep.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Waiman Long <longman@redhat.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Yury Norov <ynorov@caviumnetworks.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/Kconfig.debug | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index f3d7bff6fa3c..6074fa3463ac 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1055,8 +1055,6 @@ config PROVE_LOCKING
 	select DEBUG_RWSEMS if RWSEM_SPIN_ON_OWNER
 	select DEBUG_WW_MUTEX_SLOWPATH
 	select DEBUG_LOCK_ALLOC
-	select LOCKDEP_CROSSRELEASE
-	select LOCKDEP_COMPLETIONS
 	select TRACE_IRQFLAGS
 	default n
 	help
@@ -1093,6 +1091,18 @@ config PROVE_LOCKING
 
 	 For more details, see Documentation/locking/lockdep-design.txt.
 
+config LOCKDEP_CROSSRELEASE
+	bool "Enable cross-release checking"
+	depends on PROVE_LOCKING
+	select LOCKDEP_COMPLETIONS
+	help
+	 This makes lockdep work for crosslock which is a lock allowed to
+	 be released in a different context from the acquisition context.
+	 Normally a lock must be released in the context acquiring the lock.
+	 However, relexing this constraint helps synchronization primitives
+	 such as page locks or completions can use the lock correctness
+	 detector, lockdep.
+
 config LOCK_STAT
 	bool "Lock usage statistics"
 	depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
@@ -1189,16 +1199,6 @@ config LOCKDEP
 config LOCKDEP_SMALL
 	bool
 
-config LOCKDEP_CROSSRELEASE
-	bool
-	help
-	 This makes lockdep work for crosslock which is a lock allowed to
-	 be released in a different context from the acquisition context.
-	 Normally a lock must be released in the context acquiring the lock.
-	 However, relexing this constraint helps synchronization primitives
-	 such as page locks or completions can use the lock correctness
-	 detector, lockdep.
-
 config LOCKDEP_COMPLETIONS
 	bool
 	help
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 05/13] mm: Check if mmu notifier callbacks are allowed to fail
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (2 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 04/13] kernel/lockdep: Make cross-release a config option Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 06/13] mm, notifier: Catch sleeping/blocking for !blockable Daniel Vetter
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

Just a bit of paranoia, since if we start pushing this deep into
callchains it's hard to spot all places where an mmu notifier
implementation might fail when it's not allowed to.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: linux-mm@kvack.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 mm/mmu_notifier.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 5119ff846769..59e102589a25 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -190,6 +190,8 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm,
 				pr_info("%pS callback failed with %d in %sblockable context.\n",
 						mn->ops->invalidate_range_start, _ret,
 						!blockable ? "non-" : "");
+				WARN(blockable,"%pS callback failure not allowed\n",
+				     mn->ops->invalidate_range_start);
 				ret = _ret;
 			}
 		}
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 06/13] mm, notifier: Catch sleeping/blocking for !blockable
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (3 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 05/13] mm: Check if mmu notifier callbacks are allowed to fail Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 07/13] mm, notifier: Add a lockdep map for invalidate_range_start Daniel Vetter
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

We need to make sure implementations don't cheat and don't have a
possible schedule/blocking point deeply burried where review can't
catch it.

I'm not sure whether this is the best way to make sure all the
might_sleep() callsites trigger, and it's a bit ugly in the code flow.
But it gets the job done.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: linux-mm@kvack.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 mm/mmu_notifier.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 59e102589a25..4d282cfb296e 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -185,7 +185,13 @@ int __mmu_notifier_invalidate_range_start(struct mm_struct *mm,
 	id = srcu_read_lock(&srcu);
 	hlist_for_each_entry_rcu(mn, &mm->mmu_notifier_mm->list, hlist) {
 		if (mn->ops->invalidate_range_start) {
-			int _ret = mn->ops->invalidate_range_start(mn, mm, start, end, blockable);
+			int _ret;
+
+			if (IS_ENABLED(CONFIG_DEBUG_ATOMIC_SLEEP) && !blockable)
+				preempt_disable();
+			_ret = mn->ops->invalidate_range_start(mn, mm, start, end, blockable);
+			if (IS_ENABLED(CONFIG_DEBUG_ATOMIC_SLEEP) && !blockable)
+				preempt_enable();
 			if (_ret) {
 				pr_info("%pS callback failed with %d in %sblockable context.\n",
 						mn->ops->invalidate_range_start, _ret,
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 07/13] mm, notifier: Add a lockdep map for invalidate_range_start
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (4 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 06/13] mm, notifier: Catch sleeping/blocking for !blockable Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 08/13] dma-fence: cross-release annotations Daniel Vetter
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

This is a similar idea to the fs_reclaim fake lockdep lock. It's
fairly easy to provoke a specific notifier to be run on a specific
range: Just prep it, and then munmap() it.

A bit harder, but still doable, is to provoke the mmu notifiers for
all the various callchains that might lead to them. But both at the
same time is really hard to reliable hit, especially when you want to
exercise paths like direct reclaim or compaction, where it's not
easy to control what exactly will be unmapped.

By introducing a lockdep map to tie them all together we allow lockdep
to see a lot more dependencies, without having to actually hit them
in a single challchain while testing.

Aside: Since I typed this to test i915 mmu notifiers I've only rolled
this out for the invaliate_range_start callback. If there's
interest, we should probably roll this out to all of them. But my
undestanding of core mm is seriously lacking, and I'm not clear on
whether we need a lockdep map for each callback, or whether some can
be shared.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: linux-mm@kvack.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 include/linux/mmu_notifier.h | 7 +++++++
 mm/mmu_notifier.c            | 7 +++++++
 2 files changed, 14 insertions(+)

diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index 9893a6432adf..a39ba218dbbe 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -12,6 +12,10 @@ struct mmu_notifier_ops;
 
 #ifdef CONFIG_MMU_NOTIFIER
 
+#ifdef CONFIG_LOCKDEP
+extern struct lockdep_map __mmu_notifier_invalidate_range_start_map;
+#endif
+
 /*
  * The mmu notifier_mm structure is allocated and installed in
  * mm->mmu_notifier_mm inside the mm_take_all_locks() protected
@@ -267,8 +271,11 @@ static inline void mmu_notifier_change_pte(struct mm_struct *mm,
 static inline void mmu_notifier_invalidate_range_start(struct mm_struct *mm,
 				  unsigned long start, unsigned long end)
 {
+	mutex_acquire(&__mmu_notifier_invalidate_range_start_map, 0, 0,
+		      _RET_IP_);
 	if (mm_has_notifiers(mm))
 		__mmu_notifier_invalidate_range_start(mm, start, end, true);
+	mutex_release(&__mmu_notifier_invalidate_range_start_map, 1, _RET_IP_);
 }
 
 static inline int mmu_notifier_invalidate_range_start_nonblock(struct mm_struct *mm,
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 4d282cfb296e..c6e797927376 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -23,6 +23,13 @@
 /* global SRCU for all MMs */
 DEFINE_STATIC_SRCU(srcu);
 
+#ifdef CONFIG_LOCKDEP
+struct lockdep_map __mmu_notifier_invalidate_range_start_map = {
+	.name = "mmu_notifier_invalidate_range_start"
+};
+EXPORT_SYMBOL_GPL(__mmu_notifier_invalidate_range_start_map);
+#endif
+
 /*
  * This function allows mmu_notifier::release callback to delay a call to
  * a function that will free appropriate resources. The function must be
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 08/13] dma-fence: cross-release annotations
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (5 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 07/13] mm, notifier: Add a lockdep map for invalidate_range_start Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 09/13] reservation: Annotate dma_fence waits Daniel Vetter
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

dma-fence is a completion on steriods, which also allows hardware to
directly sync work among each another. It's supposed to be deadlock
free, so let's try to make sure that holds at least for the cpu-only
interactions and waits.

It's a bit much #ifdef, but I figured for the single case it's not
worth it to pull it all out.

Also, the single global lockdep map is intentional: dma_fences are
supposed to be shared, we need all drivers to be compatible to each
another in their locking hierarchy.

v2:
- handle #idef mess cleaner
- also annotate dma_fence_signal()

v3:
- Add a dma_fence_might_wait() function to annotate fastpaths
- Put it all into headers for other code to use

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/dma-buf/dma-fence.c | 14 ++++++++++++++
 include/linux/dma-fence.h   | 28 ++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index 1551ca7df394..7d56d8b48624 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -30,6 +30,13 @@
 EXPORT_TRACEPOINT_SYMBOL(dma_fence_emit);
 EXPORT_TRACEPOINT_SYMBOL(dma_fence_enable_signal);
 
+
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+struct lockdep_map_cross dma_fence_wait_map =
+	STATIC_CROSS_LOCKDEP_MAP_INIT("dma_fence_signal", &dma_fence_wait_map);
+EXPORT_SYMBOL(dma_fence_wait_map);
+#endif
+
 /*
  * fence context counter: each execution context should have its own
  * fence context, this allows checking if fences belong to the same
@@ -106,6 +113,8 @@ int dma_fence_signal_locked(struct dma_fence *fence)
 
 	lockdep_assert_held(fence->lock);
 
+	dma_fence_wait_release_commit();
+
 	if (WARN_ON(!fence))
 		return -EINVAL;
 
@@ -153,6 +162,8 @@ int dma_fence_signal(struct dma_fence *fence)
 	if (test_and_set_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
 		return -EINVAL;
 
+	dma_fence_wait_release_commit();
+
 	fence->timestamp = ktime_get();
 	set_bit(DMA_FENCE_FLAG_TIMESTAMP_BIT, &fence->flags);
 	trace_dma_fence_signaled(fence);
@@ -197,12 +208,15 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout)
 	if (WARN_ON(timeout < 0))
 		return -EINVAL;
 
+	dma_fence_wait_acquire();
 	trace_dma_fence_wait_start(fence);
 	if (fence->ops->wait)
 		ret = fence->ops->wait(fence, intr, timeout);
 	else
 		ret = dma_fence_default_wait(fence, intr, timeout);
 	trace_dma_fence_wait_end(fence);
+	dma_fence_wait_release();
+
 	return ret;
 }
 EXPORT_SYMBOL(dma_fence_wait_timeout);
diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h
index 02dba8cd033d..8a045334a207 100644
--- a/include/linux/dma-fence.h
+++ b/include/linux/dma-fence.h
@@ -34,6 +34,34 @@ struct dma_fence;
 struct dma_fence_ops;
 struct dma_fence_cb;
 
+#ifdef CONFIG_LOCKDEP_CROSSRELEASE
+#include <linux/lockdep.h>
+extern struct lockdep_map_cross dma_fence_wait_map;
+
+static inline void dma_fence_wait_acquire(void)
+{
+	lock_acquire_exclusive(&dma_fence_wait_map.map, 0, 0, NULL, _RET_IP_);
+}
+static inline void dma_fence_wait_release(void)
+{
+	lock_release(&dma_fence_wait_map.map, 0, _RET_IP_);
+}
+static inline void dma_fence_wait_release_commit(void)
+{
+	lock_commit_crosslock(&dma_fence_wait_map.map);
+}
+#else
+static inline void dma_fence_wait_acquire(void) {}
+static inline void dma_fence_wait_release(void) {}
+static inline void dma_fence_wait_release_commit(void) {}
+#endif
+
+static inline void dma_fence_might_wait(void)
+{
+	dma_fence_wait_acquire();
+	dma_fence_wait_release();
+}
+
 /**
  * struct dma_fence - software synchronization primitive
  * @refcount: refcount for this fence
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 09/13] reservation: Annotate dma_fence waits
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (6 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 08/13] dma-fence: cross-release annotations Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 10/13] drm/i915: " Daniel Vetter
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

reservations have an optimized fastpath that bypasses dma_fence_wait(),
make sure we still catch all dependencies in lockdep.

To avoid lockdep complaining about recursion on the fake
dma_fence_wait lock we use the dma_fence_might_sleep annotation.

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/dma-buf/reservation.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index c1618335ca99..599b88c75cd5 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -429,6 +429,8 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
 	long ret = timeout ? timeout : 1;
 	int i;
 
+	dma_fence_might_wait();
+
 retry:
 	shared_count = 0;
 	seq = read_seqcount_begin(&obj->seq);
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 10/13] drm/i915: Annotate dma_fence waits
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (7 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 09/13] reservation: Annotate dma_fence waits Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 11/13] drm/i915: annotate intel_atomic_commit_fence_wait Daniel Vetter
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

i915_request_wait is simply our i915-optimized version of
dma_fence_wait. They both use the exact same code. To help lockdep
discovering all the dependencies, annotate it.

v2: We do opportunistic retiring of dma-fences while holding
struct_mutex. The recursion this causes is intentional, and we do have
other paths which (hopefully) do depend upon the struct_mutex. 2nd
option to fix these annotations (and probably even better) would be
creating a dma_fence_signal_opportunistic, which doesnt have the
lockdep annotations. But that also doesn't guarantee that we'll
actually manage to signal fences without depending upon struct_mutex
somewhere, so might as well go with this trick here.

Aside, for non-i915 people: struct_mutex is our bkl. The locking rules
are ... complicated.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_request.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 71107540581d..0f800b8967a4 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -30,6 +30,10 @@
 
 #include "i915_drv.h"
 
+static long __i915_request_wait(struct i915_request *rq,
+				unsigned int flags,
+				long timeout);
+
 static const char *i915_fence_get_driver_name(struct dma_fence *fence)
 {
 	return "i915";
@@ -66,7 +70,7 @@ static signed long i915_fence_wait(struct dma_fence *fence,
 				   bool interruptible,
 				   signed long timeout)
 {
-	return i915_request_wait(to_request(fence), interruptible, timeout);
+	return __i915_request_wait(to_request(fence), interruptible, timeout);
 }
 
 static void i915_fence_release(struct dma_fence *fence)
@@ -1201,6 +1205,21 @@ static bool __i915_wait_request_check_and_reset(struct i915_request *request)
 long i915_request_wait(struct i915_request *rq,
 		       unsigned int flags,
 		       long timeout)
+{
+	long ret;
+
+	if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
+		dma_fence_wait_acquire();
+	ret = __i915_request_wait(rq, flags, timeout);
+	if (!lockdep_is_held(&rq->i915->drm.struct_mutex))
+		dma_fence_wait_release();
+
+	return ret;
+}
+
+static long __i915_request_wait(struct i915_request *rq,
+				unsigned int flags,
+				long timeout)
 {
 	const int state = flags & I915_WAIT_INTERRUPTIBLE ?
 		TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE;
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 11/13] drm/i915: annotate intel_atomic_commit_fence_wait
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (8 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 10/13] drm/i915: " Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 15:30 ` [PATCH 12/13] HAX FOR CI: Enable cross-release Daniel Vetter
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

In i915 we also have i915_sw_fence, as some kind of super fence. Since
those include dma-fences (it's the main use really, aside from
chaining them for the scheduler) they're relevant for any lockdep
cycles involving dma_fence.

But i915_sw_fence is also really tough to properly annonate:
- Most of the use (all of it in the scheduler) is entirely driven by
  callbacks. That creates dependency chains, but for all practical
  purposes we could treat that as part of the hw magic that executes
  requests for us. Eventually a dma_fence_signal() comes out of that,
  which we do annotate.

- For dma-fences we only annotate cpu waits, and don't follow any of
  the chains going through the hardware. Since dma_fence are supposed
  to be ordered an always complete that should be good enough, as long
  as we don't accidentally deadlock on the cpu side. So treating
  i915_sw_fence as part of the hw magic shouldn't reduce our deadlock
  coverage, as long as i915_sw_fence itself doesn't deadlock. And
  there's lots of debug checks for that already.

- There's one exception: intel_atomic_commit_fence_wait() is the only
  cpu wait on a i915_sw_fence we have. That one we should annotate,
  and annotate should be able to teach lockdep about our gpu reset vs
  modeset locking inversion. But in reality this is a dma-fence wait,
  and it using i915_sw_fence is really just an implementation detail.
  All other kms drivers use drm_atomic_helper_wait_for_fences()
  instead.

- There is a i915_sw_fence_wait for normal cpu waits (the one in the
  modeset code is open-coded because it also waits for gpu reset
  wakups), but that's only used for selftests.

So the simplest solution for annotating i915_sw_fence is therefore to
annotate intel_atomic_commit_fence() as a dma_fence wait.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bbf8ca21a7a2..cf9240625ae3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12747,6 +12747,7 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_stat
 	struct wait_queue_entry wait_fence, wait_reset;
 	struct drm_i915_private *dev_priv = to_i915(intel_state->base.dev);
 
+	dma_fence_wait_acquire();
 	init_wait_entry(&wait_fence, 0);
 	init_wait_entry(&wait_reset, 0);
 	for (;;) {
@@ -12764,6 +12765,7 @@ static void intel_atomic_commit_fence_wait(struct intel_atomic_state *intel_stat
 	}
 	finish_wait(&intel_state->commit_ready.wait, &wait_fence);
 	finish_wait(&dev_priv->gpu_error.wait_queue, &wait_reset);
+	dma_fence_wait_release();
 }
 
 static void intel_atomic_cleanup_work(struct work_struct *work)
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 12/13] HAX FOR CI: Enable cross-release
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (9 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 11/13] drm/i915: annotate intel_atomic_commit_fence_wait Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-08  9:31   ` [PATCH] " Daniel Vetter
  2018-11-07 15:30 ` [PATCH 13/13] Revert "locking/lockdep, cpu/hotplug: Annotate AP thread" Daniel Vetter
                   ` (17 subsequent siblings)
  28 siblings, 1 reply; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..deba9af0f418 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 13/13] Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (10 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 12/13] HAX FOR CI: Enable cross-release Daniel Vetter
@ 2018-11-07 15:30 ` Daniel Vetter
  2018-11-07 16:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks Patchwork
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-07 15:30 UTC (permalink / raw)
  To: Intel Graphics Development

This reverts commit cb92173d1f0474784c6171a9d3fdbbca0ee53554.

This commit tries to shut up lockdep complaining about a
lockdep_assert_held check in the AP cpuhp bringup threads, while the
lock is actually held by the BP thread. Which is all kinda correct,
since BP does wait for all the AP threads to finish before it releases
the cpuhp locks, through a completion.

The only problem with this somewhat fake annotion is that
cross-release sees through the fog, and rightly complains that doing
this for real would totally deadlock.

One way to fix this would be to check that anyone is currently holding
the lock, and not just the current thread. But I'm not sure that's a
good option really. Hence just revert for now, which will result in a
lockdep_assert_held splat per non-boot cpu at boot-up (and anytime you
hotplug a cpu), but at least lockdep keeps working.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: "Peter Zijlstra (Intel)" <peterz@infraded.org>
Cc: Mukesh Ojha <mojha@codeaurora.org>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 kernel/cpu.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 3c7f3b4c453c..5ff05c284425 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -315,16 +315,6 @@ void lockdep_assert_cpus_held(void)
 	percpu_rwsem_assert_held(&cpu_hotplug_lock);
 }
 
-static void lockdep_acquire_cpus_lock(void)
-{
-	rwsem_acquire(&cpu_hotplug_lock.rw_sem.dep_map, 0, 0, _THIS_IP_);
-}
-
-static void lockdep_release_cpus_lock(void)
-{
-	rwsem_release(&cpu_hotplug_lock.rw_sem.dep_map, 1, _THIS_IP_);
-}
-
 /*
  * Wait for currently running CPU hotplug operations to complete (if any) and
  * disable future CPU hotplug (from sysfs). The 'cpu_add_remove_lock' protects
@@ -354,17 +344,6 @@ void cpu_hotplug_enable(void)
 	cpu_maps_update_done();
 }
 EXPORT_SYMBOL_GPL(cpu_hotplug_enable);
-
-#else
-
-static void lockdep_acquire_cpus_lock(void)
-{
-}
-
-static void lockdep_release_cpus_lock(void)
-{
-}
-
 #endif	/* CONFIG_HOTPLUG_CPU */
 
 #ifdef CONFIG_HOTPLUG_SMT
@@ -638,12 +617,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
 	 */
 	smp_mb();
 
-	/*
-	 * The BP holds the hotplug lock, but we're now running on the AP,
-	 * ensure that anybody asserting the lock is held, will actually find
-	 * it so.
-	 */
-	lockdep_acquire_cpus_lock();
 	cpuhp_lock_acquire(bringup);
 
 	if (st->single) {
@@ -689,7 +662,6 @@ static void cpuhp_thread_fun(unsigned int cpu)
 	}
 
 	cpuhp_lock_release(bringup);
-	lockdep_release_cpus_lock();
 
 	if (!st->should_run)
 		complete_ap_thread(st, bringup);
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (11 preceding siblings ...)
  2018-11-07 15:30 ` [PATCH 13/13] Revert "locking/lockdep, cpu/hotplug: Annotate AP thread" Daniel Vetter
@ 2018-11-07 16:51 ` Patchwork
  2018-11-07 16:57 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-07 16:51 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
a0ec0a02fec5 locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9: 
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")

-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'?
#645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered

-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'?
#817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important

-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'?
#840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#994: FILE: include/linux/completion.h:60:
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)

-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects?
#1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }

-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1109: FILE: include/linux/lockdep.h:305:
+	 * Seperate stack_trace data. This will be used at commit step.

-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1115: FILE: include/linux/lockdep.h:311:
+	 * Seperate hlock instance. This will be used at commit step.

-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1143: FILE: include/linux/lockdep.h:339:
+	 * Seperate hlock instance. This will be used at commit step.

-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,

-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);

-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);

-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);

-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);

-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);

-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);

-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1309: FILE: kernel/locking/lockdep.c:1158:
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");

-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1310: FILE: kernel/locking/lockdep.c:1159:
+		printk("       CPU0                    CPU1\n");

-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1311: FILE: kernel/locking/lockdep.c:1160:
+		printk("       ----                    ----\n");

-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1312: FILE: kernel/locking/lockdep.c:1161:
+		printk("  lock(");

-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1315: FILE: kernel/locking/lockdep.c:1164:
+		printk("  lock(");

-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1318: FILE: kernel/locking/lockdep.c:1167:
+		printk("                               lock(");

-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1321: FILE: kernel/locking/lockdep.c:1170:
+		printk("                               unlock(");

-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1324: FILE: kernel/locking/lockdep.c:1173:
+		printk("\n *** DEADLOCK ***\n\n");

-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1326: FILE: kernel/locking/lockdep.c:1175:
+		printk(" Possible unsafe locking scenario:\n\n");

-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1327: FILE: kernel/locking/lockdep.c:1176:
+		printk("       CPU0                    CPU1\n");

-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1328: FILE: kernel/locking/lockdep.c:1177:
+		printk("       ----                    ----\n");

-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1329: FILE: kernel/locking/lockdep.c:1178:
+		printk("  lock(");

-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1332: FILE: kernel/locking/lockdep.c:1181:
+		printk("                               lock(");

-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1335: FILE: kernel/locking/lockdep.c:1184:
+		printk("                               lock(");

-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1338: FILE: kernel/locking/lockdep.c:1187:
+		printk("  lock(");

-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1341: FILE: kernel/locking/lockdep.c:1190:
+		printk("\n *** DEADLOCK ***\n\n");

-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV)
#1477: FILE: kernel/locking/lockdep.c:2260:
+		chain_hlocks[chain->base + 1] = next -1;
 		                                     ^

-:1483: CHECK:BRACES: Unbalanced braces around else statement
#1483: FILE: kernel/locking/lockdep.c:2266:
+	else {

-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)

-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#1899: FILE: kernel/locking/lockdep.c:4959:
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 	                                                     ^

-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1926: FILE: kernel/locking/lockdep.c:4986:
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))

-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...)
#2061: FILE: kernel/locking/lockdep.c:5121:
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,

-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'?
#2069: FILE: kernel/locking/lockdep.c:5129:
+		/* Diable crossrelease for current */

-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 42 warnings, 17 checks, 2023 lines checked
4371d7204773 kthread: finer-grained lockdep/cross-release completion
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,

-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#139: FILE: kernel/kthread.c:234:
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",

-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#139: FILE: kernel/kthread.c:234:
+			"(kthread completion)->exited",

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: kernel/kthread.c:238:
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",

-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#143: FILE: kernel/kthread.c:238:
+			"(kthread completion)->parked",

-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,

-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 6 checks, 240 lines checked
ab34d4048b0b lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")'
#6: 
This was originally added in 7e7844226f10 ("lockdep: allow to disable

-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 32 lines checked
2b46df29dbfa kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 42 lines checked
438772d48af4 mm: Check if mmu notifier callbacks are allowed to fail
-:31: ERROR:SPACING: space required after that ',' (ctx:VxV)
#31: FILE: mm/mmu_notifier.c:193:
+				WARN(blockable,"%pS callback failure not allowed\n",
 				              ^

-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 8 lines checked
647cce606641 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
0755db02ad4f mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
2b67967388ef dma-fence: cross-release annotations
-:40: CHECK:LINE_SPACING: Please don't use multiple blank lines
#40: FILE: drivers/dma-buf/dma-fence.c:33:
 
+

-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)

-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)

-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 3 checks, 78 lines checked
6ff72025bbac reservation: Annotate dma_fence waits
e6b7a1ef4a8d drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#14: 
creating a dma_fence_signal_opportunistic, which doesnt have the

-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 39 lines checked
1021695f6069 drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
5cb98a52745f HAX FOR CI: Enable cross-release
-:22: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 7 lines checked
5e9cb1f64702 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
-:96: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 52 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [01/13] locking/lockdep: restore cross-release checks
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (12 preceding siblings ...)
  2018-11-07 16:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks Patchwork
@ 2018-11-07 16:57 ` Patchwork
  2018-11-07 17:07 ` ✗ Fi.CI.BAT: failure " Patchwork
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-07 16:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: locking/lockdep: restore cross-release checks
+
+Error in reading or end of file.

Commit: kthread: finer-grained lockdep/cross-release completion
Okay!

Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!

Commit: kernel/lockdep: Make cross-release a config option
Okay!

Commit: mm: Check if mmu notifier callbacks are allowed to fail
Okay!

Commit: mm, notifier: Catch sleeping/blocking for !blockable
Okay!

Commit: mm, notifier: Add a lockdep map for invalidate_range_start
Okay!

Commit: dma-fence: cross-release annotations
Okay!

Commit: reservation: Annotate dma_fence waits
Okay!

Commit: drm/i915: Annotate dma_fence waits
Okay!

Commit: drm/i915: annotate intel_atomic_commit_fence_wait
Okay!

Commit: HAX FOR CI: Enable cross-release
Okay!

Commit: Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (13 preceding siblings ...)
  2018-11-07 16:57 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-07 17:07 ` Patchwork
  2018-11-08 10:04 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2) Patchwork
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-07 17:07 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5098 -> Patchwork_10754 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10754 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10754, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52167/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10754:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_hangcheck:
      fi-bwr-2160:        PASS -> DMESG-FAIL

    igt@gem_sync@basic-each:
      fi-kbl-8809g:       PASS -> DMESG-WARN

    igt@gem_tiled_fence_blits@basic:
      fi-apl-guc:         PASS -> DMESG-WARN
      fi-elk-e7500:       PASS -> DMESG-WARN
      fi-cfl-guc:         PASS -> DMESG-WARN
      fi-skl-6700hq:      PASS -> DMESG-WARN
      fi-hsw-4770r:       PASS -> DMESG-WARN
      fi-skl-gvtdvm:      PASS -> DMESG-WARN
      fi-kbl-x1275:       PASS -> DMESG-WARN
      fi-icl-u:           NOTRUN -> DMESG-WARN
      fi-hsw-peppy:       PASS -> DMESG-WARN
      fi-bdw-5557u:       PASS -> DMESG-WARN
      fi-glk-dsi:         PASS -> DMESG-WARN
      fi-glk-j4005:       PASS -> DMESG-WARN
      fi-kbl-7567u:       PASS -> DMESG-WARN
      fi-cnl-u:           PASS -> DMESG-WARN
      fi-bdw-gvtdvm:      PASS -> DMESG-WARN
      fi-hsw-4770:        PASS -> DMESG-WARN
      fi-ivb-3520m:       PASS -> DMESG-WARN
      fi-kbl-7500u:       PASS -> DMESG-WARN
      fi-whl-u:           PASS -> DMESG-WARN
      fi-icl-u2:          PASS -> DMESG-WARN
      fi-ivb-3770:        PASS -> DMESG-WARN
      fi-bxt-dsi:         PASS -> DMESG-WARN
      fi-cfl-s3:          PASS -> DMESG-WARN
      fi-skl-iommu:       PASS -> DMESG-WARN
      fi-bxt-j4205:       PASS -> DMESG-WARN
      fi-skl-6770hq:      PASS -> DMESG-WARN
      fi-ilk-650:         PASS -> DMESG-WARN
      fi-snb-2600:        PASS -> DMESG-WARN
      fi-skl-6260u:       PASS -> DMESG-WARN
      fi-kbl-r:           PASS -> DMESG-WARN
      fi-skl-guc:         PASS -> DMESG-WARN
      fi-kbl-guc:         PASS -> DMESG-WARN
      fi-skl-6600u:       PASS -> DMESG-WARN
      fi-kbl-7560u:       PASS -> DMESG-WARN
      fi-cfl-8700k:       PASS -> DMESG-WARN

    igt@prime_vgem@basic-fence-flip:
      fi-bwr-2160:        PASS -> DMESG-WARN
      fi-blb-e6850:       PASS -> DMESG-WARN

    
== Known issues ==

  Here are the changes found in Patchwork_10754 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_contexts:
      fi-icl-u:           NOTRUN -> INCOMPLETE (fdo#108315, fdo#108535)

    igt@gem_exec_reloc@basic-write-cpu-active:
      fi-cfl-8109u:       PASS -> DMESG-WARN (fdo#106107)

    igt@gem_exec_suspend@basic-s3:
      fi-cfl-8109u:       PASS -> INCOMPLETE (fdo#107187, fdo#108126)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)

    
    ==== Possible fixes ====

    igt@gem_ctx_switch@basic-default:
      fi-icl-u:           INCOMPLETE (fdo#108315, fdo#108535) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-icl-u2:          FAIL (fdo#103167) -> PASS

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      fi-ilk-650:         DMESG-WARN (fdo#106387) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#106107 https://bugs.freedesktop.org/show_bug.cgi?id=106107
  fdo#106387 https://bugs.freedesktop.org/show_bug.cgi?id=106387
  fdo#107187 https://bugs.freedesktop.org/show_bug.cgi?id=107187
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
  fdo#108535 https://bugs.freedesktop.org/show_bug.cgi?id=108535


== Participating hosts (52 -> 47) ==

  Additional (1): fi-byt-j1900 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 


== Build changes ==

    * Linux: CI_DRM_5098 -> Patchwork_10754

  CI_DRM_5098: a9cbcae14226206fe08f3c1e3f74ad9e357a4384 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4712: a3ede1b535ac8137f6949c468edd7054453d5dae @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10754: 5e9cb1f64702c376e1290b8346fb4b421bb71808 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

5e9cb1f64702 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
5cb98a52745f HAX FOR CI: Enable cross-release
1021695f6069 drm/i915: annotate intel_atomic_commit_fence_wait
e6b7a1ef4a8d drm/i915: Annotate dma_fence waits
6ff72025bbac reservation: Annotate dma_fence waits
2b67967388ef dma-fence: cross-release annotations
0755db02ad4f mm, notifier: Add a lockdep map for invalidate_range_start
647cce606641 mm, notifier: Catch sleeping/blocking for !blockable
438772d48af4 mm: Check if mmu notifier callbacks are allowed to fail
2b46df29dbfa kernel/lockdep: Make cross-release a config option
ab34d4048b0b lockdep: Remove GFP_NOLOCKDEP annotation
4371d7204773 kthread: finer-grained lockdep/cross-release completion
a0ec0a02fec5 locking/lockdep: restore cross-release checks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10754/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-07 15:30 ` [PATCH 12/13] HAX FOR CI: Enable cross-release Daniel Vetter
@ 2018-11-08  9:31   ` Daniel Vetter
  2018-11-08  9:41     ` Chris Wilson
  2018-11-20 10:58     ` Daniel Vetter
  0 siblings, 2 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-08  9:31 UTC (permalink / raw)
  To: Intel Graphics Development

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/Kconfig.debug | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..deba9af0f418 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH] HAX FOR CI: Enable cross-release
  2018-11-08  9:31   ` [PATCH] " Daniel Vetter
@ 2018-11-08  9:41     ` Chris Wilson
  2018-11-20 11:00       ` Daniel Vetter
  2018-11-20 10:58     ` Daniel Vetter
  1 sibling, 1 reply; 38+ messages in thread
From: Chris Wilson @ 2018-11-08  9:41 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics Development

Quoting Daniel Vetter (2018-11-08 09:31:11)
> Only way to convince our CI to enable stuff that's new and defaulting
> to off. Obviously not for merging.

See DRM_I915_DEBUG where we define what extras we need for CI.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (14 preceding siblings ...)
  2018-11-07 17:07 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2018-11-08 10:04 ` Patchwork
  2018-11-08 10:10 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-08 10:04 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
d34529c13d64 locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9: 
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")

-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'?
#645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered

-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'?
#817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important

-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'?
#840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#994: FILE: include/linux/completion.h:60:
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)

-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects?
#1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }

-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1109: FILE: include/linux/lockdep.h:305:
+	 * Seperate stack_trace data. This will be used at commit step.

-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1115: FILE: include/linux/lockdep.h:311:
+	 * Seperate hlock instance. This will be used at commit step.

-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1143: FILE: include/linux/lockdep.h:339:
+	 * Seperate hlock instance. This will be used at commit step.

-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,

-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);

-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);

-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);

-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);

-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);

-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);

-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1309: FILE: kernel/locking/lockdep.c:1158:
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");

-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1310: FILE: kernel/locking/lockdep.c:1159:
+		printk("       CPU0                    CPU1\n");

-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1311: FILE: kernel/locking/lockdep.c:1160:
+		printk("       ----                    ----\n");

-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1312: FILE: kernel/locking/lockdep.c:1161:
+		printk("  lock(");

-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1315: FILE: kernel/locking/lockdep.c:1164:
+		printk("  lock(");

-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1318: FILE: kernel/locking/lockdep.c:1167:
+		printk("                               lock(");

-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1321: FILE: kernel/locking/lockdep.c:1170:
+		printk("                               unlock(");

-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1324: FILE: kernel/locking/lockdep.c:1173:
+		printk("\n *** DEADLOCK ***\n\n");

-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1326: FILE: kernel/locking/lockdep.c:1175:
+		printk(" Possible unsafe locking scenario:\n\n");

-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1327: FILE: kernel/locking/lockdep.c:1176:
+		printk("       CPU0                    CPU1\n");

-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1328: FILE: kernel/locking/lockdep.c:1177:
+		printk("       ----                    ----\n");

-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1329: FILE: kernel/locking/lockdep.c:1178:
+		printk("  lock(");

-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1332: FILE: kernel/locking/lockdep.c:1181:
+		printk("                               lock(");

-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1335: FILE: kernel/locking/lockdep.c:1184:
+		printk("                               lock(");

-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1338: FILE: kernel/locking/lockdep.c:1187:
+		printk("  lock(");

-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1341: FILE: kernel/locking/lockdep.c:1190:
+		printk("\n *** DEADLOCK ***\n\n");

-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV)
#1477: FILE: kernel/locking/lockdep.c:2260:
+		chain_hlocks[chain->base + 1] = next -1;
 		                                     ^

-:1483: CHECK:BRACES: Unbalanced braces around else statement
#1483: FILE: kernel/locking/lockdep.c:2266:
+	else {

-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)

-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#1899: FILE: kernel/locking/lockdep.c:4959:
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 	                                                     ^

-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1926: FILE: kernel/locking/lockdep.c:4986:
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))

-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...)
#2061: FILE: kernel/locking/lockdep.c:5121:
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,

-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'?
#2069: FILE: kernel/locking/lockdep.c:5129:
+		/* Diable crossrelease for current */

-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 42 warnings, 17 checks, 2023 lines checked
0fd9815c65c9 kthread: finer-grained lockdep/cross-release completion
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,

-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#139: FILE: kernel/kthread.c:234:
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",

-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#139: FILE: kernel/kthread.c:234:
+			"(kthread completion)->exited",

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: kernel/kthread.c:238:
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",

-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#143: FILE: kernel/kthread.c:238:
+			"(kthread completion)->parked",

-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,

-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 6 checks, 240 lines checked
e7ff79710898 lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")'
#6: 
This was originally added in 7e7844226f10 ("lockdep: allow to disable

-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 32 lines checked
aae2894bfc45 kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 42 lines checked
06c79f0d65de mm: Check if mmu notifier callbacks are allowed to fail
-:31: ERROR:SPACING: space required after that ',' (ctx:VxV)
#31: FILE: mm/mmu_notifier.c:193:
+				WARN(blockable,"%pS callback failure not allowed\n",
 				              ^

-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 8 lines checked
0223cf9d2a45 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
90752f20c3a6 mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
4dce4ddd09e6 dma-fence: cross-release annotations
-:40: CHECK:LINE_SPACING: Please don't use multiple blank lines
#40: FILE: drivers/dma-buf/dma-fence.c:33:
 
+

-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)

-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)

-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 3 checks, 78 lines checked
bc4bac3e3c4e reservation: Annotate dma_fence waits
4b864c2a1402 drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#14: 
creating a dma_fence_signal_opportunistic, which doesnt have the

-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 39 lines checked
2114fc3c606a drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
6895428ac0f7 HAX FOR CI: Enable cross-release
-:24: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 7 lines checked
edc202dd3ab7 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
-:96: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 52 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (15 preceding siblings ...)
  2018-11-08 10:04 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2) Patchwork
@ 2018-11-08 10:10 ` Patchwork
  2018-11-08 10:21 ` ✗ Fi.CI.BAT: failure " Patchwork
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-08 10:10 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: locking/lockdep: restore cross-release checks
+
+Error in reading or end of file.

Commit: kthread: finer-grained lockdep/cross-release completion
Okay!

Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!

Commit: kernel/lockdep: Make cross-release a config option
Okay!

Commit: mm: Check if mmu notifier callbacks are allowed to fail
Okay!

Commit: mm, notifier: Catch sleeping/blocking for !blockable
Okay!

Commit: mm, notifier: Add a lockdep map for invalidate_range_start
Okay!

Commit: dma-fence: cross-release annotations
Okay!

Commit: reservation: Annotate dma_fence waits
Okay!

Commit: drm/i915: Annotate dma_fence waits
Okay!

Commit: drm/i915: annotate intel_atomic_commit_fence_wait
Okay!

Commit: HAX FOR CI: Enable cross-release
Okay!

Commit: Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (16 preceding siblings ...)
  2018-11-08 10:10 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-08 10:21 ` Patchwork
  2018-11-20 12:33 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3) Patchwork
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-08 10:21 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev2)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5103 -> Patchwork_10772 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10772 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10772, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52167/revisions/2/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10772:

  === IGT changes ===

    ==== Possible regressions ====

    igt@drv_selftest@live_hangcheck:
      fi-bwr-2160:        PASS -> DMESG-FAIL

    igt@gem_sync@basic-each:
      fi-kbl-8809g:       PASS -> DMESG-WARN

    igt@gem_tiled_fence_blits@basic:
      fi-apl-guc:         PASS -> DMESG-WARN
      fi-elk-e7500:       PASS -> DMESG-WARN
      fi-skl-6700k2:      PASS -> DMESG-WARN
      fi-cfl-guc:         PASS -> DMESG-WARN
      fi-skl-6700hq:      PASS -> DMESG-WARN
      fi-hsw-4770r:       PASS -> DMESG-WARN
      fi-kbl-x1275:       PASS -> DMESG-WARN
      fi-icl-u:           PASS -> DMESG-WARN
      fi-hsw-peppy:       PASS -> DMESG-WARN
      fi-bdw-5557u:       PASS -> DMESG-WARN
      fi-glk-dsi:         PASS -> DMESG-WARN
      fi-glk-j4005:       PASS -> DMESG-WARN
      fi-kbl-7567u:       PASS -> DMESG-WARN
      fi-cnl-u:           PASS -> DMESG-WARN
      fi-bdw-gvtdvm:      PASS -> DMESG-WARN
      fi-hsw-4770:        PASS -> DMESG-WARN
      fi-ivb-3520m:       PASS -> DMESG-WARN
      fi-kbl-7500u:       PASS -> DMESG-WARN
      fi-whl-u:           PASS -> DMESG-WARN
      fi-icl-u2:          PASS -> DMESG-WARN
      fi-ivb-3770:        PASS -> DMESG-WARN
      fi-bxt-dsi:         PASS -> DMESG-WARN
      fi-cfl-s3:          PASS -> DMESG-WARN
      fi-skl-iommu:       PASS -> DMESG-WARN
      fi-bxt-j4205:       PASS -> DMESG-WARN
      fi-skl-6770hq:      PASS -> DMESG-WARN
      fi-ilk-650:         PASS -> DMESG-WARN
      fi-bsw-kefka:       PASS -> DMESG-WARN
      fi-snb-2600:        PASS -> DMESG-WARN
      fi-skl-6260u:       PASS -> DMESG-WARN
      fi-cfl-8109u:       PASS -> DMESG-WARN
      fi-kbl-r:           PASS -> DMESG-WARN
      fi-skl-guc:         PASS -> DMESG-WARN
      fi-kbl-guc:         PASS -> DMESG-WARN
      fi-skl-6600u:       PASS -> DMESG-WARN
      fi-kbl-7560u:       PASS -> DMESG-WARN
      fi-cfl-8700k:       PASS -> DMESG-WARN

    igt@prime_vgem@basic-fence-flip:
      fi-bwr-2160:        PASS -> DMESG-WARN
      fi-blb-e6850:       PASS -> DMESG-WARN

    
== Known issues ==

  Here are the changes found in Patchwork_10772 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_coherency:
      fi-gdg-551:         PASS -> DMESG-FAIL (fdo#107164)

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       PASS -> INCOMPLETE (fdo#108044)

    igt@kms_frontbuffer_tracking@basic:
      fi-icl-u2:          PASS -> FAIL (fdo#103167)
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362)

    
    ==== Possible fixes ====

    igt@kms_flip@basic-flip-vs-modeset:
      fi-hsw-4770r:       DMESG-WARN (fdo#105602) -> PASS

    igt@kms_pipe_crc_basic@read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-byt-clapper:     FAIL (fdo#107362, fdo#103191) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

    
    ==== Warnings ====

    igt@drv_selftest@live_contexts:
      fi-icl-u2:          DMESG-FAIL (fdo#108569) -> INCOMPLETE (fdo#108315)
      fi-icl-u:           INCOMPLETE (fdo#108315) -> DMESG-FAIL (fdo#108569)

    
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#108044 https://bugs.freedesktop.org/show_bug.cgi?id=108044
  fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
  fdo#108569 https://bugs.freedesktop.org/show_bug.cgi?id=108569


== Participating hosts (54 -> 47) ==

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 


== Build changes ==

    * Linux: CI_DRM_5103 -> Patchwork_10772

  CI_DRM_5103: 23c1138030ad65402f698ab0b356e2f55722bc77 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4712: a3ede1b535ac8137f6949c468edd7054453d5dae @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10772: edc202dd3ab730939ce2408588d86ae04c43e8ce @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

edc202dd3ab7 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
6895428ac0f7 HAX FOR CI: Enable cross-release
2114fc3c606a drm/i915: annotate intel_atomic_commit_fence_wait
4b864c2a1402 drm/i915: Annotate dma_fence waits
bc4bac3e3c4e reservation: Annotate dma_fence waits
4dce4ddd09e6 dma-fence: cross-release annotations
90752f20c3a6 mm, notifier: Add a lockdep map for invalidate_range_start
0223cf9d2a45 mm, notifier: Catch sleeping/blocking for !blockable
06c79f0d65de mm: Check if mmu notifier callbacks are allowed to fail
aae2894bfc45 kernel/lockdep: Make cross-release a config option
e7ff79710898 lockdep: Remove GFP_NOLOCKDEP annotation
0fd9815c65c9 kthread: finer-grained lockdep/cross-release completion
d34529c13d64 locking/lockdep: restore cross-release checks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10772/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-08  9:31   ` [PATCH] " Daniel Vetter
  2018-11-08  9:41     ` Chris Wilson
@ 2018-11-20 10:58     ` Daniel Vetter
  2018-11-22 16:35       ` Daniel Vetter
  1 sibling, 1 reply; 38+ messages in thread
From: Daniel Vetter @ 2018-11-20 10:58 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/Kconfig.debug | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..8e1c30e3face 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1208,7 +1209,7 @@ config LOCKDEP_COMPLETIONS
 config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
 	bool "Enable the boot parameter, crossrelease_fullstack"
 	depends on LOCKDEP_CROSSRELEASE
-	default n
+	default y
 	help
 	 The lockdep "cross-release" feature needs to record stack traces
 	 (of calling functions) for all acquisitions, for eventual later
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH] HAX FOR CI: Enable cross-release
  2018-11-08  9:41     ` Chris Wilson
@ 2018-11-20 11:00       ` Daniel Vetter
  0 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-20 11:00 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, Intel Graphics Development

On Thu, Nov 08, 2018 at 09:41:47AM +0000, Chris Wilson wrote:
> Quoting Daniel Vetter (2018-11-08 09:31:11)
> > Only way to convince our CI to enable stuff that's new and defaulting
> > to off. Obviously not for merging.
> 
> See DRM_I915_DEBUG where we define what extras we need for CI.

Yeah I know, just not sure whether I really want to push this through or
not. Seems quite a bit more fragile to resurrect than it originally looked
like. There's also the issue that we'd need serious buy-in from a bunch of
people before we can enable this in our CI for real.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (17 preceding siblings ...)
  2018-11-08 10:21 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2018-11-20 12:33 ` Patchwork
  2018-11-20 12:39 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-20 12:33 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
a3b9f37357c8 locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9: 
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")

-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'?
#645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered

-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'?
#817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important

-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'?
#840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#994: FILE: include/linux/completion.h:60:
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)

-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects?
#1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }

-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1109: FILE: include/linux/lockdep.h:305:
+	 * Seperate stack_trace data. This will be used at commit step.

-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1115: FILE: include/linux/lockdep.h:311:
+	 * Seperate hlock instance. This will be used at commit step.

-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1143: FILE: include/linux/lockdep.h:339:
+	 * Seperate hlock instance. This will be used at commit step.

-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,

-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);

-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);

-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);

-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);

-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);

-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);

-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1309: FILE: kernel/locking/lockdep.c:1158:
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");

-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1310: FILE: kernel/locking/lockdep.c:1159:
+		printk("       CPU0                    CPU1\n");

-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1311: FILE: kernel/locking/lockdep.c:1160:
+		printk("       ----                    ----\n");

-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1312: FILE: kernel/locking/lockdep.c:1161:
+		printk("  lock(");

-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1315: FILE: kernel/locking/lockdep.c:1164:
+		printk("  lock(");

-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1318: FILE: kernel/locking/lockdep.c:1167:
+		printk("                               lock(");

-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1321: FILE: kernel/locking/lockdep.c:1170:
+		printk("                               unlock(");

-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1324: FILE: kernel/locking/lockdep.c:1173:
+		printk("\n *** DEADLOCK ***\n\n");

-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1326: FILE: kernel/locking/lockdep.c:1175:
+		printk(" Possible unsafe locking scenario:\n\n");

-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1327: FILE: kernel/locking/lockdep.c:1176:
+		printk("       CPU0                    CPU1\n");

-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1328: FILE: kernel/locking/lockdep.c:1177:
+		printk("       ----                    ----\n");

-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1329: FILE: kernel/locking/lockdep.c:1178:
+		printk("  lock(");

-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1332: FILE: kernel/locking/lockdep.c:1181:
+		printk("                               lock(");

-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1335: FILE: kernel/locking/lockdep.c:1184:
+		printk("                               lock(");

-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1338: FILE: kernel/locking/lockdep.c:1187:
+		printk("  lock(");

-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1341: FILE: kernel/locking/lockdep.c:1190:
+		printk("\n *** DEADLOCK ***\n\n");

-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV)
#1477: FILE: kernel/locking/lockdep.c:2260:
+		chain_hlocks[chain->base + 1] = next -1;
 		                                     ^

-:1483: CHECK:BRACES: Unbalanced braces around else statement
#1483: FILE: kernel/locking/lockdep.c:2266:
+	else {

-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)

-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#1899: FILE: kernel/locking/lockdep.c:4959:
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 	                                                     ^

-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1926: FILE: kernel/locking/lockdep.c:4986:
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))

-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...)
#2061: FILE: kernel/locking/lockdep.c:5121:
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,

-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'?
#2069: FILE: kernel/locking/lockdep.c:5129:
+		/* Diable crossrelease for current */

-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 42 warnings, 17 checks, 2023 lines checked
7a874678febd kthread: finer-grained lockdep/cross-release completion
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,

-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#139: FILE: kernel/kthread.c:234:
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",

-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#139: FILE: kernel/kthread.c:234:
+			"(kthread completion)->exited",

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: kernel/kthread.c:238:
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",

-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#143: FILE: kernel/kthread.c:238:
+			"(kthread completion)->parked",

-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,

-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 6 checks, 240 lines checked
132a5d524bf5 lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")'
#6: 
This was originally added in 7e7844226f10 ("lockdep: allow to disable

-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 32 lines checked
5b3e8d1062cc kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 42 lines checked
c48434bf624c mm: Check if mmu notifier callbacks are allowed to fail
-:31: ERROR:SPACING: space required after that ',' (ctx:VxV)
#31: FILE: mm/mmu_notifier.c:193:
+				WARN(blockable,"%pS callback failure not allowed\n",
 				              ^

-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 8 lines checked
2b0ed181506c mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
89c0437e66b9 mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
8dcf3bbce92f dma-fence: cross-release annotations
-:40: CHECK:LINE_SPACING: Please don't use multiple blank lines
#40: FILE: drivers/dma-buf/dma-fence.c:33:
 
+

-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)

-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)

-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 3 checks, 78 lines checked
dd811c8f1350 reservation: Annotate dma_fence waits
e60856ea5d1f drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#14: 
creating a dma_fence_signal_opportunistic, which doesnt have the

-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 39 lines checked
401b2d631fb5 drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
4717d45fe1b6 HAX FOR CI: Enable cross-release
-:33: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 15 lines checked
a92325ed09f8 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
-:96: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 52 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (18 preceding siblings ...)
  2018-11-20 12:33 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3) Patchwork
@ 2018-11-20 12:39 ` Patchwork
  2018-11-20 12:53 ` ✗ Fi.CI.BAT: failure " Patchwork
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-20 12:39 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: locking/lockdep: restore cross-release checks
+
+Error in reading or end of file.

Commit: kthread: finer-grained lockdep/cross-release completion
Okay!

Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!

Commit: kernel/lockdep: Make cross-release a config option
Okay!

Commit: mm: Check if mmu notifier callbacks are allowed to fail
Okay!

Commit: mm, notifier: Catch sleeping/blocking for !blockable
Okay!

Commit: mm, notifier: Add a lockdep map for invalidate_range_start
Okay!

Commit: dma-fence: cross-release annotations
Okay!

Commit: reservation: Annotate dma_fence waits
Okay!

Commit: drm/i915: Annotate dma_fence waits
Okay!

Commit: drm/i915: annotate intel_atomic_commit_fence_wait
Okay!

Commit: HAX FOR CI: Enable cross-release
Okay!

Commit: Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (19 preceding siblings ...)
  2018-11-20 12:39 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-20 12:53 ` Patchwork
  2018-11-22 16:39 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev4) Patchwork
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-20 12:53 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev3)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5171 -> Patchwork_10859 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10859 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10859, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52167/revisions/3/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10859:

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_tiled_fence_blits@basic:
      fi-elk-e7500:       PASS -> DMESG-WARN
      fi-skl-6700k2:      PASS -> DMESG-WARN
      fi-cfl-guc:         PASS -> DMESG-WARN
      fi-skl-6700hq:      PASS -> DMESG-WARN
      fi-hsw-4770r:       PASS -> DMESG-WARN
      fi-kbl-x1275:       PASS -> DMESG-WARN
      fi-bdw-5557u:       PASS -> DMESG-WARN
      fi-glk-j4005:       PASS -> DMESG-WARN
      {fi-kbl-7567u}:     PASS -> DMESG-WARN
      fi-hsw-4770:        PASS -> DMESG-WARN
      {fi-kbl-7500u}:     PASS -> DMESG-WARN
      fi-whl-u:           PASS -> DMESG-WARN
      fi-icl-u2:          PASS -> DMESG-WARN
      fi-ivb-3770:        PASS -> DMESG-WARN
      fi-bxt-dsi:         PASS -> DMESG-WARN
      fi-skl-iommu:       PASS -> DMESG-WARN
      fi-skl-6770hq:      PASS -> DMESG-WARN
      fi-ilk-650:         PASS -> DMESG-WARN
      fi-kbl-r:           PASS -> DMESG-WARN
      fi-skl-guc:         PASS -> DMESG-WARN
      fi-kbl-guc:         PASS -> DMESG-WARN
      fi-skl-6600u:       PASS -> DMESG-WARN
      fi-cfl-8700k:       PASS -> DMESG-WARN

    igt@prime_vgem@basic-fence-flip:
      fi-blb-e6850:       PASS -> DMESG-WARN

    
== Known issues ==

  Here are the changes found in Patchwork_10859 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s3:
      fi-icl-u2:          PASS -> DMESG-WARN (fdo#107724)

    igt@gem_mmap_gtt@basic-small-bo-tiledy:
      fi-glk-dsi:         PASS -> INCOMPLETE (fdo#103359, k.org#198133)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-cfl-8109u:       PASS -> INCOMPLETE (fdo#106070, fdo#108126)

    
    ==== Possible fixes ====

    igt@gem_ctx_create@basic-files:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
  fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#108126 https://bugs.freedesktop.org/show_bug.cgi?id=108126
  k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133


== Participating hosts (48 -> 44) ==

  Additional (2): fi-kbl-7560u fi-gdg-551 
  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 


== Build changes ==

    * Linux: CI_DRM_5171 -> Patchwork_10859

  CI_DRM_5171: 84e7dbc23b35bf21bac105e72e0ba7023847f5ac @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4721: 68264891ceee34195839d82d4d87cbae08ef2431 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10859: a92325ed09f8cc6b5aacf1b6c2fe23978cf4e8ea @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

a92325ed09f8 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
4717d45fe1b6 HAX FOR CI: Enable cross-release
401b2d631fb5 drm/i915: annotate intel_atomic_commit_fence_wait
e60856ea5d1f drm/i915: Annotate dma_fence waits
dd811c8f1350 reservation: Annotate dma_fence waits
8dcf3bbce92f dma-fence: cross-release annotations
89c0437e66b9 mm, notifier: Add a lockdep map for invalidate_range_start
2b0ed181506c mm, notifier: Catch sleeping/blocking for !blockable
c48434bf624c mm: Check if mmu notifier callbacks are allowed to fail
5b3e8d1062cc kernel/lockdep: Make cross-release a config option
132a5d524bf5 lockdep: Remove GFP_NOLOCKDEP annotation
7a874678febd kthread: finer-grained lockdep/cross-release completion
a3b9f37357c8 locking/lockdep: restore cross-release checks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10859/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-20 10:58     ` Daniel Vetter
@ 2018-11-22 16:35       ` Daniel Vetter
  2018-11-23  8:53         ` Daniel Vetter
  0 siblings, 1 reply; 38+ messages in thread
From: Daniel Vetter @ 2018-11-22 16:35 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

v3: Try to chase this elusive stack trace corruption CI is seeing.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 kernel/locking/lockdep.c | 13 +++++++++++++
 lib/Kconfig.debug        |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index e74add63f317..d8937d05acc4 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4841,8 +4841,15 @@ static void add_xhlock(struct held_lock *hlock)
 	xhlock->trace.entries = xhlock->trace_entries;
 
 	if (crossrelease_fullstack) {
+		int i;
+
 		xhlock->trace.skip = 3;
 		save_stack_trace(&xhlock->trace);
+
+		for (i = 0; i < trace->nr_entries; i++) {
+			if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+				print_lockdep_off("BUG: list poison in add_xlock!");
+		}
 	} else {
 		xhlock->trace.nr_entries = 1;
 		xhlock->trace.entries[0] = hlock->acquire_ip;
@@ -4950,12 +4957,18 @@ static int copy_trace(struct stack_trace *trace)
 	unsigned long *buf = stack_trace + nr_stack_trace_entries;
 	unsigned int max_nr = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries;
 	unsigned int nr = min(max_nr, trace->nr_entries);
+	int i;
 
 	trace->nr_entries = nr;
 	memcpy(buf, trace->entries, nr * sizeof(trace->entries[0]));
 	trace->entries = buf;
 	nr_stack_trace_entries += nr;
 
+	for (i = 0; i < trace->nr_entries; i++) {
+		if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+			print_lockdep_off("BUG: list poison in copy_trace!");
+	}
+
 	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 		if (!debug_locks_off_graph_unlock())
 			return 0;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..8e1c30e3face 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1208,7 +1209,7 @@ config LOCKDEP_COMPLETIONS
 config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
 	bool "Enable the boot parameter, crossrelease_fullstack"
 	depends on LOCKDEP_CROSSRELEASE
-	default n
+	default y
 	help
 	 The lockdep "cross-release" feature needs to record stack traces
 	 (of calling functions) for all acquisitions, for eventual later
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev4)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (20 preceding siblings ...)
  2018-11-20 12:53 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2018-11-22 16:39 ` Patchwork
  2018-11-23  8:57 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev5) Patchwork
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-22 16:39 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev4)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

CALL    scripts/checksyscalls.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  CC      kernel/locking/lockdep.o
kernel/locking/lockdep.c: In function ‘add_xhlock’:
kernel/locking/lockdep.c:4849:19: error: ‘trace’ undeclared (first use in this function); did you mean ‘tracer’?
   for (i = 0; i < trace->nr_entries; i++) {
                   ^~~~~
                   tracer
kernel/locking/lockdep.c:4849:19: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:293: recipe for target 'kernel/locking/lockdep.o' failed
make[2]: *** [kernel/locking/lockdep.o] Error 1
scripts/Makefile.build:518: recipe for target 'kernel/locking' failed
make[1]: *** [kernel/locking] Error 2
Makefile:1060: recipe for target 'kernel' failed
make: *** [kernel] Error 2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-22 16:35       ` Daniel Vetter
@ 2018-11-23  8:53         ` Daniel Vetter
  2018-11-23 12:45           ` Daniel Vetter
  0 siblings, 1 reply; 38+ messages in thread
From: Daniel Vetter @ 2018-11-23  8:53 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

v3: Try to chase this elusive stack trace corruption CI is seeing.

v4: Make it compile. Silly me.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 kernel/locking/lockdep.c | 13 +++++++++++++
 lib/Kconfig.debug        |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index e74add63f317..1ceb97cc6ec0 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4841,8 +4841,15 @@ static void add_xhlock(struct held_lock *hlock)
 	xhlock->trace.entries = xhlock->trace_entries;
 
 	if (crossrelease_fullstack) {
+		int i;
+
 		xhlock->trace.skip = 3;
 		save_stack_trace(&xhlock->trace);
+
+		for (i = 0; i < xlock->trace.nr_entries; i++) {
+			if (xlock->trace.entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+				print_lockdep_off("BUG: list poison in add_xlock!");
+		}
 	} else {
 		xhlock->trace.nr_entries = 1;
 		xhlock->trace.entries[0] = hlock->acquire_ip;
@@ -4950,12 +4957,18 @@ static int copy_trace(struct stack_trace *trace)
 	unsigned long *buf = stack_trace + nr_stack_trace_entries;
 	unsigned int max_nr = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries;
 	unsigned int nr = min(max_nr, trace->nr_entries);
+	int i;
 
 	trace->nr_entries = nr;
 	memcpy(buf, trace->entries, nr * sizeof(trace->entries[0]));
 	trace->entries = buf;
 	nr_stack_trace_entries += nr;
 
+	for (i = 0; i < trace->nr_entries; i++) {
+		if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+			print_lockdep_off("BUG: list poison in copy_trace!");
+	}
+
 	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 		if (!debug_locks_off_graph_unlock())
 			return 0;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..8e1c30e3face 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1208,7 +1209,7 @@ config LOCKDEP_COMPLETIONS
 config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
 	bool "Enable the boot parameter, crossrelease_fullstack"
 	depends on LOCKDEP_CROSSRELEASE
-	default n
+	default y
 	help
 	 The lockdep "cross-release" feature needs to record stack traces
 	 (of calling functions) for all acquisitions, for eventual later
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev5)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (21 preceding siblings ...)
  2018-11-22 16:39 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev4) Patchwork
@ 2018-11-23  8:57 ` Patchwork
  2018-11-23 12:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6) Patchwork
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23  8:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev5)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

CALL    scripts/checksyscalls.sh
  DESCEND  objtool
  CHK     include/generated/compile.h
  CC      kernel/locking/lockdep.o
kernel/locking/lockdep.c: In function ‘add_xhlock’:
kernel/locking/lockdep.c:4849:19: error: ‘xlock’ undeclared (first use in this function); did you mean ‘xhlock’?
   for (i = 0; i < xlock->trace.nr_entries; i++) {
                   ^~~~~
                   xhlock
kernel/locking/lockdep.c:4849:19: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:293: recipe for target 'kernel/locking/lockdep.o' failed
make[2]: *** [kernel/locking/lockdep.o] Error 1
scripts/Makefile.build:518: recipe for target 'kernel/locking' failed
make[1]: *** [kernel/locking] Error 2
Makefile:1060: recipe for target 'kernel' failed
make: *** [kernel] Error 2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-23  8:53         ` Daniel Vetter
@ 2018-11-23 12:45           ` Daniel Vetter
  2018-11-23 13:24             ` Daniel Vetter
  0 siblings, 1 reply; 38+ messages in thread
From: Daniel Vetter @ 2018-11-23 12:45 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

v3: Try to chase this elusive stack trace corruption CI is seeing.

v4: Make it compile. Silly me.

v5: Even sillier me.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 kernel/locking/lockdep.c | 13 +++++++++++++
 lib/Kconfig.debug        |  3 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index e74add63f317..3fea5e0a1c12 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4841,8 +4841,15 @@ static void add_xhlock(struct held_lock *hlock)
 	xhlock->trace.entries = xhlock->trace_entries;
 
 	if (crossrelease_fullstack) {
+		int i;
+
 		xhlock->trace.skip = 3;
 		save_stack_trace(&xhlock->trace);
+
+		for (i = 0; i < xhlock->trace.nr_entries; i++) {
+			if (xhlock->trace.entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+				print_lockdep_off("BUG: list poison in add_xlock!");
+		}
 	} else {
 		xhlock->trace.nr_entries = 1;
 		xhlock->trace.entries[0] = hlock->acquire_ip;
@@ -4950,12 +4957,18 @@ static int copy_trace(struct stack_trace *trace)
 	unsigned long *buf = stack_trace + nr_stack_trace_entries;
 	unsigned int max_nr = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries;
 	unsigned int nr = min(max_nr, trace->nr_entries);
+	int i;
 
 	trace->nr_entries = nr;
 	memcpy(buf, trace->entries, nr * sizeof(trace->entries[0]));
 	trace->entries = buf;
 	nr_stack_trace_entries += nr;
 
+	for (i = 0; i < trace->nr_entries; i++) {
+		if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+			print_lockdep_off("BUG: list poison in copy_trace!");
+	}
+
 	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 		if (!debug_locks_off_graph_unlock())
 			return 0;
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..8e1c30e3face 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1208,7 +1209,7 @@ config LOCKDEP_COMPLETIONS
 config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
 	bool "Enable the boot parameter, crossrelease_fullstack"
 	depends on LOCKDEP_CROSSRELEASE
-	default n
+	default y
 	help
 	 The lockdep "cross-release" feature needs to record stack traces
 	 (of calling functions) for all acquisitions, for eventual later
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (22 preceding siblings ...)
  2018-11-23  8:57 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev5) Patchwork
@ 2018-11-23 12:51 ` Patchwork
  2018-11-23 12:57 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 12:51 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
e235509cc27d locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9: 
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")

-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'?
#645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered

-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'?
#817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important

-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'?
#840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#994: FILE: include/linux/completion.h:60:
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)

-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects?
#1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }

-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1109: FILE: include/linux/lockdep.h:305:
+	 * Seperate stack_trace data. This will be used at commit step.

-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1115: FILE: include/linux/lockdep.h:311:
+	 * Seperate hlock instance. This will be used at commit step.

-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1143: FILE: include/linux/lockdep.h:339:
+	 * Seperate hlock instance. This will be used at commit step.

-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,

-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);

-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);

-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);

-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);

-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);

-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);

-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1309: FILE: kernel/locking/lockdep.c:1158:
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");

-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1310: FILE: kernel/locking/lockdep.c:1159:
+		printk("       CPU0                    CPU1\n");

-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1311: FILE: kernel/locking/lockdep.c:1160:
+		printk("       ----                    ----\n");

-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1312: FILE: kernel/locking/lockdep.c:1161:
+		printk("  lock(");

-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1315: FILE: kernel/locking/lockdep.c:1164:
+		printk("  lock(");

-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1318: FILE: kernel/locking/lockdep.c:1167:
+		printk("                               lock(");

-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1321: FILE: kernel/locking/lockdep.c:1170:
+		printk("                               unlock(");

-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1324: FILE: kernel/locking/lockdep.c:1173:
+		printk("\n *** DEADLOCK ***\n\n");

-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1326: FILE: kernel/locking/lockdep.c:1175:
+		printk(" Possible unsafe locking scenario:\n\n");

-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1327: FILE: kernel/locking/lockdep.c:1176:
+		printk("       CPU0                    CPU1\n");

-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1328: FILE: kernel/locking/lockdep.c:1177:
+		printk("       ----                    ----\n");

-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1329: FILE: kernel/locking/lockdep.c:1178:
+		printk("  lock(");

-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1332: FILE: kernel/locking/lockdep.c:1181:
+		printk("                               lock(");

-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1335: FILE: kernel/locking/lockdep.c:1184:
+		printk("                               lock(");

-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1338: FILE: kernel/locking/lockdep.c:1187:
+		printk("  lock(");

-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1341: FILE: kernel/locking/lockdep.c:1190:
+		printk("\n *** DEADLOCK ***\n\n");

-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV)
#1477: FILE: kernel/locking/lockdep.c:2260:
+		chain_hlocks[chain->base + 1] = next -1;
 		                                     ^

-:1483: CHECK:BRACES: Unbalanced braces around else statement
#1483: FILE: kernel/locking/lockdep.c:2266:
+	else {

-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)

-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#1899: FILE: kernel/locking/lockdep.c:4959:
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 	                                                     ^

-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1926: FILE: kernel/locking/lockdep.c:4986:
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))

-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...)
#2061: FILE: kernel/locking/lockdep.c:5121:
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,

-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'?
#2069: FILE: kernel/locking/lockdep.c:5129:
+		/* Diable crossrelease for current */

-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 42 warnings, 17 checks, 2023 lines checked
caa7b234f31c kthread: finer-grained lockdep/cross-release completion
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,

-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#139: FILE: kernel/kthread.c:234:
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",

-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#139: FILE: kernel/kthread.c:234:
+			"(kthread completion)->exited",

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: kernel/kthread.c:238:
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",

-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#143: FILE: kernel/kthread.c:238:
+			"(kthread completion)->parked",

-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,

-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 6 checks, 240 lines checked
47a9e9b52423 lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")'
#6: 
This was originally added in 7e7844226f10 ("lockdep: allow to disable

-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 32 lines checked
2065c3b5b5d1 kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 42 lines checked
7dc515ff5de7 mm: Check if mmu notifier callbacks are allowed to fail
-:31: ERROR:SPACING: space required after that ',' (ctx:VxV)
#31: FILE: mm/mmu_notifier.c:193:
+				WARN(blockable,"%pS callback failure not allowed\n",
 				              ^

-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 8 lines checked
d400e340bc24 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
8b4975cd404d mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
883f734afb36 dma-fence: cross-release annotations
-:40: CHECK:LINE_SPACING: Please don't use multiple blank lines
#40: FILE: drivers/dma-buf/dma-fence.c:33:
 
+

-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)

-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)

-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 3 checks, 78 lines checked
74cd52cecbee reservation: Annotate dma_fence waits
f9c0eb2bc9a6 drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#14: 
creating a dma_fence_signal_opportunistic, which doesnt have the

-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 39 lines checked
570047a86294 drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
8c30c6f2c5d7 HAX FOR CI: Enable cross-release
-:52: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'copy_trace', this function's name, in a string
#52: FILE: kernel/locking/lockdep.c:4969:
+			print_lockdep_off("BUG: list poison in copy_trace!");

-:78: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 48 lines checked
dd76ab83bbae Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
-:96: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 52 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (23 preceding siblings ...)
  2018-11-23 12:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6) Patchwork
@ 2018-11-23 12:57 ` Patchwork
  2018-11-23 13:08 ` ✗ Fi.CI.BAT: failure " Patchwork
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 12:57 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: locking/lockdep: restore cross-release checks
+
+Error in reading or end of file.

Commit: kthread: finer-grained lockdep/cross-release completion
Okay!

Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!

Commit: kernel/lockdep: Make cross-release a config option
Okay!

Commit: mm: Check if mmu notifier callbacks are allowed to fail
Okay!

Commit: mm, notifier: Catch sleeping/blocking for !blockable
Okay!

Commit: mm, notifier: Add a lockdep map for invalidate_range_start
Okay!

Commit: dma-fence: cross-release annotations
Okay!

Commit: reservation: Annotate dma_fence waits
Okay!

Commit: drm/i915: Annotate dma_fence waits
Okay!

Commit: drm/i915: annotate intel_atomic_commit_fence_wait
Okay!

Commit: HAX FOR CI: Enable cross-release
Okay!

Commit: Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (24 preceding siblings ...)
  2018-11-23 12:57 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-23 13:08 ` Patchwork
  2018-11-23 13:55 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7) Patchwork
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 13:08 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev6)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5194 -> Patchwork_10895 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10895 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10895, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52167/revisions/6/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10895:

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_tiled_fence_blits@basic:
      fi-apl-guc:         PASS -> DMESG-WARN
      fi-elk-e7500:       PASS -> DMESG-WARN
      fi-cfl-guc:         PASS -> DMESG-WARN
      fi-kbl-x1275:       PASS -> DMESG-WARN
      fi-glk-dsi:         PASS -> DMESG-WARN
      fi-glk-j4005:       PASS -> DMESG-WARN
      fi-hsw-4770:        PASS -> DMESG-WARN
      {fi-kbl-7500u}:     PASS -> DMESG-WARN
      fi-whl-u:           PASS -> DMESG-WARN
      fi-ivb-3770:        PASS -> DMESG-WARN
      fi-bxt-dsi:         PASS -> DMESG-WARN
      fi-skl-iommu:       PASS -> DMESG-WARN
      fi-ilk-650:         PASS -> DMESG-WARN
      fi-skl-guc:         PASS -> DMESG-WARN
      fi-kbl-guc:         PASS -> DMESG-WARN
      fi-skl-6600u:       PASS -> DMESG-WARN
      fi-cfl-8700k:       PASS -> DMESG-WARN

    igt@prime_vgem@basic-fence-flip:
      fi-blb-e6850:       PASS -> DMESG-WARN

    {igt@runner@aborted}:
      fi-ilk-650:         NOTRUN -> FAIL
      fi-glk-dsi:         NOTRUN -> FAIL
      fi-hsw-4770:        NOTRUN -> FAIL
      {fi-kbl-7500u}:     NOTRUN -> FAIL
      fi-whl-u:           NOTRUN -> FAIL
      fi-ivb-3770:        NOTRUN -> FAIL
      fi-bxt-dsi:         NOTRUN -> FAIL
      fi-skl-iommu:       NOTRUN -> FAIL
      fi-cfl-guc:         NOTRUN -> FAIL
      fi-glk-j4005:       NOTRUN -> FAIL
      fi-skl-guc:         NOTRUN -> FAIL
      fi-kbl-x1275:       NOTRUN -> FAIL
      fi-cfl-8700k:       NOTRUN -> FAIL
      fi-skl-6600u:       NOTRUN -> FAIL
      fi-apl-guc:         NOTRUN -> FAIL
      fi-kbl-guc:         NOTRUN -> FAIL
      fi-elk-e7500:       NOTRUN -> FAIL

    
== Known issues ==

  Here are the changes found in Patchwork_10895 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_create@basic-files:
      fi-bsw-kefka:       PASS -> INCOMPLETE (fdo#108714)

    igt@gem_ctx_switch@basic-default-heavy:
      fi-icl-u2:          PASS -> DMESG-WARN (fdo#107724)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@i915_module_load@reload:
      fi-blb-e6850:       INCOMPLETE (fdo#107718) -> PASS

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       DMESG-WARN (fdo#102614) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#108714 https://bugs.freedesktop.org/show_bug.cgi?id=108714


== Participating hosts (48 -> 38) ==

  Missing    (10): fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-cfl-8109u fi-icl-u3 fi-kbl-8809g fi-icl-y fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_5194 -> Patchwork_10895

  CI_DRM_5194: 59472c09fbb08ec6d312690b23057064d34069eb @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4725: 9dc7c41d1c600133d6e3e63f1941c2e75d23bd3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10895: dd76ab83bbae411e50ad6f807769404e841af157 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

dd76ab83bbae Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
8c30c6f2c5d7 HAX FOR CI: Enable cross-release
570047a86294 drm/i915: annotate intel_atomic_commit_fence_wait
f9c0eb2bc9a6 drm/i915: Annotate dma_fence waits
74cd52cecbee reservation: Annotate dma_fence waits
883f734afb36 dma-fence: cross-release annotations
8b4975cd404d mm, notifier: Add a lockdep map for invalidate_range_start
d400e340bc24 mm, notifier: Catch sleeping/blocking for !blockable
7dc515ff5de7 mm: Check if mmu notifier callbacks are allowed to fail
2065c3b5b5d1 kernel/lockdep: Make cross-release a config option
47a9e9b52423 lockdep: Remove GFP_NOLOCKDEP annotation
caa7b234f31c kthread: finer-grained lockdep/cross-release completion
e235509cc27d locking/lockdep: restore cross-release checks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10895/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH] HAX FOR CI: Enable cross-release
  2018-11-23 12:45           ` Daniel Vetter
@ 2018-11-23 13:24             ` Daniel Vetter
  0 siblings, 0 replies; 38+ messages in thread
From: Daniel Vetter @ 2018-11-23 13:24 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Only way to convince our CI to enable stuff that's new and defaulting
to off. Obviously not for merging.

v2: Also enable fullstack backtraces.

v3: Try to chase this elusive stack trace corruption CI is seeing.

v4: Make it compile. Silly me.

v5: Even sillier me.

v6: Still confused.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 kernel/locking/lockdep.c | 13 +++++++++++++
 kernel/stacktrace.c      |  6 ++++++
 lib/Kconfig.debug        |  3 ++-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index e74add63f317..3fea5e0a1c12 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4841,8 +4841,15 @@ static void add_xhlock(struct held_lock *hlock)
 	xhlock->trace.entries = xhlock->trace_entries;
 
 	if (crossrelease_fullstack) {
+		int i;
+
 		xhlock->trace.skip = 3;
 		save_stack_trace(&xhlock->trace);
+
+		for (i = 0; i < xhlock->trace.nr_entries; i++) {
+			if (xhlock->trace.entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+				print_lockdep_off("BUG: list poison in add_xlock!");
+		}
 	} else {
 		xhlock->trace.nr_entries = 1;
 		xhlock->trace.entries[0] = hlock->acquire_ip;
@@ -4950,12 +4957,18 @@ static int copy_trace(struct stack_trace *trace)
 	unsigned long *buf = stack_trace + nr_stack_trace_entries;
 	unsigned int max_nr = MAX_STACK_TRACE_ENTRIES - nr_stack_trace_entries;
 	unsigned int nr = min(max_nr, trace->nr_entries);
+	int i;
 
 	trace->nr_entries = nr;
 	memcpy(buf, trace->entries, nr * sizeof(trace->entries[0]));
 	trace->entries = buf;
 	nr_stack_trace_entries += nr;
 
+	for (i = 0; i < trace->nr_entries; i++) {
+		if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+			print_lockdep_off("BUG: list poison in copy_trace!");
+	}
+
 	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 		if (!debug_locks_off_graph_unlock())
 			return 0;
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index f8edee9c792d..b66d60cc6bfa 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -20,6 +20,12 @@ void print_stack_trace(struct stack_trace *trace, int spaces)
 
 	for (i = 0; i < trace->nr_entries; i++)
 		printk("%*c%pS\n", 1 + spaces, ' ', (void *)trace->entries[i]);
+
+	for (i = 0; i < trace->nr_entries; i++) {
+		if (trace->entries[i] == 0x6b6b6b6b6b6b6b6bUL)
+			printk("BUG: list poison in print_trace!");
+	}
+
 }
 EXPORT_SYMBOL_GPL(print_stack_trace);
 
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6074fa3463ac..8e1c30e3face 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1095,6 +1095,7 @@ config LOCKDEP_CROSSRELEASE
 	bool "Enable cross-release checking"
 	depends on PROVE_LOCKING
 	select LOCKDEP_COMPLETIONS
+	default y
 	help
 	 This makes lockdep work for crosslock which is a lock allowed to
 	 be released in a different context from the acquisition context.
@@ -1208,7 +1209,7 @@ config LOCKDEP_COMPLETIONS
 config BOOTPARAM_LOCKDEP_CROSSRELEASE_FULLSTACK
 	bool "Enable the boot parameter, crossrelease_fullstack"
 	depends on LOCKDEP_CROSSRELEASE
-	default n
+	default y
 	help
 	 The lockdep "cross-release" feature needs to record stack traces
 	 (of calling functions) for all acquisitions, for eventual later
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (25 preceding siblings ...)
  2018-11-23 13:08 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2018-11-23 13:55 ` Patchwork
  2018-11-23 14:01 ` ✗ Fi.CI.SPARSE: " Patchwork
  2018-11-23 14:12 ` ✗ Fi.CI.BAT: failure " Patchwork
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 13:55 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
0449bd050c17 locking/lockdep: restore cross-release checks
-:9: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#9: 
commit dba04eb76df9 ("locking/Documentation: Remove stale crossrelease_fullstack parameter")

-:69: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#69: 
new file mode 100644

-:645: WARNING:TYPO_SPELLING: 'prefered' may be misspelled - perhaps 'preferred'?
#645: FILE: Documentation/locking/crossrelease.txt:572:
+deadlock or its possibility sooner. So the former way would be prefered

-:817: WARNING:TYPO_SPELLING: 'implmentation' may be misspelled - perhaps 'implementation'?
#817: FILE: Documentation/locking/crossrelease.txt:744:
+like how lockdep handles held_locks. Lockless implmentation is important

-:840: WARNING:TYPO_SPELLING: 'occured' may be misspelled - perhaps 'occurred'?
#840: FILE: Documentation/locking/crossrelease.txt:767:
+that it has not occured yet, lockdep should consider all possible

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:987: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'm' - possible side-effects?
#987: FILE: include/linux/completion.h:53:
+#define init_completion_map(x, m)					\
+do {									\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			(m)->name, (m)->key, 0);				\
+	__init_completion(x);						\
+} while (0)

-:994: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects?
#994: FILE: include/linux/completion.h:60:
+#define init_completion(x)						\
+do {									\
+	static struct lock_class_key __key;				\
+	lockdep_init_map_crosslock((struct lockdep_map *)&(x)->map,	\
+			"(completion)" #x,				\
+			&__key, 0);					\
+	__init_completion(x);						\
+} while (0)

-:1011: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'work' - possible side-effects?
#1011: FILE: include/linux/completion.h:77:
+#define COMPLETION_INITIALIZER(work) \
+	{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait), \
+	STATIC_CROSS_LOCKDEP_MAP_INIT("(completion)" #work, &(work)) }

-:1109: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1109: FILE: include/linux/lockdep.h:305:
+	 * Seperate stack_trace data. This will be used at commit step.

-:1115: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1115: FILE: include/linux/lockdep.h:311:
+	 * Seperate hlock instance. This will be used at commit step.

-:1143: WARNING:TYPO_SPELLING: 'Seperate' may be misspelled - perhaps 'Separate'?
#1143: FILE: include/linux/lockdep.h:339:
+	 * Seperate hlock instance. This will be used at commit step.

-:1166: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1166: FILE: include/linux/lockdep.h:556:
+extern void lockdep_init_map_crosslock(struct lockdep_map *lock,

-:1170: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1170: FILE: include/linux/lockdep.h:560:
+extern void lock_commit_crosslock(struct lockdep_map *lock);

-:1190: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1190: FILE: include/linux/lockdep.h:580:
+extern void crossrelease_hist_start(enum xhlock_context_t c);

-:1191: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1191: FILE: include/linux/lockdep.h:581:
+extern void crossrelease_hist_end(enum xhlock_context_t c);

-:1192: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1192: FILE: include/linux/lockdep.h:582:
+extern void lockdep_invariant_state(bool force);

-:1193: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1193: FILE: include/linux/lockdep.h:583:
+extern void lockdep_init_task(struct task_struct *task);

-:1194: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files
#1194: FILE: include/linux/lockdep.h:584:
+extern void lockdep_free_task(struct task_struct *task);

-:1309: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1309: FILE: kernel/locking/lockdep.c:1158:
+		printk(" Possible unsafe locking scenario by crosslock:\n\n");

-:1310: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1310: FILE: kernel/locking/lockdep.c:1159:
+		printk("       CPU0                    CPU1\n");

-:1311: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1311: FILE: kernel/locking/lockdep.c:1160:
+		printk("       ----                    ----\n");

-:1312: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1312: FILE: kernel/locking/lockdep.c:1161:
+		printk("  lock(");

-:1314: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1314: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1314: FILE: kernel/locking/lockdep.c:1163:
+		printk(KERN_CONT ");\n");

-:1315: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1315: FILE: kernel/locking/lockdep.c:1164:
+		printk("  lock(");

-:1317: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1317: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1317: FILE: kernel/locking/lockdep.c:1166:
+		printk(KERN_CONT ");\n");

-:1318: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1318: FILE: kernel/locking/lockdep.c:1167:
+		printk("                               lock(");

-:1320: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1320: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1320: FILE: kernel/locking/lockdep.c:1169:
+		printk(KERN_CONT ");\n");

-:1321: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1321: FILE: kernel/locking/lockdep.c:1170:
+		printk("                               unlock(");

-:1323: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1323: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1323: FILE: kernel/locking/lockdep.c:1172:
+		printk(KERN_CONT ");\n");

-:1324: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1324: FILE: kernel/locking/lockdep.c:1173:
+		printk("\n *** DEADLOCK ***\n\n");

-:1326: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1326: FILE: kernel/locking/lockdep.c:1175:
+		printk(" Possible unsafe locking scenario:\n\n");

-:1327: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1327: FILE: kernel/locking/lockdep.c:1176:
+		printk("       CPU0                    CPU1\n");

-:1328: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1328: FILE: kernel/locking/lockdep.c:1177:
+		printk("       ----                    ----\n");

-:1329: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1329: FILE: kernel/locking/lockdep.c:1178:
+		printk("  lock(");

-:1331: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1331: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1331: FILE: kernel/locking/lockdep.c:1180:
+		printk(KERN_CONT ");\n");

-:1332: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1332: FILE: kernel/locking/lockdep.c:1181:
+		printk("                               lock(");

-:1334: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1334: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1334: FILE: kernel/locking/lockdep.c:1183:
+		printk(KERN_CONT ");\n");

-:1335: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1335: FILE: kernel/locking/lockdep.c:1184:
+		printk("                               lock(");

-:1337: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1337: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1337: FILE: kernel/locking/lockdep.c:1186:
+		printk(KERN_CONT ");\n");

-:1338: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1338: FILE: kernel/locking/lockdep.c:1187:
+		printk("  lock(");

-:1340: WARNING:PREFER_PR_LEVEL: Prefer [subsystem eg: netdev]_cont([subsystem]dev, ... then dev_cont(dev, ... then pr_cont(...  to printk(KERN_CONT ...
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1340: WARNING:LOGGING_CONTINUATION: Avoid logging continuation uses where feasible
#1340: FILE: kernel/locking/lockdep.c:1189:
+		printk(KERN_CONT ");\n");

-:1341: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#1341: FILE: kernel/locking/lockdep.c:1190:
+		printk("\n *** DEADLOCK ***\n\n");

-:1477: CHECK:SPACING: spaces preferred around that '-' (ctx:WxV)
#1477: FILE: kernel/locking/lockdep.c:2260:
+		chain_hlocks[chain->base + 1] = next -1;
 		                                     ^

-:1483: CHECK:BRACES: Unbalanced braces around else statement
#1483: FILE: kernel/locking/lockdep.c:2266:
+	else {

-:1514: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1514: FILE: kernel/locking/lockdep.c:3289:
+void lockdep_init_map_crosslock(struct lockdep_map *lock, const char *name,
+		      struct lock_class_key *key, int subclass)

-:1899: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#1899: FILE: kernel/locking/lockdep.c:4959:
+	if (nr_stack_trace_entries >= MAX_STACK_TRACE_ENTRIES-1) {
 	                                                     ^

-:1926: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#1926: FILE: kernel/locking/lockdep.c:4986:
+	if (!add_chain_cache_classes(xid, pid, xhlock->hlock.irq_context,
+				chain_key))

-:2061: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*task->xhlocks)...) over kzalloc(sizeof(struct hist_lock)...)
#2061: FILE: kernel/locking/lockdep.c:5121:
+	task->xhlocks = kzalloc(sizeof(struct hist_lock) * MAX_XHLOCKS_NR,

-:2069: WARNING:TYPO_SPELLING: 'Diable' may be misspelled - perhaps 'Disable'?
#2069: FILE: kernel/locking/lockdep.c:5129:
+		/* Diable crossrelease for current */

-:2141: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 42 warnings, 17 checks, 2023 lines checked
e41dae845069 kthread: finer-grained lockdep/cross-release completion
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: include/linux/kthread.h:11:
+struct task_struct *_kthread_create_on_node(int (*threadfn)(void *data),
 					   void *data,

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: include/linux/kthread.h:39:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data,

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: include/linux/kthread.h:206:
+_kthread_create_worker_on_cpu(int cpu, unsigned int flags,
+		       struct lock_class_key *exited_key,

-:139: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#139: FILE: kernel/kthread.c:234:
+	lockdep_init_map_crosslock(&self->exited.map.map,
+			"(kthread completion)->exited",

-:139: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#139: FILE: kernel/kthread.c:234:
+			"(kthread completion)->exited",

-:143: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#143: FILE: kernel/kthread.c:238:
+	lockdep_init_map_crosslock(&self->parked.map.map,
+			"(kthread completion)->parked",

-:143: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'kthread', this function's name, in a string
#143: FILE: kernel/kthread.c:238:
+			"(kthread completion)->parked",

-:209: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#209: FILE: kernel/kthread.c:454:
+struct task_struct *_kthread_create_on_cpu(int (*threadfn)(void *data),
 					  void *data, unsigned int cpu,

-:297: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 6 checks, 240 lines checked
0e61dc89b9d4 lockdep: Remove GFP_NOLOCKDEP annotation
-:6: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 7e7844226f10 ("lockdep: allow to disable reclaim lockup detection")'
#6: 
This was originally added in 7e7844226f10 ("lockdep: allow to disable

-:70: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 32 lines checked
5e33a73d37ce kernel/lockdep: Make cross-release a config option
-:74: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 42 lines checked
3cfce1971136 mm: Check if mmu notifier callbacks are allowed to fail
-:31: ERROR:SPACING: space required after that ',' (ctx:VxV)
#31: FILE: mm/mmu_notifier.c:193:
+				WARN(blockable,"%pS callback failure not allowed\n",
 				              ^

-:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 1 errors, 1 warnings, 0 checks, 8 lines checked
ae78d029fb92 mm, notifier: Catch sleeping/blocking for !blockable
-:44: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
2a288a5aa876 mm, notifier: Add a lockdep map for invalidate_range_start
-:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 34 lines checked
c1921f8ad940 dma-fence: cross-release annotations
-:40: CHECK:LINE_SPACING: Please don't use multiple blank lines
#40: FILE: drivers/dma-buf/dma-fence.c:33:
 
+

-:100: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#100: FILE: include/linux/dma-fence.h:45:
+}
+static inline void dma_fence_wait_release(void)

-:104: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#104: FILE: include/linux/dma-fence.h:49:
+}
+static inline void dma_fence_wait_release_commit(void)

-:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 3 checks, 78 lines checked
58bb1f3ee989 reservation: Annotate dma_fence waits
697082174040 drm/i915: Annotate dma_fence waits
-:14: WARNING:TYPO_SPELLING: 'doesnt' may be misspelled - perhaps 'doesn't'?
#14: 
creating a dma_fence_signal_opportunistic, which doesnt have the

-:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 2 warnings, 0 checks, 39 lines checked
06397e4e6592 drm/i915: annotate intel_atomic_commit_fence_wait
-:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 14 lines checked
0c81db8403c2 HAX FOR CI: Enable cross-release
-:54: WARNING:EMBEDDED_FUNCTION_NAME: Prefer using '"%s...", __func__' to using 'copy_trace', this function's name, in a string
#54: FILE: kernel/locking/lockdep.c:4969:
+			print_lockdep_off("BUG: list poison in copy_trace!");

-:71: WARNING:PRINTK_WITHOUT_KERN_LEVEL: printk() should include KERN_<LEVEL> facility level
#71: FILE: kernel/stacktrace.c:26:
+			printk("BUG: list poison in print_trace!");

-:97: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 3 warnings, 0 checks, 60 lines checked
0a2238307a58 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
-:96: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter <daniel.vetter@ffwll.ch>'

total: 0 errors, 1 warnings, 0 checks, 52 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.SPARSE: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (26 preceding siblings ...)
  2018-11-23 13:55 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7) Patchwork
@ 2018-11-23 14:01 ` Patchwork
  2018-11-23 14:12 ` ✗ Fi.CI.BAT: failure " Patchwork
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 14:01 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
URL   : https://patchwork.freedesktop.org/series/52167/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: locking/lockdep: restore cross-release checks
+
+Error in reading or end of file.

Commit: kthread: finer-grained lockdep/cross-release completion
Okay!

Commit: lockdep: Remove GFP_NOLOCKDEP annotation
Okay!

Commit: kernel/lockdep: Make cross-release a config option
Okay!

Commit: mm: Check if mmu notifier callbacks are allowed to fail
Okay!

Commit: mm, notifier: Catch sleeping/blocking for !blockable
Okay!

Commit: mm, notifier: Add a lockdep map for invalidate_range_start
Okay!

Commit: dma-fence: cross-release annotations
Okay!

Commit: reservation: Annotate dma_fence waits
Okay!

Commit: drm/i915: Annotate dma_fence waits
Okay!

Commit: drm/i915: annotate intel_atomic_commit_fence_wait
Okay!

Commit: HAX FOR CI: Enable cross-release
Okay!

Commit: Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
Okay!

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

* ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
  2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
                   ` (27 preceding siblings ...)
  2018-11-23 14:01 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-11-23 14:12 ` Patchwork
  28 siblings, 0 replies; 38+ messages in thread
From: Patchwork @ 2018-11-23 14:12 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

== Series Details ==

Series: series starting with [01/13] locking/lockdep: restore cross-release checks (rev7)
URL   : https://patchwork.freedesktop.org/series/52167/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_5195 -> Patchwork_10897 =

== Summary - FAILURE ==

  Serious unknown changes coming with Patchwork_10897 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10897, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52167/revisions/7/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10897:

  === IGT changes ===

    ==== Possible regressions ====

    igt@gem_tiled_fence_blits@basic:
      fi-apl-guc:         PASS -> DMESG-WARN
      fi-elk-e7500:       PASS -> DMESG-WARN
      fi-cfl-guc:         PASS -> DMESG-WARN
      fi-skl-6700hq:      NOTRUN -> DMESG-WARN
      fi-hsw-4770r:       PASS -> DMESG-WARN
      fi-kbl-x1275:       PASS -> DMESG-WARN
      fi-glk-dsi:         PASS -> DMESG-WARN
      fi-glk-j4005:       PASS -> DMESG-WARN
      {fi-kbl-7567u}:     PASS -> DMESG-WARN
      fi-hsw-4770:        PASS -> DMESG-WARN
      {fi-kbl-7500u}:     PASS -> DMESG-WARN
      fi-whl-u:           PASS -> DMESG-WARN
      fi-ivb-3770:        PASS -> DMESG-WARN
      fi-bxt-dsi:         PASS -> DMESG-WARN
      fi-skl-iommu:       PASS -> DMESG-WARN
      fi-skl-6770hq:      PASS -> DMESG-WARN
      fi-ilk-650:         PASS -> DMESG-WARN
      fi-cfl-8109u:       PASS -> DMESG-WARN
      fi-skl-guc:         PASS -> DMESG-WARN
      fi-kbl-guc:         PASS -> DMESG-WARN
      fi-skl-6600u:       PASS -> DMESG-WARN
      fi-kbl-7560u:       PASS -> DMESG-WARN

    igt@prime_vgem@basic-fence-flip:
      fi-blb-e6850:       PASS -> DMESG-WARN

    {igt@runner@aborted}:
      fi-ilk-650:         NOTRUN -> FAIL
      fi-cfl-8109u:       NOTRUN -> FAIL
      fi-glk-dsi:         NOTRUN -> FAIL
      fi-hsw-4770:        NOTRUN -> FAIL
      {fi-kbl-7500u}:     NOTRUN -> FAIL
      fi-skl-6700hq:      NOTRUN -> FAIL
      fi-whl-u:           NOTRUN -> FAIL
      fi-ivb-3770:        NOTRUN -> FAIL
      fi-kbl-7560u:       NOTRUN -> FAIL
      fi-bxt-dsi:         NOTRUN -> FAIL
      fi-skl-iommu:       NOTRUN -> FAIL
      fi-cfl-guc:         NOTRUN -> FAIL
      fi-glk-j4005:       NOTRUN -> FAIL
      {fi-kbl-7567u}:     NOTRUN -> FAIL
      fi-skl-guc:         NOTRUN -> FAIL
      fi-kbl-x1275:       NOTRUN -> FAIL
      fi-hsw-4770r:       NOTRUN -> FAIL
      fi-skl-6600u:       NOTRUN -> FAIL
      fi-apl-guc:         NOTRUN -> FAIL
      fi-skl-6770hq:      NOTRUN -> FAIL
      fi-kbl-guc:         NOTRUN -> FAIL
      fi-elk-e7500:       NOTRUN -> FAIL

    
== Known issues ==

  Here are the changes found in Patchwork_10897 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_ctx_switch@basic-default-heavy:
      fi-icl-u2:          PASS -> DMESG-WARN (fdo#107724)

    igt@gem_exec_suspend@basic-s3:
      fi-skl-6700k2:      PASS -> INCOMPLETE (fdo#105524, fdo#104108, k.org#199541, fdo#107773)

    igt@prime_vgem@basic-fence-flip:
      fi-bdw-gvtdvm:      PASS -> FAIL (fdo#103182)

    
    ==== Possible fixes ====

    igt@gem_ctx_switch@basic-default:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@i915_selftest@live_coherency:
      fi-gdg-551:         DMESG-FAIL (fdo#107164) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     FAIL (fdo#103191, fdo#107362) -> PASS

    
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  fdo#103182 https://bugs.freedesktop.org/show_bug.cgi?id=103182
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
  fdo#105524 https://bugs.freedesktop.org/show_bug.cgi?id=105524
  fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
  fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724
  fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
  k.org#199541 https://bugzilla.kernel.org/show_bug.cgi?id=199541


== Participating hosts (46 -> 41) ==

  Additional (1): fi-skl-6700hq 
  Missing    (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 


== Build changes ==

    * Linux: CI_DRM_5195 -> Patchwork_10897

  CI_DRM_5195: b6df470d38bf4580c00e3f5008d795ec2a901066 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4725: 9dc7c41d1c600133d6e3e63f1941c2e75d23bd3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10897: 0a2238307a58d2a8ea5ce080def35469365b8cc1 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

0a2238307a58 Revert "locking/lockdep, cpu/hotplug: Annotate AP thread"
0c81db8403c2 HAX FOR CI: Enable cross-release
06397e4e6592 drm/i915: annotate intel_atomic_commit_fence_wait
697082174040 drm/i915: Annotate dma_fence waits
58bb1f3ee989 reservation: Annotate dma_fence waits
c1921f8ad940 dma-fence: cross-release annotations
2a288a5aa876 mm, notifier: Add a lockdep map for invalidate_range_start
ae78d029fb92 mm, notifier: Catch sleeping/blocking for !blockable
3cfce1971136 mm: Check if mmu notifier callbacks are allowed to fail
5e33a73d37ce kernel/lockdep: Make cross-release a config option
0e61dc89b9d4 lockdep: Remove GFP_NOLOCKDEP annotation
e41dae845069 kthread: finer-grained lockdep/cross-release completion
0449bd050c17 locking/lockdep: restore cross-release checks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10897/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-11-23 14:12 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 15:30 [PATCH 01/13] locking/lockdep: restore cross-release checks Daniel Vetter
2018-11-07 15:30 ` [PATCH 02/13] kthread: finer-grained lockdep/cross-release completion Daniel Vetter
2018-11-07 15:30 ` [PATCH 03/13] lockdep: Remove GFP_NOLOCKDEP annotation Daniel Vetter
2018-11-07 15:30 ` [PATCH 04/13] kernel/lockdep: Make cross-release a config option Daniel Vetter
2018-11-07 15:30 ` [PATCH 05/13] mm: Check if mmu notifier callbacks are allowed to fail Daniel Vetter
2018-11-07 15:30 ` [PATCH 06/13] mm, notifier: Catch sleeping/blocking for !blockable Daniel Vetter
2018-11-07 15:30 ` [PATCH 07/13] mm, notifier: Add a lockdep map for invalidate_range_start Daniel Vetter
2018-11-07 15:30 ` [PATCH 08/13] dma-fence: cross-release annotations Daniel Vetter
2018-11-07 15:30 ` [PATCH 09/13] reservation: Annotate dma_fence waits Daniel Vetter
2018-11-07 15:30 ` [PATCH 10/13] drm/i915: " Daniel Vetter
2018-11-07 15:30 ` [PATCH 11/13] drm/i915: annotate intel_atomic_commit_fence_wait Daniel Vetter
2018-11-07 15:30 ` [PATCH 12/13] HAX FOR CI: Enable cross-release Daniel Vetter
2018-11-08  9:31   ` [PATCH] " Daniel Vetter
2018-11-08  9:41     ` Chris Wilson
2018-11-20 11:00       ` Daniel Vetter
2018-11-20 10:58     ` Daniel Vetter
2018-11-22 16:35       ` Daniel Vetter
2018-11-23  8:53         ` Daniel Vetter
2018-11-23 12:45           ` Daniel Vetter
2018-11-23 13:24             ` Daniel Vetter
2018-11-07 15:30 ` [PATCH 13/13] Revert "locking/lockdep, cpu/hotplug: Annotate AP thread" Daniel Vetter
2018-11-07 16:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks Patchwork
2018-11-07 16:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-07 17:07 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-08 10:04 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev2) Patchwork
2018-11-08 10:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-08 10:21 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-20 12:33 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev3) Patchwork
2018-11-20 12:39 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-20 12:53 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-22 16:39 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev4) Patchwork
2018-11-23  8:57 ` ✗ Fi.CI.BAT: failure for series starting with [01/13] locking/lockdep: restore cross-release checks (rev5) Patchwork
2018-11-23 12:51 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev6) Patchwork
2018-11-23 12:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-23 13:08 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-23 13:55 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/13] locking/lockdep: restore cross-release checks (rev7) Patchwork
2018-11-23 14:01 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-23 14:12 ` ✗ Fi.CI.BAT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.