public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 00/20] 2.6.22-stable review
@ 2007-08-21  6:52 ` Greg KH
  2007-08-21  6:53   ` [patch 01/20] hwmon: fix w83781d temp sensor type setting Greg KH
                     ` (20 more replies)
  0 siblings, 21 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:52 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan

This is the start of the stable review cycle for the 2.6.22.5 release.
There are 20 patches in this series, all will be posted as a response to
this one.  If anyone has any issues with these being applied, please let
us know.  If anyone is a maintainer of the proper subsystem, and wants
to add a Signed-off-by: line to the patch, please respond with it.

These patches are sent out with a number of different people on the Cc:
line.  If you wish to be a reviewer, please email stable@kernel.org to
add your name to the list.  If you want to be off the reviewer list,
also email us.

Responses should be made by August 23 00:00:00 UTC 2007.  Anything
received after that time might be too late.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 01/20] hwmon: fix w83781d temp sensor type setting
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
@ 2007-08-21  6:53   ` Greg KH
  2007-08-21  6:53   ` [patch 02/20] hwmon: (smsc47m1) restore missing name attribute Greg KH
                     ` (19 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:53 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Mark M. Hoffman, Greg Kroah-Hartman

[-- Attachment #1: hwmon-fix-w83781d-temp-sensor-type-setting.patch --]
[-- Type: text/plain, Size: 1135 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: "Mark M. Hoffman" <mhoffman@lightlink.com>

Commit 348753379a7704087603dad403603e825422fd9a introduced a regression that
caused temp2 and temp3 sensor type settings to be written to temp1 instead.
The result is that temp sensor readings could be way off.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hwmon/w83781d.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -740,9 +740,9 @@ store_sensor(struct device *dev, struct 
 static SENSOR_DEVICE_ATTR(temp1_type, S_IRUGO | S_IWUSR,
 	show_sensor, store_sensor, 0);
 static SENSOR_DEVICE_ATTR(temp2_type, S_IRUGO | S_IWUSR,
-	show_sensor, store_sensor, 0);
+	show_sensor, store_sensor, 1);
 static SENSOR_DEVICE_ATTR(temp3_type, S_IRUGO | S_IWUSR,
-	show_sensor, store_sensor, 0);
+	show_sensor, store_sensor, 2);
 
 /* I2C devices get this name attribute automatically, but for ISA devices
    we must create it by ourselves. */

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 02/20] hwmon: (smsc47m1) restore missing name attribute
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
  2007-08-21  6:53   ` [patch 01/20] hwmon: fix w83781d temp sensor type setting Greg KH
@ 2007-08-21  6:53   ` Greg KH
  2007-08-21  6:53   ` [patch 03/20] sky2: restore workarounds for lost interrupts Greg KH
                     ` (18 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:53 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Mark M. Hoffman, Jean Delvare, Greg Kroah-Hartman

[-- Attachment #1: hwmon-restore-missing-name-attribute.patch --]
[-- Type: text/plain, Size: 1111 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------

From: Jean Delvare <khali@linux-fr.org>

The smsc47m1 driver no longer creates the name attribute used by
libsensors to identify chip types. It was lost during the conversion
to a platform driver. I was fooled by the fact that we do have a
group with all attributes, but only to delete them all at once. The
group is not used to create the attributes, so we have to explicitly
create the name attribute.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hwmon/smsc47m1.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/hwmon/smsc47m1.c
+++ b/drivers/hwmon/smsc47m1.c
@@ -585,6 +585,8 @@ static int __devinit smsc47m1_probe(stru
 
 	if ((err = device_create_file(dev, &dev_attr_alarms)))
 		goto error_remove_files;
+	if ((err = device_create_file(dev, &dev_attr_name)))
+		goto error_remove_files;
 
 	data->class_dev = hwmon_device_register(dev);
 	if (IS_ERR(data->class_dev)) {

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 03/20] sky2: restore workarounds for lost interrupts
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
  2007-08-21  6:53   ` [patch 01/20] hwmon: fix w83781d temp sensor type setting Greg KH
  2007-08-21  6:53   ` [patch 02/20] hwmon: (smsc47m1) restore missing name attribute Greg KH
@ 2007-08-21  6:53   ` Greg KH
  2007-08-21  6:54   ` [patch 04/20] sky2: carrier management Greg KH
                     ` (17 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:53 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, netdev,
	Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-lost-irq.patch --]
[-- Type: text/plain, Size: 1567 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

Backport of commit c59697e06058fc2361da8cefcfa3de85ac107582

This patch restores a couple of workarounds from 2.6.16:
 * restart transmit moderation timer in case it expires during IRQ routine
 * default to having 10 HZ watchdog timer.
At this point it more important not to hang than to worry about the
power cost.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -96,7 +96,7 @@ static int disable_msi = 0;
 module_param(disable_msi, int, 0);
 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
 
-static int idle_timeout = 0;
+static int idle_timeout = 100;
 module_param(idle_timeout, int, 0);
 MODULE_PARM_DESC(idle_timeout, "Watchdog timer for lost interrupts (ms)");
 
@@ -2442,6 +2442,13 @@ static int sky2_poll(struct net_device *
 
 	work_done = sky2_status_intr(hw, work_limit);
 	if (work_done < work_limit) {
+		/* Bug/Errata workaround?
+		 * Need to kick the TX irq moderation timer.
+		 */
+		if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
+			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
+			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
+		}
 		netif_rx_complete(dev0);
 
 		/* end of interrupt, re-enables also acts as I/O synchronization */

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 04/20] sky2: carrier management
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (2 preceding siblings ...)
  2007-08-21  6:53   ` [patch 03/20] sky2: restore workarounds for lost interrupts Greg KH
@ 2007-08-21  6:54   ` Greg KH
  2007-08-21  6:54   ` [patch 05/20] sky2: check for more work before leaving NAPI Greg KH
                     ` (16 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, netdev,
	Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-carrier-mgmt.patch --]
[-- Type: text/plain, Size: 2132 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

backport of commit 55d7b4e6ed6ad3ec5e5e30b3b4515a0a6a53e344

Make sky2 handle carrier similar to other drivers,
eliminate some possible races in carrier state transistions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1234,6 +1234,8 @@ static int sky2_up(struct net_device *de
 	if (netif_msg_ifup(sky2))
 		printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
 
+	netif_carrier_off(dev);
+
 	/* must be power of 2 */
 	sky2->tx_le = pci_alloc_consistent(hw->pdev,
 					   TX_RING_SIZE *
@@ -1573,7 +1575,6 @@ static int sky2_down(struct net_device *
 
 	/* Stop more packets from being queued */
 	netif_stop_queue(dev);
-	netif_carrier_off(dev);
 
 	/* Disable port IRQ */
 	imask = sky2_read32(hw, B0_IMSK);
@@ -1625,6 +1626,8 @@ static int sky2_down(struct net_device *
 
 	sky2_phy_power(hw, port, 0);
 
+	netif_carrier_off(dev);
+
 	/* turn off LED's */
 	sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
 
@@ -1689,7 +1692,6 @@ static void sky2_link_up(struct sky2_por
 	gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
 
 	netif_carrier_on(sky2->netdev);
-	netif_wake_queue(sky2->netdev);
 
 	/* Turn on link LED */
 	sky2_write8(hw, SK_REG(port, LNK_LED_REG),
@@ -1741,7 +1743,6 @@ static void sky2_link_down(struct sky2_p
 	gma_write16(hw, port, GM_GP_CTRL, reg);
 
 	netif_carrier_off(sky2->netdev);
-	netif_stop_queue(sky2->netdev);
 
 	/* Turn on link LED */
 	sky2_write8(hw, SK_REG(port, LNK_LED_REG), LINKLED_OFF);
@@ -3493,10 +3494,6 @@ static __devinit struct net_device *sky2
 	memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port * 8, ETH_ALEN);
 	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 
-	/* device is off until link detection */
-	netif_carrier_off(dev);
-	netif_stop_queue(dev);
-
 	return dev;
 }
 

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 05/20] sky2: check for more work before leaving NAPI
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (3 preceding siblings ...)
  2007-08-21  6:54   ` [patch 04/20] sky2: carrier management Greg KH
@ 2007-08-21  6:54   ` Greg KH
  2007-08-21  6:54   ` [patch 06/20] sky2: check drop truncated packets Greg KH
                     ` (15 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, netdev,
	Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-napi-fill.patch --]
[-- Type: text/plain, Size: 2291 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

Backport of commit 5c11ce700f77fada15b6264417d72462da4bbb1c

This patch avoids generating another IRQ if more packets
arrive while in the NAPI poll routine. Before marking device as
finished, it rechecks that the status ring is empty.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |   35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2428,8 +2428,7 @@ static void sky2_err_intr(struct sky2_hw
 static int sky2_poll(struct net_device *dev0, int *budget)
 {
 	struct sky2_hw *hw = ((struct sky2_port *) netdev_priv(dev0))->hw;
-	int work_limit = min(dev0->quota, *budget);
-	int work_done = 0;
+	int work_done;
 	u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
 
 	if (unlikely(status & Y2_IS_ERROR))
@@ -2441,25 +2440,25 @@ static int sky2_poll(struct net_device *
 	if (status & Y2_IS_IRQ_PHY2)
 		sky2_phy_intr(hw, 1);
 
-	work_done = sky2_status_intr(hw, work_limit);
-	if (work_done < work_limit) {
-		/* Bug/Errata workaround?
-		 * Need to kick the TX irq moderation timer.
-		 */
-		if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
-			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
-			sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
-		}
-		netif_rx_complete(dev0);
+	work_done = sky2_status_intr(hw, min(dev0->quota, *budget));
+	*budget -= work_done;
+	dev0->quota -= work_done;
 
-		/* end of interrupt, re-enables also acts as I/O synchronization */
-		sky2_read32(hw, B0_Y2_SP_LISR);
-		return 0;
-	} else {
-		*budget -= work_done;
-		dev0->quota -= work_done;
+	/* More work? */
+ 	if (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX))
 		return 1;
+
+	/* Bug/Errata workaround?
+	 * Need to kick the TX irq moderation timer.
+	 */
+	if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
+		sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
+		sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
 	}
+	netif_rx_complete(dev0);
+
+	sky2_read32(hw, B0_Y2_SP_LISR);
+	return 0;
 }
 
 static irqreturn_t sky2_intr(int irq, void *dev_id)

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 06/20] sky2: check drop truncated packets
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (4 preceding siblings ...)
  2007-08-21  6:54   ` [patch 05/20] sky2: check for more work before leaving NAPI Greg KH
@ 2007-08-21  6:54   ` Greg KH
  2007-08-21  6:54   ` [patch 07/20] revert "x86, serial: convert legacy COM ports to platform devices" Greg KH
                     ` (14 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, netdev,
	Stephen Hemminger, Greg Kroah-Hartman

[-- Attachment #1: sky2-stable-trunc.patch --]
[-- Type: text/plain, Size: 1105 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Stephen Hemminger <shemminger@linux-foundation.org>

Backport of commit 71749531f2d1954137a1a77422ef4ff29eb102dd

If packet larger than MTU is received, the driver uses hardware to
truncate the packet. Use the status registers to catch/drop them.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/sky2.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -2065,6 +2065,9 @@ static struct sk_buff *sky2_receive(stru
 	if (!(status & GMR_FS_RX_OK))
 		goto resubmit;
 
+	if (status >> 16 != length)
+		goto len_mismatch;
+
 	if (length < copybreak)
 		skb = receive_copy(sky2, re, length);
 	else
@@ -2074,6 +2077,11 @@ resubmit:
 
 	return skb;
 
+len_mismatch:
+	/* Truncation of overlength packets
+	   causes PHY length to not match MAC length */
+	++sky2->net_stats.rx_length_errors;
+
 error:
 	++sky2->net_stats.rx_errors;
 	if (status & GMR_FS_RX_FF_OV) {

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 07/20] revert "x86, serial: convert legacy COM ports to platform devices"
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (5 preceding siblings ...)
  2007-08-21  6:54   ` [patch 06/20] sky2: check drop truncated packets Greg KH
@ 2007-08-21  6:54   ` Greg KH
  2007-08-21  6:54   ` [patch 08/20] ACPICA: Fixed possible corruption of global GPE list Greg KH
                     ` (13 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	S??bastien Dugu??, Bjorn Helgaas, Len Brown, Adam Belay,
	Matthew Garrett, Russell King, Jeff Garzik, Michal Piotrowski,
	Sascha Sommer, Greg Kroah-Hartman

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch --]
[-- Type: text/plain; charset=unknown-8bit, Size: 8791 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Andrew Morton <akpm@linux-foundation.org>

Revert 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26.  It broke Sébastien Dugué's
machine and Jeff said (persuasively)

  This seems like it will break decades-long-working stuff, in favor of
  breaking new ground in our favorite area, "trusting the BIOS."

  It's just not worth it for serial ports, IMO.  Serial ports are something
  that just shouldn't break at this late stage in the game.  My new Intel
  platform boxes don't even have serial ports, so I question the value of
  messing with serial port probing even more...  because...  just wait a year,
  and your box won't have a serial port either!  :)

  I certainly don't object to the use of platform devices (or isa_driver),
  but the probe change seems questionable.  That's sorta analagous to
  rewriting the floppy driver probe routine.  Sure you could do it...  but why
  risk all that damage and go through debugging all over again?

  It seems clear from this report that we cannot, should not, trust BIOS for
  something (a) so simple and (b) that has been working for over a decade.

Much discussion ensued and we've decided to have another go at all of this.

Cc: Sébastien Dugué <sebastien.dugue@bull.net>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Jeff Garzik <jeff@garzik.org>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/kernel-parameters.txt |    5 --
 arch/i386/kernel/Makefile           |    1 
 arch/i386/kernel/legacy_serial.c    |   67 ------------------------------------
 arch/x86_64/kernel/Makefile         |    2 -
 drivers/serial/Kconfig              |   14 ++-----
 include/asm-i386/serial.h           |   16 ++++++++
 include/asm-x86_64/serial.h         |   16 ++++++++
 7 files changed, 37 insertions(+), 84 deletions(-)

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -850,11 +850,6 @@ and is between 256 and 4096 characters. 
 	lasi=		[HW,SCSI] PARISC LASI driver for the 53c700 chip
 			Format: addr:<io>,irq:<irq>
 
-	legacy_serial.force [HW,IA-32,X86-64]
-			Probe for COM ports at legacy addresses even
-			if PNPBIOS or ACPI should describe them.  This
-			is for working around firmware defects.
-
 	llsc*=		[IA64] See function print_params() in
 			arch/ia64/sn/kernel/llsc4.c.
 
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -35,7 +35,6 @@ obj-y				+= sysenter.o vsyscall.o
 obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
 obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
 obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault.o
-obj-$(CONFIG_SERIAL_8250)	+= legacy_serial.o
 obj-$(CONFIG_VM86)		+= vm86.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
--- a/arch/i386/kernel/legacy_serial.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI.
- * Data taken from include/asm-i386/serial.h.
- *
- * (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
- *	Bjorn Helgaas <bjorn.helgaas@hp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/pnp.h>
-#include <linux/serial_8250.h>
-
-/* Standard COM flags (except for COM4, because of the 8514 problem) */
-#ifdef CONFIG_SERIAL_DETECT_IRQ
-#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ)
-#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ)
-#else
-#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)
-#define COM4_FLAGS UPF_BOOT_AUTOCONF
-#endif
-
-#define PORT(_base,_irq,_flags)				\
-	{						\
-		.iobase		= _base,		\
-		.irq		= _irq,			\
-		.uartclk	= 1843200,		\
-		.iotype		= UPIO_PORT,		\
-		.flags		= _flags,		\
-	}
-
-static struct plat_serial8250_port x86_com_data[] = {
-	PORT(0x3F8, 4, COM_FLAGS),
-	PORT(0x2F8, 3, COM_FLAGS),
-	PORT(0x3E8, 4, COM_FLAGS),
-	PORT(0x2E8, 3, COM4_FLAGS),
-	{ },
-};
-
-static struct platform_device x86_com_device = {
-	.name			= "serial8250",
-	.id			= PLAT8250_DEV_PLATFORM,
-	.dev			= {
-		.platform_data	= x86_com_data,
-	},
-};
-
-static int force_legacy_probe;
-module_param_named(force, force_legacy_probe, bool, 0);
-MODULE_PARM_DESC(force, "Force legacy serial port probe");
-
-static int __init serial8250_x86_com_init(void)
-{
-	if (pnp_platform_devices && !force_legacy_probe)
-		return -ENODEV;
-
-	return platform_device_register(&x86_com_device);
-}
-
-module_init(serial8250_x86_com_init);
-
-MODULE_AUTHOR("Bjorn Helgaas");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module");
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -32,7 +32,6 @@ obj-$(CONFIG_EARLY_PRINTK)	+= early_prin
 obj-$(CONFIG_IOMMU)		+= pci-gart.o aperture.o
 obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary.o tce.o
 obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb.o
-obj-$(CONFIG_SERIAL_8250)	+= legacy_serial.o
 obj-$(CONFIG_KPROBES)		+= kprobes.o
 obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer.o
 obj-$(CONFIG_X86_VSMP)		+= vsmp.o
@@ -50,7 +49,6 @@ CFLAGS_vsyscall.o		:= $(PROFILING) -g0
 
 therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
 bootflag-y			+= ../../i386/kernel/bootflag.o
-legacy_serial-y			+= ../../i386/kernel/legacy_serial.o
 cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
 topology-y                     += ../../i386/kernel/topology.o
 microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -74,21 +74,17 @@ config SERIAL_8250_PCI
 	depends on SERIAL_8250 && PCI
 	default SERIAL_8250
 	help
-	  Say Y here if you have PCI serial ports.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called 8250_pci.
+	  This builds standard PCI serial support. You may be able to
+	  disable this feature if you only need legacy serial support.
+	  Saves about 9K.
 
 config SERIAL_8250_PNP
 	tristate "8250/16550 PNP device support" if EMBEDDED
 	depends on SERIAL_8250 && PNP
 	default SERIAL_8250
 	help
-	  Say Y here if you have serial ports described by PNPBIOS or ACPI.
-	  These are typically ports built into the system board.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called 8250_pnp.
+	  This builds standard PNP serial support. You may be able to
+	  disable this feature if you only need legacy serial support.
 
 config SERIAL_8250_HP300
 	tristate
--- a/include/asm-i386/serial.h
+++ b/include/asm-i386/serial.h
@@ -11,3 +11,19 @@
  * megabits/second; but this requires the faster clock.
  */
 #define BASE_BAUD ( 1843200 / 16 )
+
+/* Standard COM flags (except for COM4, because of the 8514 problem) */
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
+#endif
+
+#define SERIAL_PORT_DFNS			\
+	/* UART CLK   PORT IRQ     FLAGS        */			\
+	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
+	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
+	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
+	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */
--- a/include/asm-x86_64/serial.h
+++ b/include/asm-x86_64/serial.h
@@ -11,3 +11,19 @@
  * megabits/second; but this requires the faster clock.
  */
 #define BASE_BAUD ( 1843200 / 16 )
+
+/* Standard COM flags (except for COM4, because of the 8514 problem) */
+#ifdef CONFIG_SERIAL_DETECT_IRQ
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
+#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
+#else
+#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
+#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
+#endif
+
+#define SERIAL_PORT_DFNS			\
+	/* UART CLK   PORT IRQ     FLAGS        */			\
+	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\
+	{ 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },	/* ttyS1 */	\
+	{ 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },	/* ttyS2 */	\
+	{ 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },	/* ttyS3 */

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 08/20] ACPICA: Fixed possible corruption of global GPE list
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (6 preceding siblings ...)
  2007-08-21  6:54   ` [patch 07/20] revert "x86, serial: convert legacy COM ports to platform devices" Greg KH
@ 2007-08-21  6:54   ` Greg KH
  2007-08-21  6:55   ` [patch 09/20] ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs Greg KH
                     ` (12 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:54 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Len Brown,
	Bob Moore, Greg Kroah-Hartman

[-- Attachment #1: acpica-fixed-possible-corruption-of-global-gpe-list.patch --]
[-- Type: text/plain, Size: 1045 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Bob Moore <robert.moore@intel.com>

ACPICA: Fixed possible corruption of global GPE list

Fixed a problem in acpi_ev_delete_gpe_xrupt where the global interrupt
list could be corrupted if the interrupt being removed was at
the head of the list. Reported by Linn Crosetto.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/events/evgpeblk.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -586,6 +586,10 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe
 	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
 	if (gpe_xrupt->previous) {
 		gpe_xrupt->previous->next = gpe_xrupt->next;
+	} else {
+		/* No previous, update list head */
+
+		acpi_gbl_gpe_xrupt_list_head = gpe_xrupt->next;
 	}
 
 	if (gpe_xrupt->next) {

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 09/20] ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (7 preceding siblings ...)
  2007-08-21  6:54   ` [patch 08/20] ACPICA: Fixed possible corruption of global GPE list Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 10/20] AVR32: Fix atomic_add_unless() and atomic_sub_unless() Greg KH
                     ` (11 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Len Brown,
	Bob Moore, Greg Kroah-Hartman

[-- Attachment #1: acpica-clear-reserved-fields-for-incoming-acpi-1.0-fadts.patch --]
[-- Type: text/plain, Size: 4145 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Bob Moore <robert.moore@intel.com>

ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs

Fixed a problem with the internal FADT conversion where ACPI 1.0
FADTs that contained invalid non-zero values in reserved fields
could cause later failures because these fields have meaning in
later revisions of the FADT. For incoming ACPI 1.0 FADTs, these
fields are now always zeroed. (Preferred_PM_Profile, PSTATE_CNT,
CST_CNT, IAPC_BOOT_FLAGS.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/acpi/tables/tbfadt.c |   44 +++++++++++++++++++++++++------------------
 1 file changed, 26 insertions(+), 18 deletions(-)

--- a/drivers/acpi/tables/tbfadt.c
+++ b/drivers/acpi/tables/tbfadt.c
@@ -211,14 +211,17 @@ void acpi_tb_parse_fadt(acpi_native_uint
  * DESCRIPTION: Get a local copy of the FADT and convert it to a common format.
  *              Performs validation on some important FADT fields.
  *
+ * NOTE:        We create a local copy of the FADT regardless of the version.
+ *
  ******************************************************************************/
 
 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 {
 
 	/*
-	 * Check if the FADT is larger than what we know about (ACPI 2.0 version).
-	 * Truncate the table, but make some noise.
+	 * Check if the FADT is larger than the largest table that we expect
+	 * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue
+	 * a warning.
 	 */
 	if (length > sizeof(struct acpi_table_fadt)) {
 		ACPI_WARNING((AE_INFO,
@@ -227,10 +230,12 @@ void acpi_tb_create_local_fadt(struct ac
 			      sizeof(struct acpi_table_fadt)));
 	}
 
-	/* Copy the entire FADT locally. Zero first for tb_convert_fadt */
+	/* Clear the entire local FADT */
 
 	ACPI_MEMSET(&acpi_gbl_FADT, 0, sizeof(struct acpi_table_fadt));
 
+	/* Copy the original FADT, up to sizeof (struct acpi_table_fadt) */
+
 	ACPI_MEMCPY(&acpi_gbl_FADT, table,
 		    ACPI_MIN(length, sizeof(struct acpi_table_fadt)));
 
@@ -251,7 +256,7 @@ void acpi_tb_create_local_fadt(struct ac
  * RETURN:      None
  *
  * DESCRIPTION: Converts all versions of the FADT to a common internal format.
- *              -> Expand all 32-bit addresses to 64-bit.
+ *              Expand all 32-bit addresses to 64-bit.
  *
  * NOTE:        acpi_gbl_FADT must be of size (struct acpi_table_fadt),
  *              and must contain a copy of the actual FADT.
@@ -292,8 +297,23 @@ static void acpi_tb_convert_fadt(void)
 	}
 
 	/*
-	 * Expand the 32-bit V1.0 addresses to the 64-bit "X" generic address
-	 * structures as necessary.
+	 * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
+	 * should be zero are indeed zero. This will workaround BIOSs that
+	 * inadvertently place values in these fields.
+	 *
+	 * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at
+	 * offset 45, 55, 95, and the word located at offset 109, 110.
+	 */
+	if (acpi_gbl_FADT.header.revision < 3) {
+		acpi_gbl_FADT.preferred_profile = 0;
+		acpi_gbl_FADT.pstate_control = 0;
+		acpi_gbl_FADT.cst_control = 0;
+		acpi_gbl_FADT.boot_flags = 0;
+	}
+
+	/*
+	 * Expand the ACPI 1.0 32-bit V1.0 addresses to the ACPI 2.0 64-bit "X"
+	 * generic address structures as necessary.
 	 */
 	for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
 		target =
@@ -349,18 +369,6 @@ static void acpi_tb_convert_fadt(void)
 		    acpi_gbl_FADT.xpm1a_event_block.space_id;
 
 	}
-
-	/*
-	 * For ACPI 1.0 FADTs, ensure that reserved fields (which should be zero)
-	 * are indeed zero. This will workaround BIOSs that inadvertently placed
-	 * values in these fields.
-	 */
-	if (acpi_gbl_FADT.header.revision < 3) {
-		acpi_gbl_FADT.preferred_profile = 0;
-		acpi_gbl_FADT.pstate_control = 0;
-		acpi_gbl_FADT.cst_control = 0;
-		acpi_gbl_FADT.boot_flags = 0;
-	}
 }
 
 /******************************************************************************

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 10/20] AVR32: Fix atomic_add_unless() and atomic_sub_unless()
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (8 preceding siblings ...)
  2007-08-21  6:55   ` [patch 09/20] ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 11/20] r8169: avoid needless NAPI poll scheduling Greg KH
                     ` (10 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Haavard Skinnemoen, Greg Kroah-Hartman

[-- Attachment #1: avr32-fix-atomic_add_unless-and-atomic_sub_unless.patch --]
[-- Type: text/plain, Size: 1385 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Haavard Skinnemoen <hskinnemoen@atmel.com>

These functions depend on "result" being initalized to 0, but "result"
is not included as an input constraint to the inline assembly block
following its initialization, only as an output constraint. Thus gcc
thinks it doesn't need to initialize it, so result ends up undefined
if the "unless" condition is true.

This fixes an oops in sunrpc where the faulty atomics caused
rpciod_up() to not start the workqueue as it should.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/asm-avr32/atomic.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/asm-avr32/atomic.h
+++ b/include/asm-avr32/atomic.h
@@ -101,7 +101,7 @@ static inline int atomic_sub_unless(atom
 		"	mov	%1, 1\n"
 		"1:"
 		: "=&r"(tmp), "=&r"(result), "=o"(v->counter)
-		: "m"(v->counter), "rKs21"(a), "rKs21"(u)
+		: "m"(v->counter), "rKs21"(a), "rKs21"(u), "1"(result)
 		: "cc", "memory");
 
 	return result;
@@ -137,7 +137,7 @@ static inline int atomic_add_unless(atom
 			"	mov	%1, 1\n"
 			"1:"
 			: "=&r"(tmp), "=&r"(result), "=o"(v->counter)
-			: "m"(v->counter), "r"(a), "ir"(u)
+			: "m"(v->counter), "r"(a), "ir"(u), "1"(result)
 			: "cc", "memory");
 	}
 

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 11/20] r8169: avoid needless NAPI poll scheduling
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (9 preceding siblings ...)
  2007-08-21  6:55   ` [patch 10/20] AVR32: Fix atomic_add_unless() and atomic_sub_unless() Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 12/20] forcedeth: fix random hang in forcedeth driver when using netconsole Greg KH
                     ` (9 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Thomas M?ller, Andreas Adamis, Francois Romieu,
	Greg Kroah-Hartman

[-- Attachment #1: r8169-avoid-needless-napi-poll-scheduling.patch --]
[-- Type: text/plain, Size: 1703 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Francois Romieu <romieu@fr.zoreil.com>

Theory  : though needless, it should not have hurt.
Practice: it does not play nice with DEBUG_SHIRQ + LOCKDEP + UP
(see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=3D242572).
 

The patch makes sense in itself but I should dig why it has an effect
on #242572 (assuming that NAPI do not change in a near future).

Patch in mainline as 313b0305b5a1e7e0fb39383befbf79558ce68a9c.
Backported to 2.6.22-stable by Thomas M=FCller.

Signed-off-by: Thomas M=FCller <thomas@mathtm.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/r8169.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2649,14 +2649,16 @@ rtl8169_interrupt(int irq, void *dev_ins
 			rtl8169_check_link_status(dev, tp, ioaddr);
 
 #ifdef CONFIG_R8169_NAPI
-		RTL_W16(IntrMask, rtl8169_intr_mask & ~rtl8169_napi_event);
-		tp->intr_mask = ~rtl8169_napi_event;
-
-		if (likely(netif_rx_schedule_prep(dev)))
-			__netif_rx_schedule(dev);
-		else if (netif_msg_intr(tp)) {
-			printk(KERN_INFO "%s: interrupt %04x taken in poll\n",
-			       dev->name, status);
+		if (status & rtl8169_napi_event) {
+			RTL_W16(IntrMask, rtl8169_intr_mask & ~rtl8169_napi_event);
+			tp->intr_mask = ~rtl8169_napi_event;
+
+			if (likely(netif_rx_schedule_prep(dev)))
+				__netif_rx_schedule(dev);
+			else if (netif_msg_intr(tp)) {
+				printk(KERN_INFO "%s: interrupt %04x in poll\n",
+				       dev->name, status);
+			}
 		}
 		break;
 #else

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 12/20] forcedeth: fix random hang in forcedeth driver when using netconsole
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (10 preceding siblings ...)
  2007-08-21  6:55   ` [patch 11/20] r8169: avoid needless NAPI poll scheduling Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 13/20] libata: add ATI SB700 device IDs to AHCI driver Greg KH
                     ` (8 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable, Linus Torvalds
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, akpm, alan, Timo Jantunen,
	Greg Kroah-Hartman

[-- Attachment #1: forcedeth-fix-random-hang-in-forcedeth-driver-when-using-netconsole.patch --]
[-- Type: text/plain, Size: 2950 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Timo Jantunen <jeti@iki.fi>

If the forcedeth driver receives too much work in an interrupt, it
assumes it has a broken hardware with stuck IRQ. It works around the
problem by disabling interrupts on the nic but makes a printk while
holding device spinlog - which isn't smart thing to do if you have
netconsole on the same nic.

This patch moves the printk's out of the spinlock protected area.


Without this patch the machine hangs hard. With this patch everything
still works even when there is significant increase on CPU usage while
using the nic.

Signed-off-by: Timo Jantunen <jeti@iki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/net/forcedeth.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -3067,8 +3067,8 @@ static irqreturn_t nv_nic_irq(int foo, v
 				np->nic_poll_irq = np->irqmask;
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
-			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
 			spin_unlock(&np->lock);
+			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
 			break;
 		}
 
@@ -3185,8 +3185,8 @@ static irqreturn_t nv_nic_irq_optimized(
 				np->nic_poll_irq = np->irqmask;
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
-			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
 			spin_unlock(&np->lock);
+			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
 			break;
 		}
 
@@ -3232,8 +3232,8 @@ static irqreturn_t nv_nic_irq_tx(int foo
 				np->nic_poll_irq |= NVREG_IRQ_TX_ALL;
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
-			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i);
 			spin_unlock_irqrestore(&np->lock, flags);
+			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i);
 			break;
 		}
 
@@ -3347,8 +3347,8 @@ static irqreturn_t nv_nic_irq_rx(int foo
 				np->nic_poll_irq |= NVREG_IRQ_RX_ALL;
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
-			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i);
 			spin_unlock_irqrestore(&np->lock, flags);
+			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i);
 			break;
 		}
 	}
@@ -3420,8 +3420,8 @@ static irqreturn_t nv_nic_irq_other(int 
 				np->nic_poll_irq |= NVREG_IRQ_OTHER;
 				mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
 			}
-			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i);
 			spin_unlock_irqrestore(&np->lock, flags);
+			printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i);
 			break;
 		}
 

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 13/20] libata: add ATI SB700 device IDs to AHCI driver
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (11 preceding siblings ...)
  2007-08-21  6:55   ` [patch 12/20] forcedeth: fix random hang in forcedeth driver when using netconsole Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 14/20] Hibernation: do not try to mark invalid PFNs as nosave Greg KH
                     ` (7 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Jeff Garzik, su henry, Greg Kroah-Hartman

[-- Attachment #1: libata-add-ati-sb700-device-ids-to-ahci-driver.patch --]
[-- Type: text/plain, Size: 1472 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: su henry <henry.su.ati@gmail.com>

The SATA controller device ID is different according to
the onchip SATA type set in the system BIOS:
Device                              Device ID
SATA in IDE mode             0x4390
SATA in AHCI mode           0x4391
SATA in non-raid5 driver     0x4392
SATA in raid5 driver           0x4393

Although the device ID is different, they use the same AHCI driver
.The attached file is the patch for adding these device
IDs for ATI SB700.

Signed-off-by: su henry <henry.su.ati@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/ahci.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -399,7 +399,10 @@ static const struct pci_device_id ahci_p
 
 	/* ATI */
 	{ PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
-	{ PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700 */
+	{ PCI_VDEVICE(ATI, 0x4390), board_ahci_sb600 }, /* ATI SB700 IDE */
+	{ PCI_VDEVICE(ATI, 0x4391), board_ahci_sb600 }, /* ATI SB700 AHCI */
+	{ PCI_VDEVICE(ATI, 0x4392), board_ahci_sb600 }, /* ATI SB700 nraid5 */
+	{ PCI_VDEVICE(ATI, 0x4393), board_ahci_sb600 }, /* ATI SB700 raid5 */
 
 	/* VIA */
 	{ PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 14/20] Hibernation: do not try to mark invalid PFNs as nosave
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (12 preceding siblings ...)
  2007-08-21  6:55   ` [patch 13/20] libata: add ATI SB700 device IDs to AHCI driver Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 15/20] i386: allow debuggers to access the vsyscall page with compat vDSO Greg KH
                     ` (6 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Rafael J. Wysocki, Pavel Machek, Greg Kroah-Hartman

[-- Attachment #1: hibernation-do-not-try-to-mark-invalid-pfns-as-nosave.patch --]
[-- Type: text/plain, Size: 1094 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Rafael J. Wysocki <rjw@sisk.pl>

On some systems some PFNs reported by the early initialization code as 'nosave'
may be invalid. =A0If we try to set the corresponding bits in the hibernation
bitmap, BUG_ON() in memory_bm_find_bit() will be triggered and the system
won't be able to boot (cf. https://bugzilla.novell.com/show_bug.cgi?id=296242).

Prevent this from happening by verifying if the 'nosave' PFNs are valid in
mark_nosave_pages().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/power/snapshot.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -709,7 +709,8 @@ static void mark_nosave_pages(struct mem
 				region->end_pfn << PAGE_SHIFT);
 
 		for (pfn = region->start_pfn; pfn < region->end_pfn; pfn++)
-			memory_bm_set_bit(bm, pfn);
+			if (pfn_valid(pfn))
+				memory_bm_set_bit(bm, pfn);
 	}
 }
 

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 15/20] i386: allow debuggers to access the vsyscall page with compat vDSO
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (13 preceding siblings ...)
  2007-08-21  6:55   ` [patch 14/20] Hibernation: do not try to mark invalid PFNs as nosave Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 16/20] x86_64: Check for .cfi_rel_offset in CFI probe Greg KH
                     ` (5 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable, jbeulich, patches
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Andi Kleen,
	Greg Kroah-Hartman

[-- Attachment #1: i386-allow-debuggers-to-access-the-vsyscall-page-with-compat-vdso.patch --]
[-- Type: text/plain, Size: 795 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Jan Beulich <jbeulich@novell.com>


From: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/i386/kernel/sysenter.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -336,7 +336,9 @@ struct vm_area_struct *get_gate_vma(stru
 
 int in_gate_area(struct task_struct *task, unsigned long addr)
 {
-	return 0;
+	const struct vm_area_struct *vma = get_gate_vma(task);
+
+	return vma && addr >= vma->vm_start && addr < vma->vm_end;
 }
 
 int in_gate_area_no_task(unsigned long addr)

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 16/20] x86_64: Check for .cfi_rel_offset in CFI probe
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (14 preceding siblings ...)
  2007-08-21  6:55   ` [patch 15/20] i386: allow debuggers to access the vsyscall page with compat vDSO Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:55   ` [patch 17/20] x86_64: Change PMDS invocation to single macro Greg KH
                     ` (4 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable, jbeulich, patches
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan,
	Sam Ravnborg, Greg Kroah-Hartman

[-- Attachment #1: x86_64-check-for-.cfi_rel_offset-in-cfi-probe.patch --]
[-- Type: text/plain, Size: 2016 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Andi Kleen <ak@suse.de>


Very old binutils have .cfi_startproc/endproc, but
no .cfi_rel_offset. Check for .cfi_rel_offset too.

Cc: Jan Beulich <jbeulich@novell.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/i386/Makefile   |    4 ++--
 arch/x86_64/Makefile |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -51,8 +51,8 @@ cflags-y += -maccumulate-outgoing-args
 CFLAGS				+= $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;)
 
 # do binutils support CFI?
-cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
-AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
 
 # is .cfi_signal_frame supported too?
 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -57,8 +57,8 @@ cflags-y += $(call cc-option,-mno-sse -m
 cflags-y += -maccumulate-outgoing-args
 
 # do binutils support CFI?
-cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
-AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
+AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset rsp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,)
 
 # is .cfi_signal_frame supported too?
 cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,)

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 17/20] x86_64: Change PMDS invocation to single macro
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (15 preceding siblings ...)
  2007-08-21  6:55   ` [patch 16/20] x86_64: Check for .cfi_rel_offset in CFI probe Greg KH
@ 2007-08-21  6:55   ` Greg KH
  2007-08-21  6:56   ` [patch 18/20] i386: Handle P6s without performance counters in nmi watchdog Greg KH
                     ` (3 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:55 UTC (permalink / raw)
  To: linux-kernel, stable, patches
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Andi Kleen,
	Greg Kroah-Hartman

[-- Attachment #1: x86_64-change-pmds-invocation-to-single-macro.patch --]
[-- Type: text/plain, Size: 1273 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Andi Kleen <ak@suse.de>

Very old binutils (2.12.90...) seem to have trouble with newlines
in assembler macro invocation. They put them into the resulting
argument expansion. In this case this lead to a parse error because
a .rept expression ended up spread over multiple lines. Change the PMDS()
invocation to a single line.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86_64/kernel/head.S |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -326,8 +326,7 @@ NEXT_PAGE(level2_kernel_pgt)
 	/* 40MB kernel mapping. The kernel code cannot be bigger than that.
 	   When you change this change KERNEL_TEXT_SIZE in page.h too. */
 	/* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */
-	PMDS(0x0000000000000000, __PAGE_KERNEL_LARGE_EXEC|_PAGE_GLOBAL,
-		KERNEL_TEXT_SIZE/PMD_SIZE)
+	PMDS(0x0000000000000000, __PAGE_KERNEL_LARGE_EXEC|_PAGE_GLOBAL, KERNEL_TEXT_SIZE/PMD_SIZE)
 	/* Module mapping starts here */
 	.fill	(PTRS_PER_PMD - (KERNEL_TEXT_SIZE/PMD_SIZE)),8,0
 

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 18/20] i386: Handle P6s without performance counters in nmi watchdog
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (16 preceding siblings ...)
  2007-08-21  6:55   ` [patch 17/20] x86_64: Change PMDS invocation to single macro Greg KH
@ 2007-08-21  6:56   ` Greg KH
  2007-08-21  6:56   ` [patch 19/20] i386: Fix double fault handler Greg KH
                     ` (2 subsequent siblings)
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:56 UTC (permalink / raw)
  To: linux-kernel, stable, avi, patches
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, torvalds, akpm, alan, Andi Kleen,
	Greg Kroah-Hartman

[-- Attachment #1: i386-handle-p6s-without-performance-counters-in-nmi-watchdog.patch --]
[-- Type: text/plain, Size: 959 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Andi Kleen <ak@suse.de>

I got an oops while booting a 32bit kernel on KVM because it doesn't
implement performance counters used by the NMI watchdog. Handle this
case.


Cc: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/i386/kernel/cpu/perfctr-watchdog.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/i386/kernel/cpu/perfctr-watchdog.c
+++ b/arch/i386/kernel/cpu/perfctr-watchdog.c
@@ -346,7 +346,9 @@ static int setup_p6_watchdog(unsigned nm
 	perfctr_msr = MSR_P6_PERFCTR0;
 	evntsel_msr = MSR_P6_EVNTSEL0;
 
-	wrmsrl(perfctr_msr, 0UL);
+	/* KVM doesn't implement this MSR */
+	if (wrmsr_safe(perfctr_msr, 0, 0) < 0)
+		return 0;
 
 	evntsel = P6_EVNTSEL_INT
 		| P6_EVNTSEL_OS

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 19/20] i386: Fix double fault handler
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (17 preceding siblings ...)
  2007-08-21  6:56   ` [patch 18/20] i386: Handle P6s without performance counters in nmi watchdog Greg KH
@ 2007-08-21  6:56   ` Greg KH
  2007-08-21  6:56   ` [patch 20/20] JFFS2 locking regression fix Greg KH
  2007-08-21 15:33   ` [patch 00/20] 2.6.22-stable review Justin M. Forbes
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:56 UTC (permalink / raw)
  To: linux-kernel, stable, cebbert, patches
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Domenico Andreoli, torvalds, akpm, alan, Andi Kleen,
	Greg Kroah-Hartman

[-- Attachment #1: i386-fix-double-fault-handler.patch --]
[-- Type: text/plain, Size: 2762 bytes --]


-stable review patch.  If anyone has any objections, please let us know.

------------------
From: Chuck Ebbert <cebbert@redhat.com>

The new percpu code has apparently broken the doublefault handler
when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by
a hardware task, making the check

        SPIN_BUG_ON(lock->owner == current, lock, "recursion");

fault because it uses the FS register to access the percpu data
for current, and that register is zero in the new TSS. (The trace
I saw was on 2.6.20 where it was GS, but it looks like this will
still happen with FS on 2.6.22.)

Initializing FS in the doublefault_tss should fix it.

AK: Also fix broken ptr_ok() and turn printks into KERN_EMERG
AK: And add a PANIC prefix to make clear the system will hang
AK: (e.g. x86-64 will recover)

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 arch/i386/kernel/doublefault.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/arch/i386/kernel/doublefault.c
+++ b/arch/i386/kernel/doublefault.c
@@ -13,7 +13,7 @@
 static unsigned long doublefault_stack[DOUBLEFAULT_STACKSIZE];
 #define STACK_START (unsigned long)(doublefault_stack+DOUBLEFAULT_STACKSIZE)
 
-#define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + 0x1000000)
+#define ptr_ok(x) ((x) > PAGE_OFFSET && (x) < PAGE_OFFSET + MAXMEM)
 
 static void doublefault_fn(void)
 {
@@ -23,23 +23,23 @@ static void doublefault_fn(void)
 	store_gdt(&gdt_desc);
 	gdt = gdt_desc.address;
 
-	printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
+	printk(KERN_EMERG "PANIC: double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size);
 
 	if (ptr_ok(gdt)) {
 		gdt += GDT_ENTRY_TSS << 3;
 		tss = *(u16 *)(gdt+2);
 		tss += *(u8 *)(gdt+4) << 16;
 		tss += *(u8 *)(gdt+7) << 24;
-		printk("double fault, tss at %08lx\n", tss);
+		printk(KERN_EMERG "double fault, tss at %08lx\n", tss);
 
 		if (ptr_ok(tss)) {
 			struct i386_hw_tss *t = (struct i386_hw_tss *)tss;
 
-			printk("eip = %08lx, esp = %08lx\n", t->eip, t->esp);
+			printk(KERN_EMERG "eip = %08lx, esp = %08lx\n", t->eip, t->esp);
 
-			printk("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
+			printk(KERN_EMERG "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n",
 				t->eax, t->ebx, t->ecx, t->edx);
-			printk("esi = %08lx, edi = %08lx\n",
+			printk(KERN_EMERG "esi = %08lx, edi = %08lx\n",
 				t->esi, t->edi);
 		}
 	}
@@ -63,6 +63,7 @@ struct tss_struct doublefault_tss __cach
 		.cs		= __KERNEL_CS,
 		.ss		= __KERNEL_DS,
 		.ds		= __USER_DS,
+		.fs		= __KERNEL_PERCPU,
 
 		.__cr3		= __pa(swapper_pg_dir)
 	}

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [patch 20/20] JFFS2 locking regression fix.
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (18 preceding siblings ...)
  2007-08-21  6:56   ` [patch 19/20] i386: Fix double fault handler Greg KH
@ 2007-08-21  6:56   ` Greg KH
  2007-08-21 15:33   ` [patch 00/20] 2.6.22-stable review Justin M. Forbes
  20 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-21  6:56 UTC (permalink / raw)
  To: linux-kernel, stable, torvalds
  Cc: Justin Forbes, Zwane Mwaikambo, Theodore Ts'o, Randy Dunlap,
	Dave Jones, Chuck Wolber, Chris Wedgwood, Michael Krufky,
	Chuck Ebbert, Domenico Andreoli, akpm, alan, Josh Boyer,
	Joakim.Tjernlund, giulio fedel, David Woodhouse,
	Greg Kroah-Hartman

[-- Attachment #1: jffs2-locking-regression-fix.patch --]
[-- Type: text/plain, Size: 1160 bytes --]

-stable review patch.  If anyone has any objections, please let us know.

------------------

Commit a491486a2087ac3dfc00efb4f838c8d684afaf54 introduced a locking
problem in JFFS2 -- we up() the alloc_sem when we weren't previously
holding it. This leads to all kinds of fun behaviour later.

There was a _reason_ for the
	if (1 /* alternative path needs testing */ ||
which the above-mentioned commit removed :)

Discovered and debugged by Giulio Fedel <giulio.fedel@andorsystems.com>

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/jffs2/write.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -553,6 +553,9 @@ int jffs2_do_unlink(struct jffs2_sb_info
 		struct jffs2_full_dirent **prev = &dir_f->dents;
 		uint32_t nhash = full_name_hash(name, namelen);
 
+		/* We don't actually want to reserve any space, but we do
+		   want to be holding the alloc_sem when we write to flash */
+		down(&c->alloc_sem);
 		down(&dir_f->sem);
 
 		while ((*prev) && (*prev)->nhash <= nhash) {

-- 

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [patch 00/20] 2.6.22-stable review
  2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
                     ` (19 preceding siblings ...)
  2007-08-21  6:56   ` [patch 20/20] JFFS2 locking regression fix Greg KH
@ 2007-08-21 15:33   ` Justin M. Forbes
  2007-08-23  0:10     ` [stable] " Greg KH
  20 siblings, 1 reply; 23+ messages in thread
From: Justin M. Forbes @ 2007-08-21 15:33 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Zwane Mwaikambo, Theodore Ts'o,
	Randy Dunlap, Dave Jones, Chuck Wolber, Chris Wedgwood,
	Michael Krufky, Chuck Ebbert, Domenico Andreoli, torvalds, akpm,
	alan

On Mon, Aug 20, 2007 at 11:52:10PM -0700, Greg KH wrote:
> This is the start of the stable review cycle for the 2.6.22.5 release.

No roll up patch for this one?

Justin

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [stable] [patch 00/20] 2.6.22-stable review
  2007-08-21 15:33   ` [patch 00/20] 2.6.22-stable review Justin M. Forbes
@ 2007-08-23  0:10     ` Greg KH
  0 siblings, 0 replies; 23+ messages in thread
From: Greg KH @ 2007-08-23  0:10 UTC (permalink / raw)
  To: Justin M. Forbes
  Cc: Greg KH, Theodore Ts'o, Zwane Mwaikambo, torvalds,
	linux-kernel, Chris Wedgwood, Domenico Andreoli, Randy Dunlap,
	Michael Krufky, Chuck Ebbert, Dave Jones, akpm, Chuck Wolber,
	stable, alan

On Tue, Aug 21, 2007 at 10:33:20AM -0500, Justin M. Forbes wrote:
> On Mon, Aug 20, 2007 at 11:52:10PM -0700, Greg KH wrote:
> > This is the start of the stable review cycle for the 2.6.22.5 release.
> 
> No roll up patch for this one?

Oops, I forgot it, sorry :(

greg k-h

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-08-23  0:30 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070821064251.972690753@blue.kroah.org>
2007-08-21  6:52 ` [patch 00/20] 2.6.22-stable review Greg KH
2007-08-21  6:53   ` [patch 01/20] hwmon: fix w83781d temp sensor type setting Greg KH
2007-08-21  6:53   ` [patch 02/20] hwmon: (smsc47m1) restore missing name attribute Greg KH
2007-08-21  6:53   ` [patch 03/20] sky2: restore workarounds for lost interrupts Greg KH
2007-08-21  6:54   ` [patch 04/20] sky2: carrier management Greg KH
2007-08-21  6:54   ` [patch 05/20] sky2: check for more work before leaving NAPI Greg KH
2007-08-21  6:54   ` [patch 06/20] sky2: check drop truncated packets Greg KH
2007-08-21  6:54   ` [patch 07/20] revert "x86, serial: convert legacy COM ports to platform devices" Greg KH
2007-08-21  6:54   ` [patch 08/20] ACPICA: Fixed possible corruption of global GPE list Greg KH
2007-08-21  6:55   ` [patch 09/20] ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs Greg KH
2007-08-21  6:55   ` [patch 10/20] AVR32: Fix atomic_add_unless() and atomic_sub_unless() Greg KH
2007-08-21  6:55   ` [patch 11/20] r8169: avoid needless NAPI poll scheduling Greg KH
2007-08-21  6:55   ` [patch 12/20] forcedeth: fix random hang in forcedeth driver when using netconsole Greg KH
2007-08-21  6:55   ` [patch 13/20] libata: add ATI SB700 device IDs to AHCI driver Greg KH
2007-08-21  6:55   ` [patch 14/20] Hibernation: do not try to mark invalid PFNs as nosave Greg KH
2007-08-21  6:55   ` [patch 15/20] i386: allow debuggers to access the vsyscall page with compat vDSO Greg KH
2007-08-21  6:55   ` [patch 16/20] x86_64: Check for .cfi_rel_offset in CFI probe Greg KH
2007-08-21  6:55   ` [patch 17/20] x86_64: Change PMDS invocation to single macro Greg KH
2007-08-21  6:56   ` [patch 18/20] i386: Handle P6s without performance counters in nmi watchdog Greg KH
2007-08-21  6:56   ` [patch 19/20] i386: Fix double fault handler Greg KH
2007-08-21  6:56   ` [patch 20/20] JFFS2 locking regression fix Greg KH
2007-08-21 15:33   ` [patch 00/20] 2.6.22-stable review Justin M. Forbes
2007-08-23  0:10     ` [stable] " Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox