]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
more patches queued
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Oct 2006 07:27:43 +0000 (00:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Oct 2006 07:27:43 +0000 (00:27 -0700)
13 files changed:
queue-2.6.18/backlight-fix-oops-in-__mutex_lock_slowpath-during-head-sys-class-graphics-fb0.patch [new file with mode: 0644]
queue-2.6.18/cpu-to-node-relationship-fixup-acpi_map_cpu2node.patch [new file with mode: 0644]
queue-2.6.18/cpu-to-node-relationship-fixup-map-cpu-to-node.patch [new file with mode: 0644]
queue-2.6.18/do-not-free-non-slab-allocated-per_cpu_pageset.patch [new file with mode: 0644]
queue-2.6.18/fix-vidioc_enumstd-bug.patch [new file with mode: 0644]
queue-2.6.18/i386-bootioremap-kexec-fix.patch [new file with mode: 0644]
queue-2.6.18/i386-fix-flat-mode-numa-on-a-real-numa-system.patch [new file with mode: 0644]
queue-2.6.18/load_module-no-bug-if-module_subsys-uninitialized.patch [new file with mode: 0644]
queue-2.6.18/powerpc-fix-ohare-ide-irq-workaround-on-old-powermacs.patch [new file with mode: 0644]
queue-2.6.18/process_zones-fix-error-handling.patch [new file with mode: 0644]
queue-2.6.18/rtc-lockdep-fix-workaround.patch [new file with mode: 0644]
queue-2.6.18/series
queue-2.6.18/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch [new file with mode: 0644]

diff --git a/queue-2.6.18/backlight-fix-oops-in-__mutex_lock_slowpath-during-head-sys-class-graphics-fb0.patch b/queue-2.6.18/backlight-fix-oops-in-__mutex_lock_slowpath-during-head-sys-class-graphics-fb0.patch
new file mode 100644 (file)
index 0000000..ee2e631
--- /dev/null
@@ -0,0 +1,55 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:26:15 2006
+Message-Id: <200609252325.k8PNP8r9002078@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: Michael Hanselmann <linux-kernel@hansmi.ch>
+Date: Mon, 25 Sep 2006 16:25:07 -0700
+Cc: akpm@osdl.org, olaf@aepfle.de, daniel.thompson@st.com,
+        linux-kernel@hansmi.ch, jonsmirl@gmail.com, adaplas@pol.net,
+        stable@kernel.org
+Subject: backlight: fix oops in __mutex_lock_slowpath during head /sys/class/graphics/fb0/*
+
+From: Michael Hanselmann <linux-kernel@hansmi.ch>
+
+Seems like not all drivers use the framebuffer_alloc() function and won't
+have an initialized mutex.  But those don't have a backlight, anyway.
+
+Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
+Cc: Olaf Hering <olaf@aepfle.de>
+Cc: "Antonino A. Daplas" <adaplas@pol.net>
+Cc: Daniel R Thompson <daniel.thompson@st.com>
+Cc: Jon Smirl <jonsmirl@gmail.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/video/fbsysfs.c |   12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- linux-2.6.18.orig/drivers/video/fbsysfs.c
++++ linux-2.6.18/drivers/video/fbsysfs.c
+@@ -397,6 +397,12 @@ static ssize_t store_bl_curve(struct cla
+       u8 tmp_curve[FB_BACKLIGHT_LEVELS];
+       unsigned int i;
++      /* Some drivers don't use framebuffer_alloc(), but those also
++       * don't have backlights.
++       */
++      if (!fb_info || !fb_info->bl_dev)
++              return -ENODEV;
++
+       if (count != (FB_BACKLIGHT_LEVELS / 8 * 24))
+               return -EINVAL;
+@@ -430,6 +436,12 @@ static ssize_t show_bl_curve(struct clas
+       ssize_t len = 0;
+       unsigned int i;
++      /* Some drivers don't use framebuffer_alloc(), but those also
++       * don't have backlights.
++       */
++      if (!fb_info || !fb_info->bl_dev)
++              return -ENODEV;
++
+       mutex_lock(&fb_info->bl_mutex);
+       for (i = 0; i < FB_BACKLIGHT_LEVELS; i += 8)
+               len += snprintf(&buf[len], PAGE_SIZE,
diff --git a/queue-2.6.18/cpu-to-node-relationship-fixup-acpi_map_cpu2node.patch b/queue-2.6.18/cpu-to-node-relationship-fixup-acpi_map_cpu2node.patch
new file mode 100644 (file)
index 0000000..75be704
--- /dev/null
@@ -0,0 +1,64 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:26:26 2006
+Message-Id: <200609252325.k8PNPN5x002090@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Date: Mon, 25 Sep 2006 16:25:21 -0700
+Cc: akpm@osdl.org, tony.luck@intel.com, stable@kernel.org,
+        kamezawa.hiroyu@jp.fujitsu.com
+Subject: cpu to node relationship fixup: acpi_map_cpu2node
+
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+
+Problem description:
+
+  We have additional_cpus= option for allocating possible_cpus.  But nid
+  for possible cpus are not fixed at boot time.  cpus which is offlined at
+  boot or cpus which is not on SRAT is not tied to its node.  This will
+  cause panic at cpu onlining.
+
+Usually, pxm_to_nid() mapping is fixed at boot time by SRAT.
+
+But, unfortunately, some system (my system!) do not include
+full SRAT table for possible cpus.  (Then, I use
+additiona_cpus= option.)
+
+For such possible cpus, pxm<->nid should be fixed at
+hot-add.  We now have acpi_map_pxm_to_node() which is also
+used at boot.  It's suitable here.
+
+Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Cc: "Luck, Tony" <tony.luck@intel.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/kernel/acpi.c |   13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- linux-2.6.18.orig/arch/ia64/kernel/acpi.c
++++ linux-2.6.18/arch/ia64/kernel/acpi.c
+@@ -771,16 +771,19 @@ int acpi_map_cpu2node(acpi_handle handle
+ {
+ #ifdef CONFIG_ACPI_NUMA
+       int pxm_id;
++      int nid;
+       pxm_id = acpi_get_pxm(handle);
+-
+       /*
+-       * Assuming that the container driver would have set the proximity
+-       * domain and would have initialized pxm_to_node(pxm_id) && pxm_flag
++       * We don't have cpu-only-node hotadd. But if the system equips
++       * SRAT table, pxm is already found and node is ready.
++       * So, just pxm_to_nid(pxm) is OK.
++       * This code here is for the system which doesn't have full SRAT
++       * table for possible cpus.
+        */
+-      node_cpuid[cpu].nid = (pxm_id < 0) ? 0 : pxm_to_node(pxm_id);
+-
++      nid = acpi_map_pxm_to_node(pxm_id);
+       node_cpuid[cpu].phys_id = physid;
++      node_cpuid[cpu].nid = nid;
+ #endif
+       return (0);
+ }
diff --git a/queue-2.6.18/cpu-to-node-relationship-fixup-map-cpu-to-node.patch b/queue-2.6.18/cpu-to-node-relationship-fixup-map-cpu-to-node.patch
new file mode 100644 (file)
index 0000000..9fc7a9c
--- /dev/null
@@ -0,0 +1,118 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:26:26 2006
+Message-Id: <200609252325.k8PNPWr1002094@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Date: Mon, 25 Sep 2006 16:25:31 -0700
+Cc: akpm@osdl.org, tony.luck@intel.com, stable@kernel.org,
+        kamezawa.hiroyu@jp.fujitsu.com
+Subject: cpu to node relationship fixup: map cpu to node
+
+From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+
+Assume that a cpu is *physically* offlined at boot time...
+
+Because smpboot.c::smp_boot_cpu_map() canoot find cpu's sapicid,
+numa.c::build_cpu_to_node_map() cannot build cpu<->node map for
+offlined cpu.
+
+For such cpus, cpu_to_node map should be fixed at cpu-hot-add.
+This mapping should be done before cpu onlining.
+
+This patch also handles cpu hotremove case.
+
+Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Cc: "Luck, Tony" <tony.luck@intel.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/ia64/kernel/numa.c     |   34 +++++++++++++++++++++++++++++++---
+ arch/ia64/kernel/topology.c |    4 +++-
+ include/asm-ia64/numa.h     |    6 ++++++
+ 3 files changed, 40 insertions(+), 4 deletions(-)
+
+--- linux-2.6.18.orig/arch/ia64/kernel/numa.c
++++ linux-2.6.18/arch/ia64/kernel/numa.c
+@@ -29,6 +29,36 @@ EXPORT_SYMBOL(cpu_to_node_map);
+ cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
++void __cpuinit map_cpu_to_node(int cpu, int nid)
++{
++      int oldnid;
++      if (nid < 0) { /* just initialize by zero */
++              cpu_to_node_map[cpu] = 0;
++              return;
++      }
++      /* sanity check first */
++      oldnid = cpu_to_node_map[cpu];
++      if (cpu_isset(cpu, node_to_cpu_mask[oldnid])) {
++              return; /* nothing to do */
++      }
++      /* we don't have cpu-driven node hot add yet...
++         In usual case, node is created from SRAT at boot time. */
++      if (!node_online(nid))
++              nid = first_online_node;
++      cpu_to_node_map[cpu] = nid;
++      cpu_set(cpu, node_to_cpu_mask[nid]);
++      return;
++}
++
++void __cpuinit unmap_cpu_from_node(int cpu, int nid)
++{
++      WARN_ON(!cpu_isset(cpu, node_to_cpu_mask[nid]));
++      WARN_ON(cpu_to_node_map[cpu] != nid);
++      cpu_to_node_map[cpu] = 0;
++      cpu_clear(cpu, node_to_cpu_mask[nid]);
++}
++
++
+ /**
+  * build_cpu_to_node_map - setup cpu to node and node to cpumask arrays
+  *
+@@ -49,8 +79,6 @@ void __init build_cpu_to_node_map(void)
+                               node = node_cpuid[i].nid;
+                               break;
+                       }
+-              cpu_to_node_map[cpu] = (node >= 0) ? node : 0;
+-              if (node >= 0)
+-                      cpu_set(cpu, node_to_cpu_mask[node]);
++              map_cpu_to_node(cpu, node);
+       }
+ }
+--- linux-2.6.18.orig/arch/ia64/kernel/topology.c
++++ linux-2.6.18/arch/ia64/kernel/topology.c
+@@ -36,6 +36,7 @@ int arch_register_cpu(int num)
+        */
+       if (!can_cpei_retarget() && is_cpu_cpei_target(num))
+               sysfs_cpus[num].cpu.no_control = 1;
++      map_cpu_to_node(num, node_cpuid[num].nid);
+ #endif
+       return register_cpu(&sysfs_cpus[num].cpu, num);
+@@ -45,7 +46,8 @@ int arch_register_cpu(int num)
+ void arch_unregister_cpu(int num)
+ {
+-      return unregister_cpu(&sysfs_cpus[num].cpu);
++      unregister_cpu(&sysfs_cpus[num].cpu);
++      unmap_cpu_from_node(num, cpu_to_node(num));
+ }
+ EXPORT_SYMBOL(arch_register_cpu);
+ EXPORT_SYMBOL(arch_unregister_cpu);
+--- linux-2.6.18.orig/include/asm-ia64/numa.h
++++ linux-2.6.18/include/asm-ia64/numa.h
+@@ -64,7 +64,13 @@ extern int paddr_to_nid(unsigned long pa
+ #define local_nodeid (cpu_to_node_map[smp_processor_id()])
++extern void map_cpu_to_node(int cpu, int nid);
++extern void unmap_cpu_from_node(int cpu, int nid);
++
++
+ #else /* !CONFIG_NUMA */
++#define map_cpu_to_node(cpu, nid)     do{}while(0)
++#define unmap_cpu_from_node(cpu, nid) do{}while(0)
+ #define paddr_to_nid(addr)    0
diff --git a/queue-2.6.18/do-not-free-non-slab-allocated-per_cpu_pageset.patch b/queue-2.6.18/do-not-free-non-slab-allocated-per_cpu_pageset.patch
new file mode 100644 (file)
index 0000000..1dbdd72
--- /dev/null
@@ -0,0 +1,36 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:25:56 2006
+Message-Id: <200609252325.k8PNOwMD002071@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: David Rientjes <rientjes@cs.washington.edu>
+Date: Mon, 25 Sep 2006 16:24:57 -0700
+Cc: akpm@osdl.org, stable@kernel.org, rientjes@cs.washington.edu, clameter@sgi.com
+Subject: do not free non slab allocated per_cpu_pageset
+
+From: David Rientjes <rientjes@cs.washington.edu>
+
+Stops panic associated with attempting to free a non slab-allocated
+per_cpu_pageset.
+
+Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
+Acked-by: Christoph Lameter <clameter@sgi.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/page_alloc.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- linux-2.6.18.orig/mm/page_alloc.c
++++ linux-2.6.18/mm/page_alloc.c
+@@ -1847,8 +1847,10 @@ static inline void free_zone_pagesets(in
+       for_each_zone(zone) {
+               struct per_cpu_pageset *pset = zone_pcp(zone, cpu);
++              /* Free per_cpu_pageset if it is slab allocated */
++              if (pset != &boot_pageset[cpu])
++                      kfree(pset);
+               zone_pcp(zone, cpu) = NULL;
+-              kfree(pset);
+       }
+ }
diff --git a/queue-2.6.18/fix-vidioc_enumstd-bug.patch b/queue-2.6.18/fix-vidioc_enumstd-bug.patch
new file mode 100644 (file)
index 0000000..5e6276c
--- /dev/null
@@ -0,0 +1,47 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:27:59 2006
+Message-Id: <200609252325.k8PNPbRC002109@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: Jonathan Corbet <corbet-v4l@lwn.net>
+Date: Mon, 25 Sep 2006 16:25:37 -0700
+Cc: akpm@osdl.org, mchehab@infradead.org, stable@kernel.org,
+        corbet-v4l@lwn.net, corbet@lwn.net
+Subject: Fix VIDIOC_ENUMSTD bug
+
+From: Jonathan Corbet <corbet-v4l@lwn.net>
+
+The v4l2 API documentation for VIDIOC_ENUMSTD says:
+
+       To enumerate all standards applications shall begin at index
+       zero, incrementing by one until the driver returns EINVAL.
+
+The actual code, however, tests the index this way:
+
+               if (index<=0 || index >= vfd->tvnormsize) {
+                        ret=-EINVAL;
+
+So any application which passes in index=0 gets EINVAL right off the bat
+- and, in fact, this is what happens to mplayer.  So I think the
+following patch is called for, and maybe even appropriate for a 2.6.18.x
+stable release.
+
+Signed-off-by: Jonathan Corbet <corbet@lwn.net>
+Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ drivers/media/video/videodev.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.18.orig/drivers/media/video/videodev.c
++++ linux-2.6.18/drivers/media/video/videodev.c
+@@ -836,7 +836,7 @@ static int __video_do_ioctl(struct inode
+                       break;
+               }
+-              if (index<=0 || index >= vfd->tvnormsize) {
++              if (index < 0 || index >= vfd->tvnormsize) {
+                       ret=-EINVAL;
+                       break;
+               }
diff --git a/queue-2.6.18/i386-bootioremap-kexec-fix.patch b/queue-2.6.18/i386-bootioremap-kexec-fix.patch
new file mode 100644 (file)
index 0000000..fb3f8f2
--- /dev/null
@@ -0,0 +1,43 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:25:34 2006
+Message-Id: <200609252324.k8PNOeYQ002067@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: keith mannthey <kmannth@us.ibm.com>
+Date: Mon, 25 Sep 2006 16:24:39 -0700
+Cc: akpm@osdl.org, haveblue@us.ibm.com, bunk@stusta.de, vgoyal@in.ibm.com,
+        kmannth@us.ibm.com, stable@kernel.org
+Subject: i386 bootioremap / kexec fix
+
+From: keith mannthey <kmannth@us.ibm.com>
+
+With CONFIG_PHYSICAL_START set to a non default values the i386
+boot_ioremap code calculated its pte index wrong and users of boot_ioremap
+have their areas incorrectly mapped (for me SRAT table not mapped during
+early boot).  This patch removes the addr < BOOT_PTE_PTRS constraint.
+
+Signed-off-by: Keith Mannthey<kmannth@us.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Dave Hansen <haveblue@us.ibm.com>
+Cc: Adrian Bunk <bunk@stusta.de>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/mm/boot_ioremap.c |    7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- linux-2.6.18.orig/arch/i386/mm/boot_ioremap.c
++++ linux-2.6.18/arch/i386/mm/boot_ioremap.c
+@@ -29,8 +29,11 @@
+  */
+ #define BOOT_PTE_PTRS (PTRS_PER_PTE*2)
+-#define boot_pte_index(address) \
+-           (((address) >> PAGE_SHIFT) & (BOOT_PTE_PTRS - 1))
++
++static unsigned long boot_pte_index(unsigned long vaddr)
++{
++      return __pa(vaddr) >> PAGE_SHIFT;
++}
+ static inline boot_pte_t* boot_vaddr_to_pte(void *address)
+ {
diff --git a/queue-2.6.18/i386-fix-flat-mode-numa-on-a-real-numa-system.patch b/queue-2.6.18/i386-fix-flat-mode-numa-on-a-real-numa-system.patch
new file mode 100644 (file)
index 0000000..ef362c4
--- /dev/null
@@ -0,0 +1,45 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:26:15 2006
+Message-Id: <200609252325.k8PNPZwi002101@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: keith mannthey <kmannth@us.ibm.com>
+Date: Mon, 25 Sep 2006 16:25:35 -0700
+Cc: akpm@osdl.org, haveblue@us.ibm.com, ak@suse.de, apw@shadowen.org,
+        kmannth@us.ibm.com, stable@kernel.org
+Subject: i386: fix flat mode numa on a real numa system
+
+From: keith mannthey <kmannth@us.ibm.com>
+
+If there is only 1 node in the system cpus should think they are apart of
+some other node.
+
+If cases where a real numa system boots the Flat numa option make sure the
+cpus don't claim to be apart on a non-existent node.
+
+Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
+Cc: Andy Whitcroft <apw@shadowen.org>
+Cc: Dave Hansen <haveblue@us.ibm.com>
+Cc: Andi Kleen <ak@suse.de>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/smpboot.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- linux-2.6.18.orig/arch/i386/kernel/smpboot.c
++++ linux-2.6.18/arch/i386/kernel/smpboot.c
+@@ -642,9 +642,13 @@ static void map_cpu_to_logical_apicid(vo
+ {
+       int cpu = smp_processor_id();
+       int apicid = logical_smp_processor_id();
++      int node = apicid_to_node(apicid);
++
++      if (!node_online(node))
++              node = first_online_node;
+       cpu_2_logical_apicid[cpu] = apicid;
+-      map_cpu_to_node(cpu, apicid_to_node(apicid));
++      map_cpu_to_node(cpu, node);
+ }
+ static void unmap_cpu_to_logical_apicid(int cpu)
diff --git a/queue-2.6.18/load_module-no-bug-if-module_subsys-uninitialized.patch b/queue-2.6.18/load_module-no-bug-if-module_subsys-uninitialized.patch
new file mode 100644 (file)
index 0000000..23ca63d
--- /dev/null
@@ -0,0 +1,53 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:26:37 2006
+Message-Id: <200609252325.k8PNPaMU002105@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: "Ed Swierk" <eswierk@arastra.com>
+Date: Mon, 25 Sep 2006 16:25:36 -0700
+Cc: akpm@osdl.org, greg@kroah.com, mlhuang@cs.princeton.edu, stable@kernel.org,
+        eswierk@arastra.com
+Subject: load_module: no BUG if module_subsys uninitialized
+
+From: "Ed Swierk" <eswierk@arastra.com>
+
+Invoking load_module() before param_sysfs_init() is called crashes in
+mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.
+
+In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
+create a UNIX socket.  Calls to hotplug begin after the topology_init
+initcall.
+
+Another patch for the same symptom (module_subsys-initialize-earlier.patch)
+moves param_sysfs_init() to the subsys initcalls, but this is still not
+early enough in the boot process in some cases.  In particular,
+topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
+UNIX socket protocol) which can be compiled as a module.  Moving
+param_sysfs_init() to the postcore initcalls fixes this particular race,
+but there might well be other cases where a usermodehelper causes a module
+to load earlier still.
+
+The patch makes load_module() return an error rather than crashing the
+kernel if invoked before module_subsys is initialized.
+
+Cc: Mark Huang <mlhuang@cs.princeton.edu>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/module.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- linux-2.6.18.orig/kernel/module.c
++++ linux-2.6.18/kernel/module.c
+@@ -1054,6 +1054,12 @@ static int mod_sysfs_setup(struct module
+ {
+       int err;
++      if (!module_subsys.kset.subsys) {
++              printk(KERN_ERR "%s: module_subsys not initialized\n",
++                     mod->name);
++              err = -EINVAL;
++              goto out;
++      }
+       memset(&mod->mkobj.kobj, 0, sizeof(mod->mkobj.kobj));
+       err = kobject_set_name(&mod->mkobj.kobj, "%s", mod->name);
+       if (err)
diff --git a/queue-2.6.18/powerpc-fix-ohare-ide-irq-workaround-on-old-powermacs.patch b/queue-2.6.18/powerpc-fix-ohare-ide-irq-workaround-on-old-powermacs.patch
new file mode 100644 (file)
index 0000000..f9b52d0
--- /dev/null
@@ -0,0 +1,30 @@
+From benh@kernel.crashing.org Thu Sep 21 19:57:36 2006
+From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Subject: powerpc: Fix ohare IDE irq workaround on old powermacs
+To: Greg KH <greg@kroah.com>
+Date: Fri, 22 Sep 2006 12:57:26 +1000
+Message-Id: <1158893846.26347.147.camel@localhost.localdomain>
+
+From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+
+Looks like a workaround for old bogus OF bitrot... This fixes it and hence fixes
+boot on some performa machines.
+
+Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ide/ppc/pmac.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.18.orig/drivers/ide/ppc/pmac.c
++++ linux-2.6.18/drivers/ide/ppc/pmac.c
+@@ -1326,7 +1326,7 @@ pmac_ide_macio_attach(struct macio_dev *
+       if (macio_irq_count(mdev) == 0) {
+               printk(KERN_WARNING "ide%d: no intrs for device %s, using 13\n",
+                       i, mdev->ofdev.node->full_name);
+-              irq = 13;
++              irq = irq_create_mapping(NULL, 13);
+       } else
+               irq = macio_irq(mdev, 0);
diff --git a/queue-2.6.18/process_zones-fix-error-handling.patch b/queue-2.6.18/process_zones-fix-error-handling.patch
new file mode 100644 (file)
index 0000000..77c25ec
--- /dev/null
@@ -0,0 +1,69 @@
+From stable-bounces@linux.kernel.org Thu Sep 21 20:11:55 2006
+Message-Id: <200609220310.k8M3AvBe027426@shell0.pdx.osdl.net>
+To: mm-commits@vger.kernel.org
+From: Andrew Morton <akpm@osdl.org>
+Date: Thu, 21 Sep 2006 20:10:57 -0700
+Cc: akpm@osdl.org, kmannth@gmail.com, clameter@engr.sgi.com, stable@kernel.org, kamezawa.hiroyu@jp.fujitsu.com
+Subject: process_zones(): fix error handling
+
+
+From: Andrew Morton <akpm@osdl.org>
+
+If the kmalloc() fails we can leave some of this zone's per-cpu-pages pointers
+holding uninitialised memory.  Later, free_zone_pagesets() will pass that
+uninitialised memory to kfree() as a pointer, with suboptimal results.
+
+Cc: Keith Mannthey <kmannth@gmail.com>
+Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
+Cc: Christoph Lameter <clameter@engr.sgi.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+---
+ mm/page_alloc.c |   20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+--- linux-2.6.18.orig/mm/page_alloc.c
++++ linux-2.6.18/mm/page_alloc.c
+@@ -1811,11 +1811,14 @@ static struct per_cpu_pageset boot_pages
+  */
+ static int __cpuinit process_zones(int cpu)
+ {
+-      struct zone *zone, *dzone;
++      struct zone *zone;
+-      for_each_zone(zone) {
++      for_each_zone(zone)
++              zone_pcp(zone, cpu) = NULL;
+-              zone_pcp(zone, cpu) = kmalloc_node(sizeof(struct per_cpu_pageset),
++      for_each_zone(zone) {
++              zone_pcp(zone, cpu) =
++                      kmalloc_node(sizeof(struct per_cpu_pageset),
+                                        GFP_KERNEL, cpu_to_node(cpu));
+               if (!zone_pcp(zone, cpu))
+                       goto bad;
+@@ -1824,17 +1827,16 @@ static int __cpuinit process_zones(int c
+               if (percpu_pagelist_fraction)
+                       setup_pagelist_highmark(zone_pcp(zone, cpu),
+-                              (zone->present_pages / percpu_pagelist_fraction));
++                          (zone->present_pages / percpu_pagelist_fraction));
+       }
+       return 0;
+ bad:
+-      for_each_zone(dzone) {
+-              if (dzone == zone)
+-                      break;
+-              kfree(zone_pcp(dzone, cpu));
+-              zone_pcp(dzone, cpu) = NULL;
++      for_each_zone(zone) {
++              kfree(zone_pcp(zone, cpu));
++              zone_pcp(zone, cpu) = NULL;
+       }
++      printk(KERN_EMERG "%s: kmalloc() failed\n", __FUNCTION__);
+       return -ENOMEM;
+ }
diff --git a/queue-2.6.18/rtc-lockdep-fix-workaround.patch b/queue-2.6.18/rtc-lockdep-fix-workaround.patch
new file mode 100644 (file)
index 0000000..9369e2c
--- /dev/null
@@ -0,0 +1,50 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:25:24 2006
+Message-Id: <200609252324.k8PNOOcG002057@shell0.pdx.osdl.net>
+To: torvalds@osdl.org
+From: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Date: Mon, 25 Sep 2006 16:24:23 -0700
+Cc: akpm@osdl.org, mingo@elte.hu, a.p.zijlstra@chello.nl, stable@kernel.org
+Subject: rtc: lockdep fix/workaround
+
+From: Peter Zijlstra <a.p.zijlstra@chello.nl>
+
+BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
+ [<c04051ee>] show_trace_log_lvl+0x58/0x171
+ [<c0405802>] show_trace+0xd/0x10
+ [<c040591b>] dump_stack+0x19/0x1b
+ [<c043abee>] trace_hardirqs_on+0xa2/0x11e
+ [<c06143c3>] _spin_unlock_irq+0x22/0x26
+ [<c0541540>] rtc_get_rtc_time+0x32/0x176
+ [<c0419ba4>] hpet_rtc_interrupt+0x92/0x14d
+ [<c0450f94>] handle_IRQ_event+0x20/0x4d
+ [<c0451055>] __do_IRQ+0x94/0xef
+ [<c040678d>] do_IRQ+0x9e/0xbd
+ [<c0404a49>] common_interrupt+0x25/0x2c
+DWARF2 unwinder stuck at common_interrupt+0x25/0x2c
+
+Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Acked-by: Ingo Molnar <mingo@elte.hu>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/rtc.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- linux-2.6.18.orig/drivers/char/rtc.c
++++ linux-2.6.18/drivers/char/rtc.c
+@@ -209,11 +209,12 @@ static const unsigned char days_in_mo[] 
+  */
+ static inline unsigned char rtc_is_updating(void)
+ {
++      unsigned long flags;
+       unsigned char uip;
+-      spin_lock_irq(&rtc_lock);
++      spin_lock_irqsave(&rtc_lock, flags);
+       uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
+-      spin_unlock_irq(&rtc_lock);
++      spin_unlock_irqrestore(&rtc_lock, flags);
+       return uip;
+ }
index 2aed84630b206e512995643fdd894e2aea36568e..217ca533451050a2cf464713ae0271aa399a8f0a 100644 (file)
@@ -35,3 +35,15 @@ sky2-network-driver-device-ids.patch
 0013-Clean-up-exported-headers-on-CRIS.patch
 0014-Remove-offsetof-from-user-visible-linux-stddef.h.patch
 0015-powerpc-fix-building-gdb-against-asm-ptrace.h.patch
+sysfs-remove-duplicated-dput-in-sysfs_update_file.patch
+powerpc-fix-ohare-ide-irq-workaround-on-old-powermacs.patch
+process_zones-fix-error-handling.patch
+i386-bootioremap-kexec-fix.patch
+rtc-lockdep-fix-workaround.patch
+do-not-free-non-slab-allocated-per_cpu_pageset.patch
+backlight-fix-oops-in-__mutex_lock_slowpath-during-head-sys-class-graphics-fb0.patch
+cpu-to-node-relationship-fixup-acpi_map_cpu2node.patch
+cpu-to-node-relationship-fixup-map-cpu-to-node.patch
+i386-fix-flat-mode-numa-on-a-real-numa-system.patch
+load_module-no-bug-if-module_subsys-uninitialized.patch
+fix-vidioc_enumstd-bug.patch
diff --git a/queue-2.6.18/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch b/queue-2.6.18/sysfs-remove-duplicated-dput-in-sysfs_update_file.patch
new file mode 100644 (file)
index 0000000..e21f0e4
--- /dev/null
@@ -0,0 +1,81 @@
+From stable-bounces@linux.kernel.org Mon Sep 25 16:31:04 2006
+Message-Id: <200609252330.k8PNUDle002318@shell0.pdx.osdl.net>
+To: greg@kroah.com
+From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
+Date: Mon, 25 Sep 2006 16:30:13 -0700
+Cc: akpm@osdl.org, seto.hidetoshi@jp.fujitsu.com, stable@kernel.org
+Subject: sysfs: remove duplicated dput in sysfs_update_file
+
+From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
+
+Following function can drops d_count twice against one reference
+by lookup_one_len.
+
+<SOURCE>
+/**
+ * sysfs_update_file - update the modified timestamp on an object attribute.
+ * @kobj: object we're acting for.
+ * @attr: attribute descriptor.
+ */
+int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
+{
+        struct dentry * dir = kobj->dentry;
+        struct dentry * victim;
+        int res = -ENOENT;
+
+        mutex_lock(&dir->d_inode->i_mutex);
+        victim = lookup_one_len(attr->name, dir, strlen(attr->name));
+        if (!IS_ERR(victim)) {
+                /* make sure dentry is really there */
+                if (victim->d_inode &&
+                    (victim->d_parent->d_inode == dir->d_inode)) {
+                        victim->d_inode->i_mtime = CURRENT_TIME;
+                        fsnotify_modify(victim);
+
+                        /**
+                         * Drop reference from initial sysfs_get_dentry().
+                         */
+                        dput(victim);
+                        res = 0;
+                } else
+                        d_drop(victim);
+
+                /**
+                 * Drop the reference acquired from sysfs_get_dentry() above.
+                 */
+                dput(victim);
+        }
+        mutex_unlock(&dir->d_inode->i_mutex);
+
+        return res;
+}
+</SOURCE>
+
+PCI-hotplug (drivers/pci/hotplug/pci_hotplug_core.c) is only user of
+this function. I confirmed that dentry of /sys/bus/pci/slots/XXX/*
+have negative d_count value.
+
+This patch removes unnecessary dput().
+
+Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/sysfs/file.c |    5 -----
+ 1 file changed, 5 deletions(-)
+
+--- linux-2.6.18.orig/fs/sysfs/file.c
++++ linux-2.6.18/fs/sysfs/file.c
+@@ -483,11 +483,6 @@ int sysfs_update_file(struct kobject * k
+                   (victim->d_parent->d_inode == dir->d_inode)) {
+                       victim->d_inode->i_mtime = CURRENT_TIME;
+                       fsnotify_modify(victim);
+-
+-                      /**
+-                       * Drop reference from initial sysfs_get_dentry().
+-                       */
+-                      dput(victim);
+                       res = 0;
+               } else
+                       d_drop(victim);