summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-12-17 18:48:25 +0100
committerIngo Molnar <mingo@kernel.org>2018-12-17 18:48:25 +0100
commit02117e42db7470e59910088b2b0ee42d581d2651 (patch)
tree7734414b46fb72ffc708ac924f3b6b69de1f0d4c /arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
parentba6f508d0ec4adb09f0a939af6d5e19cdfa8667d (diff)
parent721066dfd4d5c0fee5772c777d6930d0f423b4eb (diff)
downloadlinux-02117e42db7470e59910088b2b0ee42d581d2651.tar.gz
linux-02117e42db7470e59910088b2b0ee42d581d2651.tar.bz2
linux-02117e42db7470e59910088b2b0ee42d581d2651.zip
Merge branch 'x86/urgent' into x86/mm, to pick up dependent fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c')
-rw-r--r--arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
index 27937458c231..efa4a519f5e5 100644
--- a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
+++ b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
@@ -23,6 +23,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/cpu.h>
#include <linux/kernfs.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
@@ -310,9 +311,11 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
return -EINVAL;
buf[nbytes - 1] = '\0';
+ cpus_read_lock();
rdtgrp = rdtgroup_kn_lock_live(of->kn);
if (!rdtgrp) {
rdtgroup_kn_unlock(of->kn);
+ cpus_read_unlock();
return -ENOENT;
}
rdt_last_cmd_clear();
@@ -367,6 +370,7 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
out:
rdtgroup_kn_unlock(of->kn);
+ cpus_read_unlock();
return ret ?: nbytes;
}