diff options
author | Aravind Gopalakrishnan <[email protected]> | 2015-10-12 11:22:38 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2015-10-12 16:15:47 +0200 |
commit | 85c9306d44f757d2fb3b0e3e399080a025315c7f (patch) | |
tree | f3739ff23a559c7370e6a578edbde3daad2e3c5a /tools/perf/util/trace-event-scripting.c | |
parent | cdbcd239e2e264dc3ef7bc7865bcb8ec0023876f (diff) |
x86/ras/mce_amd_inj: Return early on invalid input
Invalid inputs such as these are currently reported in dmesg as
failing:
$> echo sweet > flags
[ 122.079139] flags_write: Invalid flags value: et
even though the 'flags' attribute has been updated correctly:
$> cat flags
sw
This is because userspace keeps writing the remaining buffer
until it encounters an error.
However, the input as a whole is wrong and we should not be
writing anything to the file. Therefore, correct flags_write()
to return -EINVAL immediately on bad input strings.
Signed-off-by: Aravind Gopalakrishnan <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions