summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2017-09-25 16:39:35 -0700
committerThomas Gleixner <tglx@linutronix.de>2017-09-27 12:10:10 +0200
commit29e74f35b2fed0ca3e8b31db157e1d183e9d0819 (patch)
tree8a618a93b8a53d9c07506b4cba9ac1bac2d9e852 /arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
parentc377dcfbee808efdb66cf1bb6b9f06fa26b2ad0a (diff)
x86/intel_rdt: Add diagnostics when writing the tasks file
About the only tricky case is trying to move a task into a monitor group that is a subdirectory of a different control group. But cover the simple cases too. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Vikas Shivappa <vikas.shivappa@intel.com> Cc: Boris Petkov <bp@suse.de> Cc: Reinette Chatre <reinette.chatre@intel.com> Link: https://lkml.kernel.org/r/f1841cce6a242aed37cb926dee8942727331bf78.1506382469.git.tony.luck@intel.com
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, 1 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
index f29b4c21e7d4..30aeb267cbd2 100644
--- a/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
+++ b/arch/x86/kernel/cpu/intel_rdt_ctrlmondata.c
@@ -232,10 +232,8 @@ ssize_t rdtgroup_schemata_write(struct kernfs_open_file *of,
int closid, ret = 0;
/* Valid input requires a trailing newline */
- if (nbytes == 0 || buf[nbytes - 1] != '\n') {
- seq_buf_puts(&last_cmd_status, "no trailing newline\n");
+ if (nbytes == 0 || buf[nbytes - 1] != '\n')
return -EINVAL;
- }
buf[nbytes - 1] = '\0';
rdtgrp = rdtgroup_kn_lock_live(of->kn);