]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.39 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 May 2011 18:02:40 +0000 (11:02 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 May 2011 18:02:40 +0000 (11:02 -0700)
queue-2.6.39/cpu-hotplug-re-create-sysfs-directory-and-symlinks.patch [new file with mode: 0644]
queue-2.6.39/fix-_osc-uuid-in-pcc-cpufreq.patch [new file with mode: 0644]
queue-2.6.39/fix-memory-leak-in-cpufreq_stat.patch [new file with mode: 0644]
queue-2.6.39/kmemleak-do-not-return-a-pointer-to-an-object-that-kmemleak-did-not-get.patch [new file with mode: 0644]
queue-2.6.39/kmemleak-initialise-kmemleak-after-debug_objects_mem_init.patch [new file with mode: 0644]
queue-2.6.39/m68k-really-wire-up-sys_pselect6-and-sys_ppoll.patch [new file with mode: 0644]
queue-2.6.39/series

diff --git a/queue-2.6.39/cpu-hotplug-re-create-sysfs-directory-and-symlinks.patch b/queue-2.6.39/cpu-hotplug-re-create-sysfs-directory-and-symlinks.patch
new file mode 100644 (file)
index 0000000..df0d7e9
--- /dev/null
@@ -0,0 +1,67 @@
+From 27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 Mon Sep 17 00:00:00 2001
+From: Jacob Shin <jacob.shin@amd.com>
+Date: Wed, 27 Apr 2011 13:32:11 -0500
+Subject: [CPUFREQ] CPU hotplug, re-create sysfs directory and symlinks
+
+From: Jacob Shin <jacob.shin@amd.com>
+
+commit 27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 upstream.
+
+When we discover CPUs that are affected by each other's
+frequency/voltage transitions, the first CPU gets a sysfs directory
+created, and rest of the siblings get symlinks. Currently, when we
+hotplug off only the first CPU, all of the symlinks and the sysfs
+directory gets removed. Even though rest of the siblings are still
+online and functional, they are orphaned, and no longer governed by
+cpufreq.
+
+This patch, given the above scenario, creates a sysfs directory for
+the first sibling and symlinks for the rest of the siblings.
+
+Please note the recursive call, it was rather too ugly to roll it
+out. And the removal of redundant NULL setting (it is already taken
+care of near the top of the function).
+
+Signed-off-by: Jacob Shin <jacob.shin@amd.com>
+Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
+Reviewed-by: Thomas Renninger <trenn@suse.de>
+Signed-off-by: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/cpufreq/cpufreq.c |   20 ++++++++++++++++++--
+ 1 file changed, 18 insertions(+), 2 deletions(-)
+
+--- a/drivers/cpufreq/cpufreq.c
++++ b/drivers/cpufreq/cpufreq.c
+@@ -1208,12 +1208,28 @@ static int __cpufreq_remove_dev(struct s
+               cpufreq_driver->exit(data);
+       unlock_policy_rwsem_write(cpu);
++      cpufreq_debug_enable_ratelimit();
++
++#ifdef CONFIG_HOTPLUG_CPU
++      /* when the CPU which is the parent of the kobj is hotplugged
++       * offline, check for siblings, and create cpufreq sysfs interface
++       * and symlinks
++       */
++      if (unlikely(cpumask_weight(data->cpus) > 1)) {
++              /* first sibling now owns the new sysfs dir */
++              cpumask_clear_cpu(cpu, data->cpus);
++              cpufreq_add_dev(get_cpu_sysdev(cpumask_first(data->cpus)));
++
++              /* finally remove our own symlink */
++              lock_policy_rwsem_write(cpu);
++              __cpufreq_remove_dev(sys_dev);
++      }
++#endif
++
+       free_cpumask_var(data->related_cpus);
+       free_cpumask_var(data->cpus);
+       kfree(data);
+-      per_cpu(cpufreq_cpu_data, cpu) = NULL;
+-      cpufreq_debug_enable_ratelimit();
+       return 0;
+ }
diff --git a/queue-2.6.39/fix-_osc-uuid-in-pcc-cpufreq.patch b/queue-2.6.39/fix-_osc-uuid-in-pcc-cpufreq.patch
new file mode 100644 (file)
index 0000000..9e18496
--- /dev/null
@@ -0,0 +1,43 @@
+From 904cc1e637a00dba1b58e7752f485f90ebf2a568 Mon Sep 17 00:00:00 2001
+From: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
+Date: Tue, 26 Apr 2011 17:05:18 +0000
+Subject: [CPUFREQ] Fix _OSC UUID in pcc-cpufreq
+
+From: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
+
+commit 904cc1e637a00dba1b58e7752f485f90ebf2a568 upstream.
+
+UUID needs to be written out the way it is described in
+Sec 18.5.124 of ACPI 4.0a Specification.
+
+Platform firmware's use of this UUID/_OSC is optional, which is
+why we didn't notice this bug earlier.
+
+Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
+Signed-off-by: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
++++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c
+@@ -39,7 +39,7 @@
+ #include <acpi/processor.h>
+-#define PCC_VERSION   "1.00.00"
++#define PCC_VERSION   "1.10.00"
+ #define POLL_LOOPS    300
+ #define CMD_COMPLETE  0x1
+@@ -102,7 +102,7 @@ static struct acpi_generic_address doorb
+ static u64 doorbell_preserve;
+ static u64 doorbell_write;
+-static u8 OSC_UUID[16] = {0x63, 0x9B, 0x2C, 0x9F, 0x70, 0x91, 0x49, 0x1f,
++static u8 OSC_UUID[16] = {0x9F, 0x2C, 0x9B, 0x63, 0x91, 0x70, 0x1f, 0x49,
+                         0xBB, 0x4F, 0xA5, 0x98, 0x2F, 0xA1, 0xB5, 0x46};
+ struct pcc_cpu {
diff --git a/queue-2.6.39/fix-memory-leak-in-cpufreq_stat.patch b/queue-2.6.39/fix-memory-leak-in-cpufreq_stat.patch
new file mode 100644 (file)
index 0000000..6fac1c2
--- /dev/null
@@ -0,0 +1,80 @@
+From 98586ed8b8878e10691203687e89a42fa3355300 Mon Sep 17 00:00:00 2001
+From: steven finney <Steven.Finney@palm.com>
+Date: Mon, 2 May 2011 11:29:17 -0700
+Subject: [CPUFREQ] Fix memory leak in cpufreq_stat
+
+From: steven finney <Steven.Finney@palm.com>
+
+commit 98586ed8b8878e10691203687e89a42fa3355300 upstream.
+
+When a CPU is taken offline in an SMP system, cpufreq_remove_dev()
+nulls out the per-cpu policy before cpufreq_stats_free_table() can
+make use of it.  cpufreq_stats_free_table() then skips the
+call to sysfs_remove_group(), leaving about 100 bytes of sysfs-related
+memory unclaimed each time a CPU-removal occurs. Break up
+cpu_stats_free_table into sysfs and table portions, and
+call the sysfs portion early.
+
+Signed-off-by: Steven Finney <steven.finney@palm.com>
+Signed-off-by: Dave Jones <davej@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/cpufreq/cpufreq_stats.c |   21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+--- a/drivers/cpufreq/cpufreq_stats.c
++++ b/drivers/cpufreq/cpufreq_stats.c
+@@ -165,17 +165,27 @@ static int freq_table_get_index(struct c
+       return -1;
+ }
++/* should be called late in the CPU removal sequence so that the stats
++ * memory is still available in case someone tries to use it.
++ */
+ static void cpufreq_stats_free_table(unsigned int cpu)
+ {
+       struct cpufreq_stats *stat = per_cpu(cpufreq_stats_table, cpu);
+-      struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
+-      if (policy && policy->cpu == cpu)
+-              sysfs_remove_group(&policy->kobj, &stats_attr_group);
+       if (stat) {
+               kfree(stat->time_in_state);
+               kfree(stat);
+       }
+       per_cpu(cpufreq_stats_table, cpu) = NULL;
++}
++
++/* must be called early in the CPU removal sequence (before
++ * cpufreq_remove_dev) so that policy is still valid.
++ */
++static void cpufreq_stats_free_sysfs(unsigned int cpu)
++{
++      struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);
++      if (policy && policy->cpu == cpu)
++              sysfs_remove_group(&policy->kobj, &stats_attr_group);
+       if (policy)
+               cpufreq_cpu_put(policy);
+ }
+@@ -316,6 +326,9 @@ static int __cpuinit cpufreq_stat_cpu_ca
+       case CPU_ONLINE_FROZEN:
+               cpufreq_update_policy(cpu);
+               break;
++      case CPU_DOWN_PREPARE:
++              cpufreq_stats_free_sysfs(cpu);
++              break;
+       case CPU_DEAD:
+       case CPU_DEAD_FROZEN:
+               cpufreq_stats_free_table(cpu);
+@@ -324,9 +337,11 @@ static int __cpuinit cpufreq_stat_cpu_ca
+       return NOTIFY_OK;
+ }
++/* priority=1 so this will get called before cpufreq_remove_dev */
+ static struct notifier_block cpufreq_stat_cpu_notifier __refdata =
+ {
+       .notifier_call = cpufreq_stat_cpu_callback,
++      .priority = 1,
+ };
+ static struct notifier_block notifier_policy_block = {
diff --git a/queue-2.6.39/kmemleak-do-not-return-a-pointer-to-an-object-that-kmemleak-did-not-get.patch b/queue-2.6.39/kmemleak-do-not-return-a-pointer-to-an-object-that-kmemleak-did-not-get.patch
new file mode 100644 (file)
index 0000000..584518e
--- /dev/null
@@ -0,0 +1,41 @@
+From 52c3ce4ec5601ee383a14f1485f6bac7b278896e Mon Sep 17 00:00:00 2001
+From: Catalin Marinas <catalin.marinas@arm.com>
+Date: Wed, 27 Apr 2011 16:44:26 +0100
+Subject: kmemleak: Do not return a pointer to an object that kmemleak did not get
+
+From: Catalin Marinas <catalin.marinas@arm.com>
+
+commit 52c3ce4ec5601ee383a14f1485f6bac7b278896e upstream.
+
+The kmemleak_seq_next() function tries to get an object (and increment
+its use count) before returning it. If it could not get the last object
+during list traversal (because it may have been freed), the function
+should return NULL rather than a pointer to such object that it did not
+get.
+
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Reported-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
+Acked-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/kmemleak.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/mm/kmemleak.c
++++ b/mm/kmemleak.c
+@@ -1414,9 +1414,12 @@ static void *kmemleak_seq_next(struct se
+       ++(*pos);
+       list_for_each_continue_rcu(n, &object_list) {
+-              next_obj = list_entry(n, struct kmemleak_object, object_list);
+-              if (get_object(next_obj))
++              struct kmemleak_object *obj =
++                      list_entry(n, struct kmemleak_object, object_list);
++              if (get_object(obj)) {
++                      next_obj = obj;
+                       break;
++              }
+       }
+       put_object(prev_obj);
diff --git a/queue-2.6.39/kmemleak-initialise-kmemleak-after-debug_objects_mem_init.patch b/queue-2.6.39/kmemleak-initialise-kmemleak-after-debug_objects_mem_init.patch
new file mode 100644 (file)
index 0000000..0e09a4d
--- /dev/null
@@ -0,0 +1,36 @@
+From 9b090f2da85bd0df5e1a1ecfe4120b7b50358f48 Mon Sep 17 00:00:00 2001
+From: Catalin Marinas <catalin.marinas@arm.com>
+Date: Thu, 19 May 2011 16:25:30 +0100
+Subject: kmemleak: Initialise kmemleak after debug_objects_mem_init()
+
+From: Catalin Marinas <catalin.marinas@arm.com>
+
+commit 9b090f2da85bd0df5e1a1ecfe4120b7b50358f48 upstream.
+
+Kmemleak frees objects via RCU and when CONFIG_DEBUG_OBJECTS_RCU_HEAD
+is enabled, the RCU callback triggers a call to free_object() in
+lib/debugobjects.c. Since kmemleak is initialised before debug objects
+initialisation, it may result in a kernel panic during booting. This
+patch moves the kmemleak_init() call after debug_objects_mem_init().
+
+Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
+Tested-by: Tejun Heo <tj@kernel.org>
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ init/main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/init/main.c
++++ b/init/main.c
+@@ -580,8 +580,8 @@ asmlinkage void __init start_kernel(void
+ #endif
+       page_cgroup_init();
+       enable_debug_pagealloc();
+-      kmemleak_init();
+       debug_objects_mem_init();
++      kmemleak_init();
+       setup_per_cpu_pageset();
+       numa_policy_init();
+       if (late_time_init)
diff --git a/queue-2.6.39/m68k-really-wire-up-sys_pselect6-and-sys_ppoll.patch b/queue-2.6.39/m68k-really-wire-up-sys_pselect6-and-sys_ppoll.patch
new file mode 100644 (file)
index 0000000..bc29f06
--- /dev/null
@@ -0,0 +1,35 @@
+From d6d42bb2f85d875dc0c421699de5a1401b2af6a6 Mon Sep 17 00:00:00 2001
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+Date: Fri, 6 May 2011 20:57:11 +0200
+Subject: m68k: Really wire up sys_pselect6 and sys_ppoll
+
+From: Geert Uytterhoeven <geert@linux-m68k.org>
+
+commit d6d42bb2f85d875dc0c421699de5a1401b2af6a6 upstream.
+
+We reserved the numbers a long time ago, but never wired them up in the
+syscall table as they need TIF_RESTORE_SIGMASK, which we only got last year
+in commit cb6831d5d3099e772a510eb3e1ed0760ccffb45e ("m68k: Switch to saner
+sigsuspend()")
+
+Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
+Acked-by: Greg Ungerer <gerg@uclinux.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/m68k/kernel/syscalltable.S |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/m68k/kernel/syscalltable.S
++++ b/arch/m68k/kernel/syscalltable.S
+@@ -319,8 +319,8 @@ ENTRY(sys_call_table)
+       .long sys_readlinkat
+       .long sys_fchmodat
+       .long sys_faccessat             /* 300 */
+-      .long sys_ni_syscall            /* Reserved for pselect6 */
+-      .long sys_ni_syscall            /* Reserved for ppoll */
++      .long sys_pselect6
++      .long sys_ppoll
+       .long sys_unshare
+       .long sys_set_robust_list
+       .long sys_get_robust_list       /* 305 */
index d0157b779b9b057b3b28bc6e23a279d0f90c8f3c..5fc1527b4247886c0066ea4f8c08f33be475c9c4 100644 (file)
@@ -1 +1,7 @@
 tmpfs-fix-highmem-swapoff-crash-regression.patch
+m68k-really-wire-up-sys_pselect6-and-sys_ppoll.patch
+kmemleak-do-not-return-a-pointer-to-an-object-that-kmemleak-did-not-get.patch
+kmemleak-initialise-kmemleak-after-debug_objects_mem_init.patch
+fix-_osc-uuid-in-pcc-cpufreq.patch
+cpu-hotplug-re-create-sysfs-directory-and-symlinks.patch
+fix-memory-leak-in-cpufreq_stat.patch