]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add new stable patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Aug 2006 18:35:45 +0000 (11:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Aug 2006 18:35:45 +0000 (11:35 -0700)
queue-2.6.17/1394-fix-for-recently-added-firewire-patch-that-breaks-things-on-ppc.patch [new file with mode: 0644]
queue-2.6.17/md-fix-a-potential-null-dereference-in-md-raid1.patch [new file with mode: 0644]
queue-2.6.17/series
queue-2.6.17/swsusp-fix-swap_type_of.patch [new file with mode: 0644]

diff --git a/queue-2.6.17/1394-fix-for-recently-added-firewire-patch-that-breaks-things-on-ppc.patch b/queue-2.6.17/1394-fix-for-recently-added-firewire-patch-that-breaks-things-on-ppc.patch
new file mode 100644 (file)
index 0000000..4f893ba
--- /dev/null
@@ -0,0 +1,49 @@
+From stable-bounces@linux.kernel.org Fri Aug 18 16:11:02 2006
+Message-Id: <200608182310.k7INAGU5002770@shell0.pdx.osdl.net>
+To: mm-commits@vger.kernel.org
+From: Danny Tholen <obiwan@mailmij.org>
+Date: Fri, 18 Aug 2006 16:10:16 -0700
+Cc: scjody@modernduck.com, bcollins@ubuntu.com, benh@kernel.crashing.org, obiwan@mailmij.org, stefanr@s5r6.in-berlin.de, stable@kernel.org
+Subject: 1394: fix for recently added firewire patch that breaks things on ppc
+
+From: Danny Tholen <obiwan@mailmij.org>
+
+Recently a patch was added for preliminary suspend/resume handling on
+!PPC_PMAC.  However, this broke both suspend and firewire on powerpc
+because it saves the pci state after the device has already been disabled.
+
+This moves the save state to before the pmac specific code.
+
+Signed-off-by: Danny Tholen <obiwan@mailmij.org>
+Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
+Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Cc: Ben Collins <bcollins@ubuntu.com>
+Cc: Jody McIntyre <scjody@modernduck.com>
+Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ieee1394/ohci1394.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- linux-2.6.17.9.orig/drivers/ieee1394/ohci1394.c
++++ linux-2.6.17.9/drivers/ieee1394/ohci1394.c
+@@ -3548,6 +3548,8 @@ static int ohci1394_pci_resume (struct p
+ static int ohci1394_pci_suspend (struct pci_dev *pdev, pm_message_t state)
+ {
++      pci_save_state(pdev);
++
+ #ifdef CONFIG_PPC_PMAC
+       if (machine_is(powermac)) {
+               struct device_node *of_node;
+@@ -3559,8 +3561,6 @@ static int ohci1394_pci_suspend (struct 
+       }
+ #endif
+-      pci_save_state(pdev);
+-
+       return 0;
+ }
diff --git a/queue-2.6.17/md-fix-a-potential-null-dereference-in-md-raid1.patch b/queue-2.6.17/md-fix-a-potential-null-dereference-in-md-raid1.patch
new file mode 100644 (file)
index 0000000..f2a2bc0
--- /dev/null
@@ -0,0 +1,46 @@
+From stable-bounces@linux.kernel.org Sun Aug 20 17:06:06 2006
+From: NeilBrown <neilb@suse.de>
+To: Stable <stable@kernel.org>
+Date: Mon, 21 Aug 2006 10:05:26 +1000
+Message-Id: <1060821000526.22545@suse.de>
+Cc: linux-raid@vger.kernel.org
+Subject: MD: Fix a potential NULL dereference in md/raid1
+
+From: NeilBrown <neilb@suse.de>
+
+At the point where this 'atomic_add' is, rdev could be NULL, as seen by
+the fact that we test for this in the very next statement.
+
+Further is it is really the wrong place of the add.  We could add to the
+count of corrected errors once the are sure it was corrected, not before
+trying to correct it.
+
+Signed-off-by: Neil Brown <neilb@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+
+diff .prev/drivers/md/raid1.c ./drivers/md/raid1.c
+---
+ drivers/md/raid1.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- linux-2.6.17.9.orig/drivers/md/raid1.c
++++ linux-2.6.17.9/drivers/md/raid1.c
+@@ -1486,7 +1486,6 @@ static void raid1d(mddev_t *mddev)
+                                                       d = conf->raid_disks;
+                                               d--;
+                                               rdev = conf->mirrors[d].rdev;
+-                                              atomic_add(s, &rdev->corrected_errors);
+                                               if (rdev &&
+                                                   test_bit(In_sync, &rdev->flags)) {
+                                                       if (sync_page_io(rdev->bdev,
+@@ -1509,6 +1508,9 @@ static void raid1d(mddev_t *mddev)
+                                                                        s<<9, conf->tmppage, READ) == 0)
+                                                               /* Well, this device is dead */
+                                                               md_error(mddev, rdev);
++                                                      else
++                                                              atomic_add(s, &rdev->corrected_errors);
++
+                                               }
+                                       }
+                               } else {
index 95f7b62a1fa163764ad01f45b1c53b017128e868..48fa98f2a67c8e97c4a293f0f28fed6abbb9a13e 100644 (file)
@@ -16,3 +16,6 @@ ip_tables-fix-table-locking-in-ipt_do_table.patch
 ia64-local-dos-with-corrupted-elfs.patch
 fix-ipv4-routing-locking-bug.patch
 dm-bug-oops-fix.patch
+swsusp-fix-swap_type_of.patch
+md-fix-a-potential-null-dereference-in-md-raid1.patch
+1394-fix-for-recently-added-firewire-patch-that-breaks-things-on-ppc.patch
diff --git a/queue-2.6.17/swsusp-fix-swap_type_of.patch b/queue-2.6.17/swsusp-fix-swap_type_of.patch
new file mode 100644 (file)
index 0000000..afe0d4d
--- /dev/null
@@ -0,0 +1,39 @@
+From stable-bounces@linux.kernel.org Tue Aug 15 17:20:06 2006
+Message-Id: <200608160019.k7G0JO0N010906@shell0.pdx.osdl.net>
+To: mm-commits@vger.kernel.org
+From: "Rafael J. Wysocki" <rjw@sisk.pl>
+Date: Tue, 15 Aug 2006 17:19:24 -0700
+Cc: rjw@sisk.pl, hugh@veritas.com, pavel@suse.cz, stable@kernel.org
+Subject: swsusp: Fix swap_type_of
+
+From: "Rafael J. Wysocki" <rjw@sisk.pl>
+
+There is a bug in mm/swapfile.c#swap_type_of() that makes swsusp only be
+able to use the first active swap partition as the resume device.  Fix it.
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Cc: Hugh Dickins <hugh@veritas.com>
+Acked-by: Pavel Machek <pavel@suse.cz>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ mm/swapfile.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- linux-2.6.17.9.orig/mm/swapfile.c
++++ linux-2.6.17.9/mm/swapfile.c
+@@ -440,11 +440,12 @@ int swap_type_of(dev_t device)
+               if (!(swap_info[i].flags & SWP_WRITEOK))
+                       continue;
++
+               if (!device) {
+                       spin_unlock(&swap_lock);
+                       return i;
+               }
+-              inode = swap_info->swap_file->f_dentry->d_inode;
++              inode = swap_info[i].swap_file->f_dentry->d_inode;
+               if (S_ISBLK(inode->i_mode) &&
+                   device == MKDEV(imajor(inode), iminor(inode))) {
+                       spin_unlock(&swap_lock);