--- x/kernel/sched/deadline.c +++ y/kernel/sched/deadline.c @@ -1498,6 +1498,9 @@ static void update_curr_dl_se(struct rq * starting a new period, pushing the activation. */ if (dl_se->dl_defer && dl_se->dl_throttled && dl_runtime_exceeded(dl_se)) { + bool lock = rq != dl_se->rq; + struct rq_flags rf; + struct rq *__rq = dl_se->rq; /* * If the server was previously activated - the starving condition * took place, it this point it went away because the fair scheduler @@ -1508,7 +1511,11 @@ static void update_curr_dl_se(struct rq hrtimer_try_to_cancel(&dl_se->dl_timer); + if (lock) + rq_lock(__rq, &rf); replenish_dl_new_period(dl_se, dl_se->rq); + if (lock) + rq_unlock(__rq, &rf); /* * Not being able to start the timer seems problematic. If it could not --- x/kernel/workqueue.c +++ y/kernel/workqueue.c @@ -5653,6 +5653,7 @@ static struct workqueue_struct *__alloc_ wq = kzalloc(wq_size, GFP_KERNEL); if (!wq) return NULL; + wq_init_lockdep(wq); if (flags & WQ_UNBOUND) { wq->unbound_attrs = alloc_workqueue_attrs(); @@ -5757,10 +5758,6 @@ struct workqueue_struct *alloc_workqueue va_start(args, max_active); wq = __alloc_workqueue(fmt, flags, max_active, args); va_end(args); - if (!wq) - return NULL; - - wq_init_lockdep(wq); return wq; }