From: Greg Kroah-Hartman Date: Mon, 21 Aug 2006 18:35:45 +0000 (-0700) Subject: add new stable patches X-Git-Tag: v2.6.17.10~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e1e565cb46259373d404c41df9584b34cabc58ee;p=thirdparty%2Fkernel%2Fstable-queue.git add new stable patches --- 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 index 00000000000..4f893ba655c --- /dev/null +++ b/queue-2.6.17/1394-fix-for-recently-added-firewire-patch-that-breaks-things-on-ppc.patch @@ -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 +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 + +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 +Cc: Stefan Richter +Cc: Benjamin Herrenschmidt +Cc: Ben Collins +Cc: Jody McIntyre +Acked-by: Benjamin Herrenschmidt +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..f2a2bc04b5f --- /dev/null +++ b/queue-2.6.17/md-fix-a-potential-null-dereference-in-md-raid1.patch @@ -0,0 +1,46 @@ +From stable-bounces@linux.kernel.org Sun Aug 20 17:06:06 2006 +From: NeilBrown +To: Stable +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 + +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 +Signed-off-by: Greg Kroah-Hartman + + +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 { diff --git a/queue-2.6.17/series b/queue-2.6.17/series index 95f7b62a1fa..48fa98f2a67 100644 --- a/queue-2.6.17/series +++ b/queue-2.6.17/series @@ -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 index 00000000000..afe0d4dd6a8 --- /dev/null +++ b/queue-2.6.17/swsusp-fix-swap_type_of.patch @@ -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" +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" + +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 +Cc: Hugh Dickins +Acked-by: Pavel Machek +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + 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);