]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 23:46:28 +0000 (16:46 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 23:46:28 +0000 (16:46 -0700)
added patches:
acpi-add-dynamic_debug-support.patch
acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch
acpica-utstring-check-array-index-bound-before-use.patch

queue-3.14/acpi-add-dynamic_debug-support.patch [new file with mode: 0644]
queue-3.14/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch [new file with mode: 0644]
queue-3.14/acpica-utstring-check-array-index-bound-before-use.patch [new file with mode: 0644]
queue-3.14/series

diff --git a/queue-3.14/acpi-add-dynamic_debug-support.patch b/queue-3.14/acpi-add-dynamic_debug-support.patch
new file mode 100644 (file)
index 0000000..0e3952d
--- /dev/null
@@ -0,0 +1,187 @@
+From 45fef5b88d1f2f47ecdefae6354372d440ca5c84 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+Date: Thu, 22 May 2014 12:47:47 +0200
+Subject: ACPI: add dynamic_debug support
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
+
+commit 45fef5b88d1f2f47ecdefae6354372d440ca5c84 upstream.
+
+Commit 1a699476e258 ("ACPI / hotplug / PCI: Hotplug notifications
+from acpi_bus_notify()") added debug messages for a few common
+events. These debug messages are unconditionally enabled if
+CONFIG_DYNAMIC_DEBUG is defined, contrary to the documented
+meaning, making the ACPI system spew lots of unwanted noise on
+any kernel with dynamic debugging.
+
+The bug was introduced by commit fbfddae69657 ("ACPI: Add
+acpi_handle_<level>() interfaces"), which added the
+CONFIG_DYNAMIC_DEBUG dependency without respecting its meaning.
+
+Fix by adding real support for dynamic_debug.
+
+Fixes: fbfddae69657 ("ACPI: Add acpi_handle_<level>() interfaces")
+Signed-off-by: Bjørn Mork <bjorn@mork.no>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/utils.c |   64 +++++++++++++++++++++++++++++++++++++++++----------
+ include/linux/acpi.h |   22 +++++++++++++++--
+ 2 files changed, 72 insertions(+), 14 deletions(-)
+
+--- a/drivers/acpi/utils.c
++++ b/drivers/acpi/utils.c
+@@ -30,6 +30,7 @@
+ #include <linux/types.h>
+ #include <linux/hardirq.h>
+ #include <linux/acpi.h>
++#include <linux/dynamic_debug.h>
+ #include "internal.h"
+@@ -464,6 +465,24 @@ acpi_evaluate_hotplug_ost(acpi_handle ha
+ EXPORT_SYMBOL(acpi_evaluate_hotplug_ost);
+ /**
++ * acpi_handle_path: Return the object path of handle
++ *
++ * Caller must free the returned buffer
++ */
++static char *acpi_handle_path(acpi_handle handle)
++{
++      struct acpi_buffer buffer = {
++              .length = ACPI_ALLOCATE_BUFFER,
++              .pointer = NULL
++      };
++
++      if (in_interrupt() ||
++          acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer) != AE_OK)
++              return NULL;
++      return buffer.pointer;
++}
++
++/**
+  * acpi_handle_printk: Print message with ACPI prefix and object path
+  *
+  * This function is called through acpi_handle_<level> macros and prints
+@@ -476,29 +495,50 @@ acpi_handle_printk(const char *level, ac
+ {
+       struct va_format vaf;
+       va_list args;
+-      struct acpi_buffer buffer = {
+-              .length = ACPI_ALLOCATE_BUFFER,
+-              .pointer = NULL
+-      };
+       const char *path;
+       va_start(args, fmt);
+       vaf.fmt = fmt;
+       vaf.va = &args;
+-      if (in_interrupt() ||
+-          acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer) != AE_OK)
+-              path = "<n/a>";
+-      else
+-              path = buffer.pointer;
+-
+-      printk("%sACPI: %s: %pV", level, path, &vaf);
++      path = acpi_handle_path(handle);
++      printk("%sACPI: %s: %pV", level, path ? path : "<n/a>" , &vaf);
+       va_end(args);
+-      kfree(buffer.pointer);
++      kfree(path);
+ }
+ EXPORT_SYMBOL(acpi_handle_printk);
++#if defined(CONFIG_DYNAMIC_DEBUG)
++/**
++ * __acpi_handle_debug: pr_debug with ACPI prefix and object path
++ *
++ * This function is called through acpi_handle_debug macro and debug
++ * prints a message with ACPI prefix and object path. This function
++ * acquires the global namespace mutex to obtain an object path.  In
++ * interrupt context, it shows the object path as <n/a>.
++ */
++void
++__acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle,
++                  const char *fmt, ...)
++{
++      struct va_format vaf;
++      va_list args;
++      const char *path;
++
++      va_start(args, fmt);
++      vaf.fmt = fmt;
++      vaf.va = &args;
++
++      path = acpi_handle_path(handle);
++      __dynamic_pr_debug(descriptor, "ACPI: %s: %pV", path ? path : "<n/a>", &vaf);
++
++      va_end(args);
++      kfree(path);
++}
++EXPORT_SYMBOL(__acpi_handle_debug);
++#endif
++
+ /**
+  * acpi_has_method: Check whether @handle has a method named @name
+  * @handle: ACPI device handle
+--- a/include/linux/acpi.h
++++ b/include/linux/acpi.h
+@@ -37,6 +37,7 @@
+ #include <linux/list.h>
+ #include <linux/mod_devicetable.h>
++#include <linux/dynamic_debug.h>
+ #include <acpi/acpi.h>
+ #include <acpi/acpi_bus.h>
+@@ -590,6 +591,14 @@ static inline __printf(3, 4) void
+ acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {}
+ #endif        /* !CONFIG_ACPI */
++#if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG)
++__printf(3, 4)
++void __acpi_handle_debug(struct _ddebug *descriptor, acpi_handle handle, const char *fmt, ...);
++#else
++#define __acpi_handle_debug(descriptor, handle, fmt, ...)             \
++      acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__);
++#endif
++
+ /*
+  * acpi_handle_<level>: Print message with ACPI prefix and object path
+  *
+@@ -611,11 +620,19 @@ acpi_handle_printk(const char *level, vo
+ #define acpi_handle_info(handle, fmt, ...)                            \
+       acpi_handle_printk(KERN_INFO, handle, fmt, ##__VA_ARGS__)
+-/* REVISIT: Support CONFIG_DYNAMIC_DEBUG when necessary */
+-#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
++#if defined(DEBUG)
+ #define acpi_handle_debug(handle, fmt, ...)                           \
+       acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__)
+ #else
++#if defined(CONFIG_DYNAMIC_DEBUG)
++#define acpi_handle_debug(handle, fmt, ...)                           \
++do {                                                                  \
++      DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);                 \
++      if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT))          \
++              __acpi_handle_debug(&descriptor, handle, pr_fmt(fmt),   \
++                              ##__VA_ARGS__);                         \
++} while (0)
++#else
+ #define acpi_handle_debug(handle, fmt, ...)                           \
+ ({                                                                    \
+       if (0)                                                          \
+@@ -623,5 +640,6 @@ acpi_handle_printk(const char *level, vo
+       0;                                                              \
+ })
+ #endif
++#endif
+ #endif        /*_LINUX_ACPI_H*/
diff --git a/queue-3.14/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch b/queue-3.14/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch
new file mode 100644 (file)
index 0000000..db8286d
--- /dev/null
@@ -0,0 +1,46 @@
+From 73577d1df8e1f31f6b1a5eebcdbc334eb0330e47 Mon Sep 17 00:00:00 2001
+From: Lv Zheng <lv.zheng@intel.com>
+Date: Mon, 12 May 2014 15:50:16 +0800
+Subject: ACPI: Fix conflict between customized DSDT and DSDT local copy
+
+From: Lv Zheng <lv.zheng@intel.com>
+
+commit 73577d1df8e1f31f6b1a5eebcdbc334eb0330e47 upstream.
+
+This patch fixes the following issue:
+If DSDT is customized, no local DSDT copy is needed.
+
+References: https://bugzilla.kernel.org/show_bug.cgi?id=69711
+Signed-off-by: Enrico Etxe Arte <goitizena.generoa@gmail.com>
+Signed-off-by: Lv Zheng <lv.zheng@intel.com>
+[rjw: Subject]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/bus.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/acpi/bus.c
++++ b/drivers/acpi/bus.c
+@@ -52,6 +52,12 @@ struct proc_dir_entry *acpi_root_dir;
+ EXPORT_SYMBOL(acpi_root_dir);
+ #ifdef CONFIG_X86
++#ifdef CONFIG_ACPI_CUSTOM_DSDT
++static inline int set_copy_dsdt(const struct dmi_system_id *id)
++{
++      return 0;
++}
++#else
+ static int set_copy_dsdt(const struct dmi_system_id *id)
+ {
+       printk(KERN_NOTICE "%s detected - "
+@@ -59,6 +65,7 @@ static int set_copy_dsdt(const struct dm
+       acpi_gbl_copy_dsdt_locally = 1;
+       return 0;
+ }
++#endif
+ static struct dmi_system_id dsdt_dmi_table[] __initdata = {
+       /*
diff --git a/queue-3.14/acpica-utstring-check-array-index-bound-before-use.patch b/queue-3.14/acpica-utstring-check-array-index-bound-before-use.patch
new file mode 100644 (file)
index 0000000..a23aabc
--- /dev/null
@@ -0,0 +1,33 @@
+From 5d42b0fa25df7ef2f575107597c1aaebe2407d10 Mon Sep 17 00:00:00 2001
+From: David Binderman <dcb314@hotmail.com>
+Date: Fri, 4 Apr 2014 12:36:55 +0800
+Subject: ACPICA: utstring: Check array index bound before use.
+
+From: David Binderman <dcb314@hotmail.com>
+
+commit 5d42b0fa25df7ef2f575107597c1aaebe2407d10 upstream.
+
+ACPICA BZ 1077. David Binderman.
+
+References: https://bugs.acpica.org/show_bug.cgi?id=1077
+Signed-off-by: David Binderman <dcb314@hotmail.com>
+Signed-off-by: Bob Moore <robert.moore@intel.com>
+Signed-off-by: Lv Zheng <lv.zheng@intel.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/acpica/utstring.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/acpi/acpica/utstring.c
++++ b/drivers/acpi/acpica/utstring.c
+@@ -353,7 +353,7 @@ void acpi_ut_print_string(char *string,
+       }
+       acpi_os_printf("\"");
+-      for (i = 0; string[i] && (i < max_length); i++) {
++      for (i = 0; (i < max_length) && string[i]; i++) {
+               /* Escape sequences */
index 2c778441d2afbc801090951a242530d513c58c4d..9df4274e94eef8077fd5ed7282714dca1a73745e 100644 (file)
@@ -54,3 +54,6 @@ usb-qcserial-add-additional-sierra-wireless-qmi-devices.patch
 usb-serial-fix-potential-runtime-pm-imbalance-at-device-remove.patch
 media-ivtv-fix-oops-when-no-firmware-is-loaded.patch
 media-stk1160-avoid-stack-allocated-buffer-for-control-urbs.patch
+acpi-add-dynamic_debug-support.patch
+acpica-utstring-check-array-index-bound-before-use.patch
+acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch