diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0095-ACPI-sysfs.c-strlen-fix.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0095-ACPI-sysfs.c-strlen-fix.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0095-ACPI-sysfs.c-strlen-fix.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0095-ACPI-sysfs.c-strlen-fix.patch new file mode 100644 index 00000000..61a570b5 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.24/0095-ACPI-sysfs.c-strlen-fix.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From b563da2fc80658815355acc804d1b8c21d1a88f9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pavel Vasilyev <pavel@pavlinux.ru> | ||
3 | Date: Tue, 5 Jun 2012 00:02:05 -0400 | ||
4 | Subject: [PATCH 095/109] ACPI sysfs.c strlen fix | ||
5 | |||
6 | commit 9f132652d94c96476b0b0a8caf0c10e96ab10fa8 upstream. | ||
7 | |||
8 | Current code is ignoring the last character of "enable" and "disable" | ||
9 | in comparisons. | ||
10 | |||
11 | https://bugzilla.kernel.org/show_bug.cgi?id=33732 | ||
12 | |||
13 | Signed-off-by: Len Brown <len.brown@intel.com> | ||
14 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
15 | --- | ||
16 | drivers/acpi/sysfs.c | 4 ++-- | ||
17 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c | ||
20 | index 9f66181..240a244 100644 | ||
21 | --- a/drivers/acpi/sysfs.c | ||
22 | +++ b/drivers/acpi/sysfs.c | ||
23 | @@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) | ||
24 | { | ||
25 | int result = 0; | ||
26 | |||
27 | - if (!strncmp(val, "enable", strlen("enable") - 1)) { | ||
28 | + if (!strncmp(val, "enable", strlen("enable"))) { | ||
29 | result = acpi_debug_trace(trace_method_name, trace_debug_level, | ||
30 | trace_debug_layer, 0); | ||
31 | if (result) | ||
32 | @@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) | ||
33 | goto exit; | ||
34 | } | ||
35 | |||
36 | - if (!strncmp(val, "disable", strlen("disable") - 1)) { | ||
37 | + if (!strncmp(val, "disable", strlen("disable"))) { | ||
38 | int name = 0; | ||
39 | result = acpi_debug_trace((char *)&name, trace_debug_level, | ||
40 | trace_debug_layer, 0); | ||
41 | -- | ||
42 | 1.7.7.6 | ||
43 | |||