summaryrefslogtreecommitdiff
path: root/include/linux/lockdep_types.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-04-25 17:03:13 +0200
committerPeter Zijlstra <peterz@infradead.org>2023-05-02 14:48:14 +0200
commit0cce06ba859a515bd06224085d3addb870608b6d (patch)
tree46e8a34c4176ce2ddaf65cf74c4acecb7fb1ac75 /include/linux/lockdep_types.h
parent0af462f19e635ad522f28981238334620881badc (diff)
debugobjects,locking: Annotate debug_object_fill_pool() wait type violation
There is an explicit wait-type violation in debug_object_fill_pool() for PREEMPT_RT=n kernels which allows them to more easily fill the object pool and reduce the chance of allocation failures. Lockdep's wait-type checks are designed to check the PREEMPT_RT locking rules even for PREEMPT_RT=n kernels and object to this, so create a lockdep annotation to allow this to stand. Specifically, create a 'lock' type that overrides the inner wait-type while it is held -- allowing one to temporarily raise it, such that the violation is hidden. Reported-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Qi Zheng <zhengqi.arch@bytedance.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Qi Zheng <zhengqi.arch@bytedance.com> Link: https://lkml.kernel.org/r/20230429100614.GA1489784@hirez.programming.kicks-ass.net
Diffstat (limited to 'include/linux/lockdep_types.h')
-rw-r--r--include/linux/lockdep_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h
index d22430840b53..59f4fb1626ea 100644
--- a/include/linux/lockdep_types.h
+++ b/include/linux/lockdep_types.h
@@ -33,6 +33,7 @@ enum lockdep_wait_type {
enum lockdep_lock_type {
LD_LOCK_NORMAL = 0, /* normal, catch all */
LD_LOCK_PERCPU, /* percpu */
+ LD_LOCK_WAIT_OVERRIDE, /* annotation */
LD_LOCK_MAX,
};