* [PATCH] intel-wmi-thunderbolt: fix some error cases
@ 2017-09-14 6:41 Mario Limonciello
2017-09-15 7:35 ` Darren Hart
0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2017-09-14 6:41 UTC (permalink / raw)
To: dvhart; +Cc: LKML, platform-driver-x86, Mario Limonciello
These were raised by Lukas Wunner as potential DOS attacks against
the system log by passing bad data to sysfs.
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
---
drivers/platform/x86/intel-wmi-thunderbolt.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/intel-wmi-thunderbolt.c b/drivers/platform/x86/intel-wmi-thunderbolt.c
index 32fb6cc..c2257bd 100644
--- a/drivers/platform/x86/intel-wmi-thunderbolt.c
+++ b/drivers/platform/x86/intel-wmi-thunderbolt.c
@@ -41,13 +41,10 @@ static ssize_t force_power_store(struct device *dev,
if (mode == 0 || mode == 1) {
status = wmi_evaluate_method(INTEL_WMI_THUNDERBOLT_GUID, 0, 1,
&input, NULL);
- if (ACPI_FAILURE(status)) {
- pr_err("intel-wmi-thunderbolt: failed setting %s\n",
- buf);
+ if (ACPI_FAILURE(status))
return -ENODEV;
- }
} else {
- pr_err("intel-wmi-thunderbolt: unsupported mode: %d", mode);
+ return -EINVAL;
}
return count;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] intel-wmi-thunderbolt: fix some error cases
2017-09-14 6:41 [PATCH] intel-wmi-thunderbolt: fix some error cases Mario Limonciello
@ 2017-09-15 7:35 ` Darren Hart
0 siblings, 0 replies; 2+ messages in thread
From: Darren Hart @ 2017-09-15 7:35 UTC (permalink / raw)
To: Mario Limonciello; +Cc: LKML, platform-driver-x86
On Thu, Sep 14, 2017 at 01:41:55AM -0500, Mario Limonciello wrote:
> These were raised by Lukas Wunner as potential DOS attacks against
> the system log by passing bad data to sysfs.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Queued for review/testing with a minor subject change.
--
Darren Hart
VMware Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-15 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-14 6:41 [PATCH] intel-wmi-thunderbolt: fix some error cases Mario Limonciello
2017-09-15 7:35 ` Darren Hart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox