Commit 6af9b391 authored by Tejun Heo's avatar Tejun Heo
Browse files

Merge branch 'for-7.0-fixes' into for-7.1

parents 0a0d3b8d 2fcfe595
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -6867,13 +6867,14 @@ static s32 scx_enable(struct sched_ext_ops *ops, struct bpf_link *link)
	if (!READ_ONCE(helper)) {
		mutex_lock(&helper_mutex);
		if (!helper) {
			helper = kthread_run_worker(0, "scx_enable_helper");
			if (IS_ERR_OR_NULL(helper)) {
				helper = NULL;
			struct kthread_worker *w =
				kthread_run_worker(0, "scx_enable_helper");
			if (IS_ERR_OR_NULL(w)) {
				mutex_unlock(&helper_mutex);
				return -ENOMEM;
			}
			sched_set_fifo(helper->task);
			sched_set_fifo(w->task);
			WRITE_ONCE(helper, w);
		}
		mutex_unlock(&helper_mutex);
	}