mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
Merge tag 'v4.9.180' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.180 stable release
This commit is contained in:
@@ -1095,22 +1095,24 @@ int audit_rule_change(int type, __u32 portid, int seq, void *data,
|
||||
int err = 0;
|
||||
struct audit_entry *entry;
|
||||
|
||||
entry = audit_data_to_entry(data, datasz);
|
||||
if (IS_ERR(entry))
|
||||
return PTR_ERR(entry);
|
||||
|
||||
switch (type) {
|
||||
case AUDIT_ADD_RULE:
|
||||
entry = audit_data_to_entry(data, datasz);
|
||||
if (IS_ERR(entry))
|
||||
return PTR_ERR(entry);
|
||||
err = audit_add_rule(entry);
|
||||
audit_log_rule_change("add_rule", &entry->rule, !err);
|
||||
break;
|
||||
case AUDIT_DEL_RULE:
|
||||
entry = audit_data_to_entry(data, datasz);
|
||||
if (IS_ERR(entry))
|
||||
return PTR_ERR(entry);
|
||||
err = audit_del_rule(entry);
|
||||
audit_log_rule_change("remove_rule", &entry->rule, !err);
|
||||
break;
|
||||
default:
|
||||
err = -EINVAL;
|
||||
WARN_ON(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (err || type == AUDIT_DEL_RULE) {
|
||||
|
||||
@@ -453,6 +453,10 @@ rcu_perf_cleanup(void)
|
||||
|
||||
if (torture_cleanup_begin())
|
||||
return;
|
||||
if (!cur_ops) {
|
||||
torture_cleanup_end();
|
||||
return;
|
||||
}
|
||||
|
||||
if (reader_tasks) {
|
||||
for (i = 0; i < nrealreaders; i++)
|
||||
@@ -574,6 +578,7 @@ rcu_perf_init(void)
|
||||
pr_alert(" %s", perf_ops[i]->name);
|
||||
pr_alert("\n");
|
||||
firsterr = -EINVAL;
|
||||
cur_ops = NULL;
|
||||
goto unwind;
|
||||
}
|
||||
if (cur_ops->init)
|
||||
|
||||
@@ -1595,6 +1595,10 @@ rcu_torture_cleanup(void)
|
||||
cur_ops->cb_barrier();
|
||||
return;
|
||||
}
|
||||
if (!cur_ops) {
|
||||
torture_cleanup_end();
|
||||
return;
|
||||
}
|
||||
|
||||
rcu_torture_barrier_cleanup();
|
||||
torture_stop_kthread(rcu_torture_stall, stall_task);
|
||||
@@ -1730,6 +1734,7 @@ rcu_torture_init(void)
|
||||
pr_alert(" %s", torture_ops[i]->name);
|
||||
pr_alert("\n");
|
||||
firsterr = -EINVAL;
|
||||
cur_ops = NULL;
|
||||
goto unwind;
|
||||
}
|
||||
if (cur_ops->fqs == NULL && fqs_duration != 0) {
|
||||
|
||||
@@ -8724,6 +8724,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));
|
||||
}
|
||||
|
||||
@@ -8823,8 +8825,10 @@ int tg_set_cfs_quota(struct task_group *tg, long cfs_quota_us)
|
||||
period = ktime_to_ns(tg->cfs_bandwidth.period);
|
||||
if (cfs_quota_us < 0)
|
||||
quota = RUNTIME_INF;
|
||||
else
|
||||
else if ((u64)cfs_quota_us <= U64_MAX / NSEC_PER_USEC)
|
||||
quota = (u64)cfs_quota_us * NSEC_PER_USEC;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
return tg_set_cfs_bandwidth(tg, period, quota);
|
||||
}
|
||||
@@ -8846,6 +8850,9 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
|
||||
{
|
||||
u64 quota, period;
|
||||
|
||||
if ((u64)cfs_period_us > U64_MAX / NSEC_PER_USEC)
|
||||
return -EINVAL;
|
||||
|
||||
period = (u64)cfs_period_us * NSEC_PER_USEC;
|
||||
quota = tg->cfs_bandwidth.quota;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user