History

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar: "Misc fixes: - a resctrl fix for uninitialized objects found by debugobjects - a resctrl memory leak fix - fix the unintended re-enabling of the of SME and SEV CPU flags if memory encryption was disabled at bootup via the MSR space" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Ensure clearing of SME/SEV features is maintained x86/resctrl: Fix potential memory leak x86/resctrl: Fix an imbalance in domain_remove_cpu()

Linus Torvalds committed 6 years ago

Commit 0cc26822 parents 7ff15cd a0064833 files · +6 −6Browse files

Unified · Split

3 files
  1. arch/x86/kernel/cpu/amd.c +2 −2
  2. arch/x86/kernel/cpu/resctrl/core.c +1 −1
  3. arch/x86/kernel/cpu/resctrl/rdtgroup.c +3 −3
arch/x86/kernel/cpu/amd.c+2−2
@@ -615,9 +615,9 @@ static void early_detect_mem_encrypt(struct cpuinfo_x86 *c) · 614 unmodified lines
615615 return;
616616
617617 clear_all:
618− clear_cpu_cap(c, X86_FEATURE_SME);
618+ setup_clear_cpu_cap(X86_FEATURE_SME);
619619 clear_sev:
620− clear_cpu_cap(c, X86_FEATURE_SEV);
620+ setup_clear_cpu_cap(X86_FEATURE_SEV);
621621 }
622622 }
623623
arch/x86/kernel/cpu/resctrl/core.c+1−1
@@ -618,7 +618,7 @@ static void domain_remove_cpu(int cpu, struct rdt_resource *r) · 617 unmodified lines
618618 if (static_branch_unlikely(&rdt_mon_enable_key))
619619 rmdir_mondata_subdir_allrdtgrp(r, d->id);
620620 list_del(&d->list);
621− if (is_mbm_enabled())
621+ if (r->mon_capable && is_mbm_enabled())
622622 cancel_delayed_work(&d->mbm_over);
623623 if (is_llc_occupancy_enabled() && has_busy_rmid(r, d)) {
624624 /*
arch/x86/kernel/cpu/resctrl/rdtgroup.c+3−3
@@ -1741,9 +1741,6 @@ static int set_cache_qos_cfg(int level, bool enable) · 1740 unmodified lines
17411741 struct rdt_domain *d;
17421742 int cpu;
17431743
1744− if (!zalloc_cpumask_var(&cpu_mask, GFP_KERNEL))
1745− return -ENOMEM;
1746−
17471744 if (level == RDT_RESOURCE_L3)
17481745 update = l3_qos_cfg_update;
17491746 else if (level == RDT_RESOURCE_L2)
@@ -1751,6 +1748,9 @@ static int set_cache_qos_cfg(int level, bool enable) · 1 unmodified line
17511748 else
17521749 return -EINVAL;
17531750
1751+ if (!zalloc_cpumask_var(&cpu_mask, GFP_KERNEL))
1752+ return -ENOMEM;
1753+
17541754 r_l = &rdt_resources_all[level];
17551755 list_for_each_entry(d, &r_l->domains, list) {
17561756 /* Pick one CPU from each domain instance to update MSR */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t