@@ -362,9 +362,9 @@ extern void lock_unpin_lock(struct lockdep_map *lock);
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
-#define lockdep_assert_held(l) do { \
+#define lockdep_assert_held(l) ({ \
WARN_ON(debug_locks && !lockdep_is_held(l)); \
- } while (0)
+ (void)l; })
#define lockdep_assert_held_once(l) do { \
WARN_ON_ONCE(debug_locks && !lockdep_is_held(l)); \
@@ -422,7 +422,7 @@ struct lock_class_key { };
#define lockdep_depth(tsk) (0)
-#define lockdep_assert_held(l) do { (void)(l); } while (0)
+#define lockdep_assert_held(l) ({ (void)l; })
#define lockdep_assert_held_once(l) do { (void)(l); } while (0)
#define lockdep_recursing(tsk) (0)
@@ -1817,6 +1817,8 @@ void sched_ttwu_pending(void)
raw_spin_unlock_irqrestore(&rq->lock, flags);
}
+raw_spinlock_t lock;
+
void scheduler_ipi(void)
{
/*
@@ -1826,6 +1828,9 @@ void scheduler_ipi(void)
*/
preempt_fold_need_resched();
+ if (lockdep_assert_held(&lock), false)
+ ;
+
if (llist_empty(&this_rq()->wake_list) && !got_nohz_idle_kick())
return;