diff --git a/kernel/sched/core.c b/kernel/sched/core.c index bd5ae34c20c0b9fbff11cf65ac5d18c5b0ea33ad..6138754e5030f9d136123144a0537f7cb5b49e2c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6491,6 +6491,8 @@ static void cpu_cgroup_attach(struct cgroup_taskset *tset) static int cpu_shares_write_u64(struct cgroup_subsys_state *css, struct cftype *cftype, u64 shareval) { + if (shareval > scale_load_down(ULONG_MAX)) + shareval = MAX_SHARES; return sched_group_set_shares(css_tg(css), scale_load(shareval)); }