Message ID | 20240410112920.33436-2-guoqing.jiang@canonical.com |
---|---|
State | New |
Headers | show |
Series | Fix proc_sched_rt01 issue in LTP | expand |
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 590abc1a013d..904dd8534597 100644 --- a/kernel/sched/rt.c +++ b/kernel/sched/rt.c @@ -3066,6 +3066,9 @@ static int sched_rr_handler(struct ctl_table *table, int write, void *buffer, sched_rr_timeslice = sysctl_sched_rr_timeslice <= 0 ? RR_TIMESLICE : msecs_to_jiffies(sysctl_sched_rr_timeslice); + + if (sysctl_sched_rr_timeslice <= 0) + sysctl_sched_rr_timeslice = jiffies_to_msecs(RR_TIMESLICE); } mutex_unlock(&mutex);