All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 001/123] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
                   ` (122 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Robert Hancock, Jeff Garzik

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

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

From: Robert Hancock <hancockrwd@gmail.com>

commit 453d3131ec7aab82eaaa8401a50522a337092aa8 upstream.

Mike Cui reported that his system with an NVIDIA MCP79 (aka MCP7A)
chipset stopped working with 2.6.32. The problem appears to be that
2.6.32 now enables the FPDMA auto-activate optimization in the ahci
driver. The drive works fine with this enabled on an Intel AHCI so
this appears to be a chipset bug.  Since MCP79 is a fairly recent
NVIDIA chipset and we don't have any info on whether any other NVIDIA
chipsets have this issue, disable FPDMA AA optimization on all NVIDIA
AHCI controllers for now.

Should address http://bugzilla.kernel.org/show_bug.cgi?id=14922

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
While-we-investigate-issue-this-patch-looks-good-to-me-by:
	Prajakta Gudadhe <pgudadhe@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/ahci.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -3082,8 +3082,16 @@ static int ahci_init_one(struct pci_dev
 	ahci_save_initial_config(pdev, hpriv);
 
 	/* prepare host */
-	if (hpriv->cap & HOST_CAP_NCQ)
-		pi.flags |= ATA_FLAG_NCQ | ATA_FLAG_FPDMA_AA;
+	if (hpriv->cap & HOST_CAP_NCQ) {
+		pi.flags |= ATA_FLAG_NCQ;
+		/* Auto-activate optimization is supposed to be supported on
+		   all AHCI controllers indicating NCQ support, but it seems
+		   to be broken at least on some NVIDIA MCP79 chipsets.
+		   Until we get info on which NVIDIA chipsets don't have this
+		   issue, if any, disable AA on all NVIDIA AHCIs. */
+		if (pdev->vendor != PCI_VENDOR_ID_NVIDIA)
+			pi.flags |= ATA_FLAG_FPDMA_AA;
+	}
 
 	if (hpriv->cap & HOST_CAP_PMP)
 		pi.flags |= ATA_FLAG_PMP;



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

* [patch 002/123] netlabel: fix export of SELinux categories > 127
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
  2010-03-13  0:11 ` [patch 001/123] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 003/123] PCI hotplug: ibmphp: read the length of ebda and map entire ebda region Greg KH
                   ` (121 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Joshua Roys, Paul Moore,
	James Morris

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

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

From: Joshua Roys <joshua.roys@gtri.gatech.edu>

commit c36f74e67fa12202dbcb4ad92c5ac844f9d36b98 upstream.

This fixes corrupted CIPSO packets when SELinux categories greater than 127
are used.  The bug occured on the second (and later) loops through the
while; the inner for loop through the ebitmap->maps array used the same
index as the NetLabel catmap->bitmap array, even though the NetLabel bitmap
is twice as long as the SELinux bitmap.

Signed-off-by: Joshua Roys <joshua.roys@gtri.gatech.edu>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 security/selinux/ss/ebitmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -128,7 +128,7 @@ int ebitmap_netlbl_export(struct ebitmap
 			cmap_idx = delta / NETLBL_CATMAP_MAPSIZE;
 			cmap_sft = delta % NETLBL_CATMAP_MAPSIZE;
 			c_iter->bitmap[cmap_idx]
-				|= e_iter->maps[cmap_idx] << cmap_sft;
+				|= e_iter->maps[i] << cmap_sft;
 		}
 		e_iter = e_iter->next;
 	}



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

* [patch 003/123] PCI hotplug: ibmphp: read the length of ebda and map entire ebda region
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
  2010-03-13  0:11 ` [patch 001/123] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Greg KH
  2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 004/123] PCI hotplug: check ioremap() return value in ibmphp_ebda.c Greg KH
                   ` (120 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Chandru Siddalingappa, Jesse Barnes

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

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

From: Chandru <chandru@in.ibm.com>

commit b0fc889c4311835ae7d02f433154bc20cad9ee11 upstream.

ibmphp driver currently maps only 1KB of ebda memory area into kernel address
space during driver initialization. This causes kernel oops when the driver is
modprobe'd and it accesses memory beyond 1KB within ebda segment. The first
byte of ebda segment actually stores the length of the ebda region in
Kilobytes. Hence make use of the length parameter and map the entire ebda
region.

Signed-off-by: Chandru Siddalingappa <chandru@linux.vnet.ibm.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/hotplug/ibmphp_ebda.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -245,7 +245,7 @@ static void __init print_ebda_hpc (void)
 
 int __init ibmphp_access_ebda (void)
 {
-	u8 format, num_ctlrs, rio_complete, hs_complete;
+	u8 format, num_ctlrs, rio_complete, hs_complete, ebda_sz;
 	u16 ebda_seg, num_entries, next_offset, offset, blk_id, sub_addr, re, rc_id, re_id, base;
 	int rc = 0;
 
@@ -260,7 +260,14 @@ int __init ibmphp_access_ebda (void)
 	iounmap (io_mem);
 	debug ("returned ebda segment: %x\n", ebda_seg);
 	
-	io_mem = ioremap(ebda_seg<<4, 1024);
+	io_mem = ioremap(ebda_seg<<4, 1);
+	ebda_sz = readb(io_mem);
+	iounmap(io_mem);
+	debug("ebda size: %d(KiB)\n", ebda_sz);
+	if (ebda_sz == 0)
+		return -ENOMEM;
+
+	io_mem = ioremap(ebda_seg<<4, (ebda_sz * 1024));
 	if (!io_mem )
 		return -ENOMEM;
 	next_offset = 0x180;



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

* [patch 004/123] PCI hotplug: check ioremap() return value in ibmphp_ebda.c
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (2 preceding siblings ...)
  2010-03-13  0:11 ` [patch 003/123] PCI hotplug: ibmphp: read the length of ebda and map entire ebda region Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 005/123] security: fix error return path in ima_inode_alloc Greg KH
                   ` (119 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jesse Barnes

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

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

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

commit ba02b242bbf8e4e1bc63d62e8ccec33b4e5ea132 upstream.

check ioremap() return value.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/hotplug/ibmphp_ebda.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/pci/hotplug/ibmphp_ebda.c
+++ b/drivers/pci/hotplug/ibmphp_ebda.c
@@ -261,6 +261,8 @@ int __init ibmphp_access_ebda (void)
 	debug ("returned ebda segment: %x\n", ebda_seg);
 	
 	io_mem = ioremap(ebda_seg<<4, 1);
+	if (!io_mem)
+		return -ENOMEM;
 	ebda_sz = readb(io_mem);
 	iounmap(io_mem);
 	debug("ebda size: %d(KiB)\n", ebda_sz);



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

* [patch 005/123] security: fix error return path in ima_inode_alloc
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (3 preceding siblings ...)
  2010-03-13  0:11 ` [patch 004/123] PCI hotplug: check ioremap() return value in ibmphp_ebda.c Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 006/123] airo: fix setting zero length WEP key Greg KH
                   ` (118 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Xiaotian Feng, Mimi Zohar,
	James Morris

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

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

From: Xiaotian Feng <dfeng@redhat.com>

commit baac35c4155a8aa826c70acee6553368ca5243a2 upstream.

If radix_tree_preload is failed in ima_inode_alloc, we don't need
radix_tree_preload_end because kernel is alread preempt enabled

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 security/integrity/ima/ima_iint.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/security/integrity/ima/ima_iint.c
+++ b/security/integrity/ima/ima_iint.c
@@ -63,12 +63,11 @@ int ima_inode_alloc(struct inode *inode)
 	spin_lock(&ima_iint_lock);
 	rc = radix_tree_insert(&ima_iint_store, (unsigned long)inode, iint);
 	spin_unlock(&ima_iint_lock);
+	radix_tree_preload_end();
 out:
 	if (rc < 0)
 		kmem_cache_free(iint_cache, iint);
 
-	radix_tree_preload_end();
-
 	return rc;
 }
 



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

* [patch 006/123] airo: fix setting zero length WEP key
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (4 preceding siblings ...)
  2010-03-13  0:11 ` [patch 005/123] security: fix error return path in ima_inode_alloc Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 007/123] HID: remove TENX iBuddy from blacklist Greg KH
                   ` (117 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Dan Williams,
	Stanislaw Gruszka, John W. Linville

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

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

From: Stanislaw Gruszka <sgruszka@redhat.com>

commit f09c256375c7cf1e112b8ef6306cdd313490d7c0 upstream.

Patch prevents call set_wep_key() with zero key length. That fix long
standing regression since commit c0380693520b1a1e4f756799a0edc379378b462a
"airo: clean up WEP key operations". Additionally print call trace when
someone will try to use improper parameters, and remove key.len = 0
assignment, because it is in not possible code path.

Reported-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
Bisected-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
Tested-by: Chris Siebenmann <cks@cs.toronto.edu>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/airo.c |   34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5254,11 +5254,7 @@ static int set_wep_key(struct airo_info
 	WepKeyRid wkr;
 	int rc;
 
-	if (keylen == 0) {
-		airo_print_err(ai->dev->name, "%s: key length to set was zero",
-			       __func__);
-		return -1;
-	}
+	WARN_ON(keylen == 0);
 
 	memset(&wkr, 0, sizeof(wkr));
 	wkr.len = cpu_to_le16(sizeof(wkr));
@@ -6405,11 +6401,7 @@ static int airo_set_encode(struct net_de
 		if (dwrq->length > MIN_KEY_SIZE)
 			key.len = MAX_KEY_SIZE;
 		else
-			if (dwrq->length > 0)
-				key.len = MIN_KEY_SIZE;
-			else
-				/* Disable the key */
-				key.len = 0;
+			key.len = MIN_KEY_SIZE;
 		/* Check if the key is not marked as invalid */
 		if(!(dwrq->flags & IW_ENCODE_NOKEY)) {
 			/* Cleanup */
@@ -6590,12 +6582,22 @@ static int airo_set_encodeext(struct net
 		default:
 			return -EINVAL;
 		}
-		/* Send the key to the card */
-		rc = set_wep_key(local, idx, key.key, key.len, perm, 1);
-		if (rc < 0) {
-			airo_print_err(local->dev->name, "failed to set WEP key"
-			               " at index %d: %d.", idx, rc);
-			return rc;
+		if (key.len == 0) {
+			rc = set_wep_tx_idx(local, idx, perm, 1);
+			if (rc < 0) {
+				airo_print_err(local->dev->name,
+					       "failed to set WEP transmit index to %d: %d.",
+					       idx, rc);
+				return rc;
+			}
+		} else {
+			rc = set_wep_key(local, idx, key.key, key.len, perm, 1);
+			if (rc < 0) {
+				airo_print_err(local->dev->name,
+					       "failed to set WEP key at index %d: %d.",
+					       idx, rc);
+				return rc;
+			}
 		}
 	}
 



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

* [patch 007/123] HID: remove TENX iBuddy from blacklist
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (5 preceding siblings ...)
  2010-03-13  0:11 ` [patch 006/123] airo: fix setting zero length WEP key Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 008/123] HID: usbhid: introduce timeout for stuck ctrl/out URBs Greg KH
                   ` (116 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jiri Kosina

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

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

From: Jiri Kosina <jkosina@suse.cz>

commit 4bb9508bbbb06f10bc3e249dd34375b4a4d6bfc0 upstream.

There were multiple reports which indicate that vendor messed up horribly
and the same VID/PID combination is used for completely different devices,
some of them requiring the blacklist entry and other not.

Remove the blacklist entry for this combination of VID/PID completely, and let
the user decide and unbind the driver via sysfs eventually, if needed. Proper
fix would be fixing the vendor.

http://lkml.org/lkml/2009/2/10/434
http://bugzilla.kernel.org/show_bug.cgi?id=13411

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hid/hid-core.c |    2 --
 drivers/hid/hid-ids.h  |    4 ----
 2 files changed, 6 deletions(-)

--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1661,8 +1661,6 @@ static const struct hid_device_id hid_ig
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PANJIT, 0x0004) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_POWERCOM, USB_DEVICE_ID_POWERCOM_UPS) },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY1) },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_TENX, USB_DEVICE_ID_TENX_IBUDDY2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_LABPRO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP) },
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -402,10 +402,6 @@
 #define USB_VENDOR_ID_SUNPLUS		0x04fc
 #define USB_DEVICE_ID_SUNPLUS_WDESKTOP	0x05d8
 
-#define USB_VENDOR_ID_TENX		0x1130
-#define USB_DEVICE_ID_TENX_IBUDDY1	0x0001
-#define USB_DEVICE_ID_TENX_IBUDDY2	0x0002
-
 #define USB_VENDOR_ID_THRUSTMASTER	0x044f
 
 #define USB_VENDOR_ID_TOPMAX		0x0663



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

* [patch 008/123] HID: usbhid: introduce timeout for stuck ctrl/out URBs
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (6 preceding siblings ...)
  2010-03-13  0:11 ` [patch 007/123] HID: remove TENX iBuddy from blacklist Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 009/123] mac80211: quit addba_resp_timer if Tx BA session is torn down Greg KH
                   ` (115 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Oliver Neukum, David Fries,
	Jiri Kosina

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

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

From: Oliver Neukum <oliver@neukum.org>

commit 858155fbcc0cd713f6382c527bb1c3abc0ed6d00 upstream.

Some devices do not react to a control request (seen on APC UPS's) resulting in
a slow stream of messages, "generic-usb ... control queue full".  Therefore
request needs a timeout.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hid/usbhid/hid-core.c |   28 ++++++++++++++++++++++++++--
 drivers/hid/usbhid/usbhid.h   |    2 ++
 2 files changed, 28 insertions(+), 2 deletions(-)

--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -316,6 +316,7 @@ static int hid_submit_out(struct hid_dev
 			err_hid("usb_submit_urb(out) failed");
 			return -1;
 		}
+		usbhid->last_out = jiffies;
 	} else {
 		/*
 		 * queue work to wake up the device.
@@ -377,6 +378,7 @@ static int hid_submit_ctrl(struct hid_de
 			err_hid("usb_submit_urb(ctrl) failed");
 			return -1;
 		}
+		usbhid->last_ctrl = jiffies;
 	} else {
 		/*
 		 * queue work to wake up the device.
@@ -512,9 +514,20 @@ static void __usbhid_submit_report(struc
 		usbhid->out[usbhid->outhead].report = report;
 		usbhid->outhead = head;
 
-		if (!test_and_set_bit(HID_OUT_RUNNING, &usbhid->iofl))
+		if (!test_and_set_bit(HID_OUT_RUNNING, &usbhid->iofl)) {
 			if (hid_submit_out(hid))
 				clear_bit(HID_OUT_RUNNING, &usbhid->iofl);
+		} else {
+			/*
+			 * the queue is known to run
+			 * but an earlier request may be stuck
+			 * we may need to time out
+			 * no race because this is called under
+			 * spinlock
+			 */
+			if (time_after(jiffies, usbhid->last_out + HZ * 5))
+				usb_unlink_urb(usbhid->urbout);
+		}
 		return;
 	}
 
@@ -535,9 +548,20 @@ static void __usbhid_submit_report(struc
 	usbhid->ctrl[usbhid->ctrlhead].dir = dir;
 	usbhid->ctrlhead = head;
 
-	if (!test_and_set_bit(HID_CTRL_RUNNING, &usbhid->iofl))
+	if (!test_and_set_bit(HID_CTRL_RUNNING, &usbhid->iofl)) {
 		if (hid_submit_ctrl(hid))
 			clear_bit(HID_CTRL_RUNNING, &usbhid->iofl);
+	} else {
+		/*
+		 * the queue is known to run
+		 * but an earlier request may be stuck
+		 * we may need to time out
+		 * no race because this is called under
+		 * spinlock
+		 */
+		if (time_after(jiffies, usbhid->last_ctrl + HZ * 5))
+			usb_unlink_urb(usbhid->urbctrl);
+	}
 }
 
 void usbhid_submit_report(struct hid_device *hid, struct hid_report *report, unsigned char dir)
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -80,12 +80,14 @@ struct usbhid_device {
 	unsigned char ctrlhead, ctrltail;                               /* Control fifo head & tail */
 	char *ctrlbuf;                                                  /* Control buffer */
 	dma_addr_t ctrlbuf_dma;                                         /* Control buffer dma */
+	unsigned long last_ctrl;						/* record of last output for timeouts */
 
 	struct urb *urbout;                                             /* Output URB */
 	struct hid_output_fifo out[HID_CONTROL_FIFO_SIZE];              /* Output pipe fifo */
 	unsigned char outhead, outtail;                                 /* Output pipe fifo head & tail */
 	char *outbuf;                                                   /* Output buffer */
 	dma_addr_t outbuf_dma;                                          /* Output buffer dma */
+	unsigned long last_out;							/* record of last output for timeouts */
 
 	spinlock_t lock;						/* fifo spinlock */
 	unsigned long iofl;                                             /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */



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

* [patch 009/123] mac80211: quit addba_resp_timer if Tx BA session is torn down
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (7 preceding siblings ...)
  2010-03-13  0:11 ` [patch 008/123] HID: usbhid: introduce timeout for stuck ctrl/out URBs Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 010/123] mac80211: Reset dynamic ps timer in Rx path Greg KH
                   ` (114 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Zhu Yi, Johannes Berg,
	John W. Linville

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

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

From: Zhu Yi <yi.zhu@intel.com>

commit 3dc1de0bf23816ed557ac8addf680cd5ee57e805 upstream.

Make addba_resp_timer aware the HT_AGG_STATE_REQ_STOP_BA_MSK mask
so that when ___ieee80211_stop_tx_ba_session() is issued the timer
will quit. Otherwise when suspend happens before the timer expired,
the timer handler will be called immediately after resume and
messes up driver status.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/mac80211/agg-tx.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -179,7 +179,8 @@ static void sta_addba_resp_timer_expired
 
 	/* check if the TID waits for addBA response */
 	spin_lock_bh(&sta->lock);
-	if ((*state & (HT_ADDBA_REQUESTED_MSK | HT_ADDBA_RECEIVED_MSK)) !=
+	if ((*state & (HT_ADDBA_REQUESTED_MSK | HT_ADDBA_RECEIVED_MSK |
+		       HT_AGG_STATE_REQ_STOP_BA_MSK)) !=
 						HT_ADDBA_REQUESTED_MSK) {
 		spin_unlock_bh(&sta->lock);
 		*state = HT_AGG_STATE_IDLE;



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

* [patch 010/123] mac80211: Reset dynamic ps timer in Rx path.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (8 preceding siblings ...)
  2010-03-13  0:11 ` [patch 009/123] mac80211: quit addba_resp_timer if Tx BA session is torn down Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 011/123] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
                   ` (113 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Vivek Natarajan, John W. Linville

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

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

From: Vivek Natarajan <vnatarajan@atheros.com>

commit e15276a4b220c54db665cf46a92bd9ceb9aeb052 upstream.

The current mac80211 implementation enables power save if there
is no Tx traffic for a specific timeout. Hence, PS is triggered
even if there is a continuous Rx only traffic(like UDP) going on.
This makes the drivers to wait on the tim bit in the next beacon
to awake which leads to redundant sleep-wake cycles.
Fix this by restarting the dynamic ps timer on receiving every
data packet.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/mac80211/rx.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1788,6 +1788,7 @@ static ieee80211_rx_result debug_noinlin
 ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
 {
 	struct ieee80211_sub_if_data *sdata = rx->sdata;
+	struct ieee80211_local *local = rx->local;
 	struct net_device *dev = sdata->dev;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
 	__le16 fc = hdr->frame_control;
@@ -1819,6 +1820,13 @@ ieee80211_rx_h_data(struct ieee80211_rx_
 	dev->stats.rx_packets++;
 	dev->stats.rx_bytes += rx->skb->len;
 
+	if (ieee80211_is_data(hdr->frame_control) &&
+	    !is_multicast_ether_addr(hdr->addr1) &&
+	    local->hw.conf.dynamic_ps_timeout > 0 && local->ps_sdata) {
+			mod_timer(&local->dynamic_ps_timer, jiffies +
+			 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
+	}
+
 	ieee80211_deliver_skb(rx);
 
 	return RX_QUEUED;



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

* [patch 011/123] [SCSI] mpt2sas: Delete volume before HBA detach.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (9 preceding siblings ...)
  2010-03-13  0:11 ` [patch 010/123] mac80211: Reset dynamic ps timer in Rx path Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 012/123] readahead: introduce FMODE_RANDOM for POSIX_FADV_RANDOM Greg KH
                   ` (112 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Kashyap Desai, James Bottomley

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

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

From: Kashyap, Desai <kashyap.desai@lsi.com>

commit d7384b28afb2bf2b7be835ddc8c852bdc5e0ce1c upstream.

The driver hangs when doing `rmmod mpt2sas` if there are any
IR volumes present.The hang is due the scsi midlayer trying to access the
IR volumes after the driver releases controller resources.  Perhaps when
scsi_remove_host is called,the scsi mid layer is sending some request.
This doesn't occur for bare drives becuase the driver is already reporting
those drives deleted prior to calling mpt2sas_base_detach.
To solve this issue, we need to delete the volumes as well.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -5998,6 +5998,8 @@ _scsih_remove(struct pci_dev *pdev)
 	struct _sas_port *mpt2sas_port;
 	struct _sas_device *sas_device;
 	struct _sas_node *expander_sibling;
+	struct _raid_device *raid_device, *next;
+	struct MPT2SAS_TARGET *sas_target_priv_data;
 	struct workqueue_struct	*wq;
 	unsigned long flags;
 
@@ -6011,6 +6013,21 @@ _scsih_remove(struct pci_dev *pdev)
 	if (wq)
 		destroy_workqueue(wq);
 
+	/* release all the volumes */
+	list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list,
+	    list) {
+		if (raid_device->starget) {
+			sas_target_priv_data =
+			    raid_device->starget->hostdata;
+			sas_target_priv_data->deleted = 1;
+			scsi_remove_target(&raid_device->starget->dev);
+		}
+		printk(MPT2SAS_INFO_FMT "removing handle(0x%04x), wwid"
+		    "(0x%016llx)\n", ioc->name,  raid_device->handle,
+		    (unsigned long long) raid_device->wwid);
+		_scsih_raid_device_remove(ioc, raid_device);
+	}
+
 	/* free ports attached to the sas_host */
  retry_again:
 	list_for_each_entry(mpt2sas_port,



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

* [patch 012/123] readahead: introduce FMODE_RANDOM for POSIX_FADV_RANDOM
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (10 preceding siblings ...)
  2010-03-13  0:11 ` [patch 011/123] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 013/123] slab: initialize unused alien cache entry as NULL at alloc_alien_cache() Greg KH
                   ` (111 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Wu Fengguang, Nick Piggin,
	Andi Kleen, Steven Whitehouse, David Howells, Jonathan Corbet,
	Al Viro, Christoph Hellwig, Trond Myklebust, Chuck Lever,
	qbarnes+nfs

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

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

From: Wu Fengguang <fengguang.wu@intel.com>

commit 0141450f66c3c12a3aaa869748caa64241885cdf upstream.

This fixes inefficient page-by-page reads on POSIX_FADV_RANDOM.

POSIX_FADV_RANDOM used to set ra_pages=0, which leads to poor performance:
a 16K read will be carried out in 4 _sync_ 1-page reads.

In other places, ra_pages==0 means
- it's ramfs/tmpfs/hugetlbfs/sysfs/configfs
- some IO error happened
where multi-page read IO won't help or should be avoided.

POSIX_FADV_RANDOM actually want a different semantics: to disable the
*heuristic* readahead algorithm, and to use a dumb one which faithfully
submit read IO for whatever application requests.

So introduce a flag FMODE_RANDOM for POSIX_FADV_RANDOM.

Note that the random hint is not likely to help random reads performance
noticeably.  And it may be too permissive on huge request size (its IO
size is not limited by read_ahead_kb).

In Quentin's report (http://lkml.org/lkml/2009/12/24/145), the overall
(NFS read) performance of the application increased by 313%!

Tested-by: Quentin Barnes <qbarnes+nfs@yahoo-inc.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Cc: <qbarnes+nfs@yahoo-inc.com>
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>

---
 include/linux/fs.h |    3 +++
 mm/fadvise.c       |   10 +++++++++-
 mm/readahead.c     |    6 ++++++
 3 files changed, 18 insertions(+), 1 deletion(-)

--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -87,6 +87,9 @@ struct inodes_stat_t {
  */
 #define FMODE_NOCMTIME		((__force fmode_t)2048)
 
+/* Expect random access pattern */
+#define FMODE_RANDOM		((__force fmode_t)4096)
+
 /*
  * The below are the various read and write types that we support. Some of
  * them include behavioral modifiers that send information down to the
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -77,12 +77,20 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, lof
 	switch (advice) {
 	case POSIX_FADV_NORMAL:
 		file->f_ra.ra_pages = bdi->ra_pages;
+		spin_lock(&file->f_lock);
+		file->f_mode &= ~FMODE_RANDOM;
+		spin_unlock(&file->f_lock);
 		break;
 	case POSIX_FADV_RANDOM:
-		file->f_ra.ra_pages = 0;
+		spin_lock(&file->f_lock);
+		file->f_mode |= FMODE_RANDOM;
+		spin_unlock(&file->f_lock);
 		break;
 	case POSIX_FADV_SEQUENTIAL:
 		file->f_ra.ra_pages = bdi->ra_pages * 2;
+		spin_lock(&file->f_lock);
+		file->f_mode &= ~FMODE_RANDOM;
+		spin_unlock(&file->f_lock);
 		break;
 	case POSIX_FADV_WILLNEED:
 		if (!mapping->a_ops->readpage) {
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -501,6 +501,12 @@ void page_cache_sync_readahead(struct ad
 	if (!ra->ra_pages)
 		return;
 
+	/* be dumb */
+	if (filp->f_mode & FMODE_RANDOM) {
+		force_page_cache_readahead(mapping, filp, offset, req_size);
+		return;
+	}
+
 	/* do read-ahead */
 	ondemand_readahead(mapping, ra, filp, false, offset, req_size);
 }



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

* [patch 013/123] slab: initialize unused alien cache entry as NULL at alloc_alien_cache().
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (11 preceding siblings ...)
  2010-03-13  0:11 ` [patch 012/123] readahead: introduce FMODE_RANDOM for POSIX_FADV_RANDOM Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 014/123] V4L/DVB (13991): gspca_mr973010a: Fix cif type 1 cameras not streaming on UHCI controllers Greg KH
                   ` (110 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Eric Dumazet, Andi Kleen,
	Christoph Lameter, Matt Mackall, Haicheng Li, Pekka Enberg

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

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

From: Haicheng Li <haicheng.li@linux.intel.com>

commit f3186a9c51eabe75b2780153ed7f07778d78b16e upstream.

Comparing with existing code, it's a simpler way to use kzalloc_node()
to ensure that each unused alien cache entry is NULL.

CC: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 mm/slab.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/mm/slab.c
+++ b/mm/slab.c
@@ -983,13 +983,11 @@ static struct array_cache **alloc_alien_
 
 	if (limit > 1)
 		limit = 12;
-	ac_ptr = kmalloc_node(memsize, gfp, node);
+	ac_ptr = kzalloc_node(memsize, gfp, node);
 	if (ac_ptr) {
 		for_each_node(i) {
-			if (i == node || !node_online(i)) {
-				ac_ptr[i] = NULL;
+			if (i == node || !node_online(i))
 				continue;
-			}
 			ac_ptr[i] = alloc_arraycache(node, limit, 0xbaadf00d, gfp);
 			if (!ac_ptr[i]) {
 				for (i--; i >= 0; i--)



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

* [patch 014/123] V4L/DVB (13991): gspca_mr973010a: Fix cif type 1 cameras not streaming on UHCI controllers
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (12 preceding siblings ...)
  2010-03-13  0:11 ` [patch 013/123] slab: initialize unused alien cache entry as NULL at alloc_alien_cache() Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 015/123] vfs: take f_lock on modifying f_mode after open time Greg KH
                   ` (109 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Theodore Kilgore,
	Hans de Goede, Mauro Carvalho Chehab

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

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

From: Theodore Kilgore <kilgota@auburn.edu>

commit 70136081fc67ea77d849f86fa323e5773c8e40ea upstream.

If you read the mail to Oliver Neukum on the linux-usb list, then you know
that I found a cure for the mysterious problem that the MR97310a CIF "type
1" cameras have been freezing up and refusing to stream if hooked up to a
machine with a UHCI controller.

Namely, the cure is that if the camera is an mr97310a CIF type 1 camera, you
have to send it 0xa0, 0x00. Somehow, this is a timing reset command, or
such. It un-blocks whatever was previously stopping the CIF type 1 cameras
from working on the UHCI-based machines.

Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/video/gspca/mr97310a.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/media/video/gspca/mr97310a.c
+++ b/drivers/media/video/gspca/mr97310a.c
@@ -697,6 +697,12 @@ static int start_cif_cam(struct gspca_de
 			{0x13, 0x00, {0x01}, 1},
 			{0, 0, {0}, 0}
 		};
+		/* Without this command the cam won't work with USB-UHCI */
+		gspca_dev->usb_buf[0] = 0x0a;
+		gspca_dev->usb_buf[1] = 0x00;
+		err_code = mr_write(gspca_dev, 2);
+		if (err_code < 0)
+			return err_code;
 		err_code = sensor_write_regs(gspca_dev, cif_sensor1_init_data,
 					 ARRAY_SIZE(cif_sensor1_init_data));
 	}



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

* [patch 015/123] vfs: take f_lock on modifying f_mode after open time
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (13 preceding siblings ...)
  2010-03-13  0:11 ` [patch 014/123] V4L/DVB (13991): gspca_mr973010a: Fix cif type 1 cameras not streaming on UHCI controllers Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 016/123] x86, uv: uv_global_gru_mmr_address() macro fix Greg KH
                   ` (108 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Wu Fengguang, Al Viro,
	Christoph Hellwig, Trond Myklebust, Chuck Lever

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

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

From: Wu Fengguang <fengguang.wu@intel.com>

commit 42e49608683ab25fbbbf9c40edb944601e543882 upstream.

We'll introduce FMODE_RANDOM which will be runtime modified.  So protect
all runtime modification to f_mode with f_lock to avoid races.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
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>

---
 fs/file_table.c     |    2 ++
 fs/nfsd/nfs4state.c |    2 ++
 2 files changed, 4 insertions(+)

--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -393,7 +393,9 @@ retry:
 			continue;
 		if (!(f->f_mode & FMODE_WRITE))
 			continue;
+		spin_lock(&f->f_lock);
 		f->f_mode &= ~FMODE_WRITE;
+		spin_unlock(&f->f_lock);
 		if (file_check_writeable(f) != 0)
 			continue;
 		file_release_write(f);
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1998,7 +1998,9 @@ nfs4_file_downgrade(struct file *filp, u
 {
 	if (share_access & NFS4_SHARE_ACCESS_WRITE) {
 		drop_file_write_access(filp);
+		spin_lock(&filp->f_lock);
 		filp->f_mode = (filp->f_mode | FMODE_READ) & ~FMODE_WRITE;
+		spin_unlock(&filp->f_lock);
 	}
 }
 



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

* [patch 016/123] x86, uv: uv_global_gru_mmr_address() macro fix
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (14 preceding siblings ...)
  2010-03-13  0:11 ` [patch 015/123] vfs: take f_lock on modifying f_mode after open time Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 017/123] drm/i915: give up on 8xx lid status Greg KH
                   ` (107 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jack Steiner, H. Peter Anvin

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

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

From: Jack Steiner <steiner@sgi.com>

commit e1e0138d7d10fd447c71cc70f367eac514bd3ce4 upstream.

Fix bug in uv_global_gru_mmr_address macro.  Macro failed
to cast an int value to a long prior to a left shift > 32.

Signed-off-by: Jack Steiner <steiner@sgi.com>
LKML-Reference: <20100107161240.GA2610@sgi.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/uv/uv_hub.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -329,7 +329,8 @@ static inline unsigned long uv_read_glob
  */
 static inline unsigned long uv_global_gru_mmr_address(int pnode, unsigned long offset)
 {
-	return UV_GLOBAL_GRU_MMR_BASE | offset | (pnode << uv_hub_info->m_val);
+	return UV_GLOBAL_GRU_MMR_BASE | offset |
+		((unsigned long)pnode << uv_hub_info->m_val);
 }
 
 static inline void uv_write_global_mmr8(int pnode, unsigned long offset, unsigned char val)



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

* [patch 017/123] drm/i915: give up on 8xx lid status
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (15 preceding siblings ...)
  2010-03-13  0:11 ` [patch 016/123] x86, uv: uv_global_gru_mmr_address() macro fix Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 018/123] ath9k: fix keycache leak in split tkip case Greg KH
                   ` (106 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jesse Barnes, Eric Anholt

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

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

From: Jesse Barnes <jbarnes@virtuousgeek.org>

commit 7b9c5abee98c54f85bcc04bd4d7ec8d5094c73f4 upstream.

These old machines more often than not lie about their lid state.  So
don't use it to detect LVDS presence, but leave the event handler to
deal with lid open/close, when we might need to reset the mode.

Fixes kernel bug #15248

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/i915/intel_lvds.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -655,8 +655,15 @@ static const struct dmi_system_id bad_li
  */
 static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector)
 {
+	struct drm_device *dev = connector->dev;
 	enum drm_connector_status status = connector_status_connected;
 
+	/* ACPI lid methods were generally unreliable in this generation, so
+	 * don't even bother.
+	 */
+	if (IS_I8XX(dev))
+		return connector_status_connected;
+
 	if (!dmi_check_system(bad_lid_status) && !acpi_lid_open())
 		status = connector_status_disconnected;
 



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

* [patch 018/123] ath9k: fix keycache leak in split tkip case
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (16 preceding siblings ...)
  2010-03-13  0:11 ` [patch 017/123] drm/i915: give up on 8xx lid status Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 019/123] rtc-core: fix memory leak Greg KH
                   ` (105 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, John W. Linville

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

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

From: Ming Lei <tom.leiming@gmail.com>

commit 733da37dab72de6b3f8b0c56b5cdea322f18a684 upstream.

If split tkip key is used, ath_delete_key should delete
rx key and rx mic key. This patch fixes the leak of hw
keycache in the case.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath9k/main.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -928,6 +928,7 @@ static void ath_key_delete(struct ath_co
 
 	clear_bit(key->hw_key_idx + 64, common->keymap);
 	if (common->splitmic) {
+		ath9k_hw_keyreset(ah, key->hw_key_idx + 32);
 		clear_bit(key->hw_key_idx + 32, common->keymap);
 		clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
 	}



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

* [patch 019/123] rtc-core: fix memory leak
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (17 preceding siblings ...)
  2010-03-13  0:11 ` [patch 018/123] ath9k: fix keycache leak in split tkip case Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 020/123] x86/PCI: Prevent mmconfig memory corruption Greg KH
                   ` (104 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Aaro Koskinen, Alessandro Zummo

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

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

From: Aaro Koskinen <aaro.koskinen@nokia.com>

commit 2a7a06a0cdd86d572e91657603180da5992be6d3 upstream.

The idr should be destroyed when the module is unloaded. Found with
kmemleak.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
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>

---
 drivers/rtc/class.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@ -226,6 +226,7 @@ static void __exit rtc_exit(void)
 {
 	rtc_dev_exit();
 	class_destroy(rtc_class);
+	idr_destroy(&rtc_idr);
 }
 
 subsys_initcall(rtc_init);



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

* [patch 020/123] x86/PCI: Prevent mmconfig memory corruption
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (18 preceding siblings ...)
  2010-03-13  0:11 ` [patch 019/123] rtc-core: fix memory leak Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:11 ` [patch 021/123] clocksource: Fix up a registration/IRQ race in the sh drivers Greg KH
                   ` (103 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner,
	Bjorn Helgaas, Yinghai Lu, Jesse Barnes

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit bb8d41330ce27edb91adb6922d3f8e1a8923f727 upstream.

commit ff097ddd4 (x86/PCI: MMCONFIG: manage pci_mmcfg_region as a
list, not a table) introduced a nasty memory corruption when
pci_mmcfg_list is empty.

pci_mmcfg_check_end_bus_number() dereferences pci_mmcfg_list.prev even
when the list is empty. The following write hits some variable near to
pci_mmcfg_list.

Further down a similar problem exists, where cfg->list.next is
dereferenced unconditionally and a comparison with some variable near
to pci_mmcfg_list happens.

Add a check for the last element into the for_each_entry() loop and
remove all the other crappy logic which is just a leftover of the old
array based code which was replaced by the list conversion.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/pci/mmconfig-shared.c |   17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

--- a/arch/x86/pci/mmconfig-shared.c
+++ b/arch/x86/pci/mmconfig-shared.c
@@ -303,22 +303,17 @@ static void __init pci_mmcfg_check_end_b
 {
 	struct pci_mmcfg_region *cfg, *cfgx;
 
-	/* last one*/
-	cfg = list_entry(pci_mmcfg_list.prev, typeof(*cfg), list);
-	if (cfg)
-		if (cfg->end_bus < cfg->start_bus)
-			cfg->end_bus = 255;
-
-	if (list_is_singular(&pci_mmcfg_list))
-		return;
-
-	/* don't overlap please */
+	/* Fixup overlaps */
 	list_for_each_entry(cfg, &pci_mmcfg_list, list) {
 		if (cfg->end_bus < cfg->start_bus)
 			cfg->end_bus = 255;
 
+		/* Don't access the list head ! */
+		if (cfg->list.next == &pci_mmcfg_list)
+			break;
+
 		cfgx = list_entry(cfg->list.next, typeof(*cfg), list);
-		if (cfg != cfgx && cfg->end_bus >= cfgx->start_bus)
+		if (cfg->end_bus >= cfgx->start_bus)
 			cfg->end_bus = cfgx->start_bus - 1;
 	}
 }



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

* [patch 021/123] clocksource: Fix up a registration/IRQ race in the sh drivers.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (19 preceding siblings ...)
  2010-03-13  0:11 ` [patch 020/123] x86/PCI: Prevent mmconfig memory corruption Greg KH
@ 2010-03-13  0:11 ` Greg KH
  2010-03-13  0:12 ` [patch 022/123] SCSI: qla1280: Drop host_lock while requesting firmware Greg KH
                   ` (102 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:11 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Paul Mundt

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

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

From: Paul Mundt <lethal@linux-sh.org>

commit da64c2a8dee66ca03f4f3e15d84be7bedf73db3d upstream.

All of the SH clocksource drivers follow the scheme that the IRQ is setup
prior to registering the clockevent. The interrupt handler in the
clockevent cases looks to the event handler function pointer being filled
in by the registration code, permitting us to get in to situations where
asserted IRQs step in to the handler before registration has had a chance
to complete and hitting a NULL pointer deref.

In practice this is not an issue for most platforms, but some of them
with fairly special loaders (or that are chain-loading from another
kernel) may enter in to this situation. This fixes up the oops reported
by Rafael on hp6xx.

Reported-and-tested-by: Rafael Ignacio Zurita <rafaelignacio.zurita@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/clocksource/sh_cmt.c  |   32 +++++++++++++++++++-------------
 drivers/clocksource/sh_mtu2.c |    6 +++---
 drivers/clocksource/sh_tmu.c  |    6 +++---
 3 files changed, 25 insertions(+), 19 deletions(-)

--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -603,18 +603,13 @@ static int sh_cmt_setup(struct sh_cmt_pr
 	p->irqaction.handler = sh_cmt_interrupt;
 	p->irqaction.dev_id = p;
 	p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL;
-	ret = setup_irq(irq, &p->irqaction);
-	if (ret) {
-		pr_err("sh_cmt: failed to request irq %d\n", irq);
-		goto err1;
-	}
 
 	/* get hold of clock */
 	p->clk = clk_get(&p->pdev->dev, cfg->clk);
 	if (IS_ERR(p->clk)) {
 		pr_err("sh_cmt: cannot get clock \"%s\"\n", cfg->clk);
 		ret = PTR_ERR(p->clk);
-		goto err2;
+		goto err1;
 	}
 
 	if (resource_size(res) == 6) {
@@ -627,14 +622,25 @@ static int sh_cmt_setup(struct sh_cmt_pr
 		p->clear_bits = ~0xc000;
 	}
 
-	return sh_cmt_register(p, cfg->name,
-			       cfg->clockevent_rating,
-			       cfg->clocksource_rating);
- err2:
-	remove_irq(irq, &p->irqaction);
- err1:
+	ret = sh_cmt_register(p, cfg->name,
+			      cfg->clockevent_rating,
+			      cfg->clocksource_rating);
+	if (ret) {
+		pr_err("sh_cmt: registration failed\n");
+		goto err1;
+	}
+
+	ret = setup_irq(irq, &p->irqaction);
+	if (ret) {
+		pr_err("sh_cmt: failed to request irq %d\n", irq);
+		goto err1;
+	}
+
+	return 0;
+
+err1:
 	iounmap(p->mapbase);
- err0:
+err0:
 	return ret;
 }
 
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -221,15 +221,15 @@ static void sh_mtu2_register_clockevent(
 	ced->cpumask = cpumask_of(0);
 	ced->set_mode = sh_mtu2_clock_event_mode;
 
+	pr_info("sh_mtu2: %s used for clock events\n", ced->name);
+	clockevents_register_device(ced);
+
 	ret = setup_irq(p->irqaction.irq, &p->irqaction);
 	if (ret) {
 		pr_err("sh_mtu2: failed to request irq %d\n",
 		       p->irqaction.irq);
 		return;
 	}
-
-	pr_info("sh_mtu2: %s used for clock events\n", ced->name);
-	clockevents_register_device(ced);
 }
 
 static int sh_mtu2_register(struct sh_mtu2_priv *p, char *name,
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -323,15 +323,15 @@ static void sh_tmu_register_clockevent(s
 	ced->set_next_event = sh_tmu_clock_event_next;
 	ced->set_mode = sh_tmu_clock_event_mode;
 
+	pr_info("sh_tmu: %s used for clock events\n", ced->name);
+	clockevents_register_device(ced);
+
 	ret = setup_irq(p->irqaction.irq, &p->irqaction);
 	if (ret) {
 		pr_err("sh_tmu: failed to request irq %d\n",
 		       p->irqaction.irq);
 		return;
 	}
-
-	pr_info("sh_tmu: %s used for clock events\n", ced->name);
-	clockevents_register_device(ced);
 }
 
 static int sh_tmu_register(struct sh_tmu_priv *p, char *name,



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

* [patch 022/123] SCSI: qla1280: Drop host_lock while requesting firmware
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (20 preceding siblings ...)
  2010-03-13  0:11 ` [patch 021/123] clocksource: Fix up a registration/IRQ race in the sh drivers Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 023/123] Staging: hv: add a pci device table Greg KH
                   ` (101 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ben Hutchings, James Bottomley

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

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

From: Ben Hutchings <ben@decadent.org.uk>

commit 2cec802980727f1daa46d8c31b411e083d49d7a2 upstream.

request_firmware() may sleep and it appears to be safe to release the
spinlock here.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/scsi/qla1280.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1640,8 +1640,10 @@ qla1280_load_firmware_pio(struct scsi_ql
 	uint16_t mb[MAILBOX_REGISTER_COUNT], i;
 	int err;
 
+	spin_unlock_irq(ha->host->host_lock);
 	err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
 			       &ha->pdev->dev);
+	spin_lock_irq(ha->host->host_lock);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       ql1280_board_tbl[ha->devnum].fwname, err);
@@ -1699,8 +1701,10 @@ qla1280_load_firmware_dma(struct scsi_ql
 		return -ENOMEM;
 #endif
 
+	spin_unlock_irq(ha->host->host_lock);
 	err = request_firmware(&fw, ql1280_board_tbl[ha->devnum].fwname,
 			       &ha->pdev->dev);
+	spin_lock_irq(ha->host->host_lock);
 	if (err) {
 		printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
 		       ql1280_board_tbl[ha->devnum].fwname, err);



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

* [patch 023/123] Staging: hv: add a pci device table
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (21 preceding siblings ...)
  2010-03-13  0:12 ` [patch 022/123] SCSI: qla1280: Drop host_lock while requesting firmware Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 024/123] Staging: hv: match on DMI values to know if we should run Greg KH
                   ` (100 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Haiyang Zhang, Hank Janssen

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

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

From: Greg Kroah-Hartman <gregkh@suse.de>

commit 9a775dbd4e8c87b7d35549183145321c7205404e upstream.

This allows the HV core to be properly found and autoloaded
by the system tools.

It uses the Microsoft virtual VGA device to trigger this.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/hv/vmbus_drv.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -24,6 +24,7 @@
 #include <linux/irq.h>
 #include <linux/interrupt.h>
 #include <linux/sysctl.h>
+#include <linux/pci.h>
 #include "osd.h"
 #include "logging.h"
 #include "vmbus.h"
@@ -973,6 +974,22 @@ static void __exit vmbus_exit(void)
 	return;
 }
 
+/*
+ * We use a PCI table to determine if we should autoload this driver  This is
+ * needed by distro tools to determine if the hyperv drivers should be
+ * installed and/or configured.  We don't do anything else with the table, but
+ * it needs to be present.
+ *
+ * We might consider triggering off of DMI table info as well, as that does
+ * decribe the virtual machine being run on, but not all configuration tools
+ * seem to be able to handle DMI device ids properly.
+ */
+const static struct pci_device_id microsoft_hv_pci_table[] = {
+	{ PCI_DEVICE(0x1414, 0x5353) },	/* VGA compatible controller */
+	{ 0 }
+};
+MODULE_DEVICE_TABLE(pci, microsoft_hv_pci_table);
+
 MODULE_LICENSE("GPL");
 module_param(vmbus_irq, int, S_IRUGO);
 module_param(vmbus_loglevel, int, S_IRUGO);



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

* [patch 024/123] Staging: hv: match on DMI values to know if we should run.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (22 preceding siblings ...)
  2010-03-13  0:12 ` [patch 023/123] Staging: hv: add a pci device table Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 025/123] Staging: Fixed pohmelfs regression because of per-bdi writeback Greg KH
                   ` (99 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Haiyang Zhang, Hank Janssen

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

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

From: Greg Kroah-Hartman <gregkh@suse.de>

commit c22090facd354749cfe99a46e903449c7ac07788 upstream.

The HV core mucks around with specific irqs and other low-level stuff
and takes forever to determine that it really shouldn't be running on a
machine.  So instead, trigger off of the DMI system information and
error out much sooner.  This also allows the module loading tools to
recognize that this code should be loaded on this type of system.

Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/hv/vmbus_drv.c |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -25,6 +25,7 @@
 #include <linux/interrupt.h>
 #include <linux/sysctl.h>
 #include <linux/pci.h>
+#include <linux/dmi.h>
 #include "osd.h"
 #include "logging.h"
 #include "vmbus.h"
@@ -947,6 +948,19 @@ static irqreturn_t vmbus_isr(int irq, vo
 	}
 }
 
+static struct dmi_system_id __initdata microsoft_hv_dmi_table[] = {
+	{
+		.ident = "Hyper-V",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
+			DMI_MATCH(DMI_BOARD_NAME, "Virtual Machine"),
+		},
+	},
+	{ },
+};
+MODULE_DEVICE_TABLE(dmi, microsoft_hv_dmi_table);
+
 static int __init vmbus_init(void)
 {
 	int ret = 0;
@@ -958,6 +972,9 @@ static int __init vmbus_init(void)
 		vmbus_loglevel, HIWORD(vmbus_loglevel), LOWORD(vmbus_loglevel));
 	/* Todo: it is used for loglevel, to be ported to new kernel. */
 
+	if (!dmi_check_system(microsoft_hv_dmi_table))
+		return -ENODEV;
+
 	ret = vmbus_bus_init(VmbusInitialize);
 
 	DPRINT_EXIT(VMBUS_DRV);
@@ -979,10 +996,6 @@ static void __exit vmbus_exit(void)
  * needed by distro tools to determine if the hyperv drivers should be
  * installed and/or configured.  We don't do anything else with the table, but
  * it needs to be present.
- *
- * We might consider triggering off of DMI table info as well, as that does
- * decribe the virtual machine being run on, but not all configuration tools
- * seem to be able to handle DMI device ids properly.
  */
 const static struct pci_device_id microsoft_hv_pci_table[] = {
 	{ PCI_DEVICE(0x1414, 0x5353) },	/* VGA compatible controller */



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

* [patch 025/123] Staging: Fixed pohmelfs regression because of per-bdi writeback.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (23 preceding siblings ...)
  2010-03-13  0:12 ` [patch 024/123] Staging: hv: match on DMI values to know if we should run Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 026/123] Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure Greg KH
                   ` (98 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jens Axboe, Evgeniy Polyakov

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

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

From: Jens Axboe <axboe@kernel.dk>

commit 182374a0bddeef46769d2f8ab56fcccc433b96f3 upstream.

Since pohmelfs isn't tied to a single block device, it needs to setup a
backing dev like nfs/btrfs/etc do.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/pohmelfs/inode.c |   20 ++++++++++++++++++--
 drivers/staging/pohmelfs/netfs.h |    3 +++
 2 files changed, 21 insertions(+), 2 deletions(-)

--- a/drivers/staging/pohmelfs/inode.c
+++ b/drivers/staging/pohmelfs/inode.c
@@ -36,6 +36,7 @@
 #define POHMELFS_MAGIC_NUM	0x504f482e
 
 static struct kmem_cache *pohmelfs_inode_cache;
+static atomic_t psb_bdi_num = ATOMIC_INIT(0);
 
 /*
  * Removes inode from all trees, drops local name cache and removes all queued
@@ -1331,6 +1332,8 @@ static void pohmelfs_put_super(struct su
 	pohmelfs_crypto_exit(psb);
 	pohmelfs_state_exit(psb);
 
+	bdi_destroy(&psb->bdi);
+
 	kfree(psb);
 	sb->s_fs_info = NULL;
 }
@@ -1815,11 +1818,22 @@ static int pohmelfs_fill_super(struct su
 	if (!psb)
 		goto err_out_exit;
 
+	err = bdi_init(&psb->bdi);
+	if (err)
+		goto err_out_free_sb;
+
+	err = bdi_register(&psb->bdi, NULL, "pfs-%d", atomic_inc_return(&psb_bdi_num));
+	if (err) {
+		bdi_destroy(&psb->bdi);
+		goto err_out_free_sb;
+	}
+
 	sb->s_fs_info = psb;
 	sb->s_op = &pohmelfs_sb_ops;
 	sb->s_magic = POHMELFS_MAGIC_NUM;
 	sb->s_maxbytes = MAX_LFS_FILESIZE;
 	sb->s_blocksize = PAGE_SIZE;
+	sb->s_bdi = &psb->bdi;
 
 	psb->sb = sb;
 
@@ -1863,11 +1877,11 @@ static int pohmelfs_fill_super(struct su
 
 	err = pohmelfs_parse_options((char *) data, psb, 0);
 	if (err)
-		goto err_out_free_sb;
+		goto err_out_free_bdi;
 
 	err = pohmelfs_copy_crypto(psb);
 	if (err)
-		goto err_out_free_sb;
+		goto err_out_free_bdi;
 
 	err = pohmelfs_state_init(psb);
 	if (err)
@@ -1916,6 +1930,8 @@ err_out_state_exit:
 err_out_free_strings:
 	kfree(psb->cipher_string);
 	kfree(psb->hash_string);
+err_out_free_bdi:
+	bdi_destroy(&psb->bdi);
 err_out_free_sb:
 	kfree(psb);
 err_out_exit:
--- a/drivers/staging/pohmelfs/netfs.h
+++ b/drivers/staging/pohmelfs/netfs.h
@@ -18,6 +18,7 @@
 
 #include <linux/types.h>
 #include <linux/connector.h>
+#include <linux/backing-dev.h>
 
 #define POHMELFS_CN_IDX			5
 #define POHMELFS_CN_VAL			0
@@ -624,6 +625,8 @@ struct pohmelfs_sb {
 
 	struct super_block	*sb;
 
+	struct backing_dev_info	bdi;
+
 	/*
 	 * Algorithm strings.
 	 */



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

* [patch 026/123] Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (24 preceding siblings ...)
  2010-03-13  0:12 ` [patch 025/123] Staging: Fixed pohmelfs regression because of per-bdi writeback Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 027/123] Staging: mimio: remove the mimio driver Greg KH
                   ` (97 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Peter Huewe, Simon Horman

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

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

From: Peter Huewe <peterhuewe@gmx.de>

commit 8a8e29752dfdba014b866d3c587d3409e57263dd upstream.

Without WEXT_PRIV set the p80211wext.c fails to build due to unknown fields in
the iw_handler_def struct.
Those fields are enclosed in WEXT_PRIV conditionals in the prototype
of iw_handler_def in include/net/iw_handler.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/wlan-ng/Kconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/staging/wlan-ng/Kconfig
+++ b/drivers/staging/wlan-ng/Kconfig
@@ -1,6 +1,7 @@
 config PRISM2_USB
 	tristate "Prism2.5/3 USB driver"
 	depends on WLAN && USB && WIRELESS_EXT
+	select WEXT_PRIV
 	default n
 	---help---
 	  This is the wlan-ng prism 2.5/3 USB driver for a wide range of



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

* [patch 027/123] Staging: mimio: remove the mimio driver
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (25 preceding siblings ...)
  2010-03-13  0:12 ` [patch 026/123] Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 028/123] dvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid Payload Pointer Greg KH
                   ` (96 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, mwilder, Phil Hannent,
	Marc Rousseau

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

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

From: Greg Kroah-Hartman <gregkh@suse.de>

commit e37bcc0de040127281de13a84a608570355c20eb upstream.

It turns out that Mimio has a userspace solution for this product using
libusb, and the in-kernel driver is just getting in the way now and
causing problems.  So they have asked that the in-kernel driver be
removed.  As the staging driver wasn't quite working anyway, and Mimio
supports their libusb solution for all distros, I am removing the
in-kernel driver.

The libusb solution can be downloaded from:
	http://www.mimio.com/downloads/mimio_studio_software/linux.asp

Cc: <mwilder@cs.nmsu.edu>
Cc: Phil Hannent <phil@hannent.co.uk>
Cc: Marc Rousseau <Marc.Rousseau@mimio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/staging/Kconfig        |    2 
 drivers/staging/Makefile       |    1 
 drivers/staging/mimio/Kconfig  |   10 
 drivers/staging/mimio/Makefile |    1 
 drivers/staging/mimio/mimio.c  |  914 -----------------------------------------
 5 files changed, 928 deletions(-)

--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -81,8 +81,6 @@ source "drivers/staging/rtl8192u/Kconfig
 
 source "drivers/staging/rtl8192e/Kconfig"
 
-source "drivers/staging/mimio/Kconfig"
-
 source "drivers/staging/frontier/Kconfig"
 
 source "drivers/staging/dream/Kconfig"
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_R8187SE)		+= rtl8187se/
 obj-$(CONFIG_RTL8192SU)		+= rtl8192su/
 obj-$(CONFIG_RTL8192U)		+= rtl8192u/
 obj-$(CONFIG_RTL8192E)		+= rtl8192e/
-obj-$(CONFIG_INPUT_MIMIO)	+= mimio/
 obj-$(CONFIG_TRANZPORT)		+= frontier/
 obj-$(CONFIG_DREAM)		+= dream/
 obj-$(CONFIG_POHMELFS)		+= pohmelfs/
--- a/drivers/staging/mimio/Kconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-config INPUT_MIMIO
-	tristate "Mimio Xi interactive whiteboard support"
-	depends on USB && INPUT
-	default N
-	help
-	  Say Y here if you want to use a Mimio Xi interactive
-	  whiteboard device.
-
-	  To compile this driver as a module, choose M here: the
-	  module will be called mimio.
--- a/drivers/staging/mimio/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-obj-$(CONFIG_INPUT_MIMIO)	+= mimio.o
--- a/drivers/staging/mimio/mimio.c
+++ /dev/null
@@ -1,914 +0,0 @@
-/*
- * Hardware event => input event mapping:
- *
- *
- *
- input.h:#define BTN_TOOL_PEN            0x140 black
- input.h:#define BTN_TOOL_RUBBER         0x141 blue
- input.h:#define BTN_TOOL_BRUSH          0x142 green
- input.h:#define BTN_TOOL_PENCIL         0x143 red
- input.h:#define BTN_TOOL_AIRBRUSH       0x144 eraser
- input.h:#define BTN_TOOL_FINGER         0x145 small eraser
- input.h:#define BTN_TOOL_MOUSE          0x146 mimio interactive
- input.h:#define BTN_TOOL_LENS           0x147 mimio interactive but1
- input.h:#define LOCALBTN_TOOL_EXTRA1    0x14a mimio interactive but2 == BTN_TOUCH
- input.h:#define LOCALBTN_TOOL_EXTRA2    0x14b mimio extra pens (orange, brown, yellow, purple) == BTN_STYLUS
- input.h:#define LOCALBTN_TOOL_EXTRA3    0x14c unused == BTN_STYLUS2
- input.h:#define BTN_TOOL_DOUBLETAP      0x14d unused
- input.h:#define BTN_TOOL_TRIPLETAP      0x14e unused
- *
- * MIMIO_EV_PENDOWN(MIMIO_PEN_K)     => EV_KEY BIT(BTN_TOOL_PEN)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_B)     => EV_KEY BIT(BTN_TOOL_RUBBER)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_G)     => EV_KEY BIT(BTN_TOOL_BRUSH)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_R)     => EV_KEY BIT(BTN_TOOL_PENCIL)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_E)     => EV_KEY BIT(BTN_TOOL_AIRBRUSH)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_ES)    => EV_KEY BIT(BTN_TOOL_FINGER)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_I)     => EV_KEY BIT(BTN_TOOL_MOUSE)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_IL)    => EV_KEY BIT(BTN_TOOL_LENS)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_IR)    => EV_KEY BIT(BTN_TOOL_DOUBLETAP)
- * MIMIO_EV_PENDOWN(MIMIO_PEN_EX)    => EV_KEY BIT(BTN_TOOL_TRIPLETAP)
- * MIMIO_EV_PENDATA                 => EV_ABS BIT(ABS_X), BIT(ABS_Y)
- * MIMIO_EV_MEMRESET              => EV_KEY BIT(BTN_0)
- * MIMIO_EV_ACC(ACC_NEWPAGE)       => EV_KEY BIT(BTN_1)
- * MIMIO_EV_ACC(ACC_TAGPAGE)      => EV_KEY BIT(BTN_2)
- * MIMIO_EV_ACC(ACC_PRINTPAGE)      => EV_KEY BIT(BTN_3)
- * MIMIO_EV_ACC(ACC_MAXIMIZE)      => EV_KEY BIT(BTN_4)
- * MIMIO_EV_ACC(ACC_FINDCTLPNL)      => EV_KEY BIT(BTN_5)
- *
- *
- * open issues:
- *      - cold-load of data captured when mimio in standalone mode not yet
- *         supported; need to snoop Win32 box to see datastream for this.
- *       - mimio mouse not yet supported; need to snoop Win32 box to see the
- *         datastream for this.
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/input.h>
-#include <linux/usb.h>
-
-#define DRIVER_VERSION		"v0.031"
-#define DRIVER_AUTHOR		"mwilder@cs.nmsu.edu"
-#define DRIVER_DESC		"USB mimio-xi driver"
-
-enum {UPVALUE, DOWNVALUE, MOVEVALUE};
-
-#define MIMIO_XRANGE_MAX	9600
-#define MIMIO_YRANGE_MAX	4800
-
-#define LOCALBTN_TOOL_EXTRA1	BTN_TOUCH
-#define LOCALBTN_TOOL_EXTRA2	BTN_STYLUS
-#define LOCALBTN_TOOL_EXTRA3	BTN_STYLUS2
-
-#define MIMIO_VENDOR_ID		0x08d3
-#define MIMIO_PRODUCT_ID	0x0001
-#define MIMIO_MAXPAYLOAD	(8)
-#define MIMIO_MAXNAMELEN	(64)
-#define MIMIO_TXWAIT		(1)
-#define MIMIO_TXDONE		(2)
-
-#define MIMIO_EV_PENDOWN	(0x22)
-#define MIMIO_EV_PENDATA	(0x24)
-#define MIMIO_EV_PENUP		(0x51)
-#define MIMIO_EV_MEMRESET	(0x45)
-#define MIMIO_EV_ACC		(0xb2)
-
-#define MIMIO_PEN_K		(1)	/* black pen */
-#define MIMIO_PEN_B		(2)	/* blue pen */
-#define MIMIO_PEN_G		(3)	/* green pen */
-#define MIMIO_PEN_R		(4)	/* red pen */
-/* 5, 6, 7, 8 are extra pens */
-#define MIMIO_PEN_E		(9)	/* big eraser */
-#define MIMIO_PEN_ES		(10)	/* lil eraser */
-#define MIMIO_PENJUMP_START	(10)
-#define MIMIO_PENJUMP		(6)
-#define MIMIO_PEN_I		(17)	/* mimio interactive */
-#define MIMIO_PEN_IL		(18)	/* mimio interactive button 1 */
-#define MIMIO_PEN_IR		(19)	/* mimio interactive button 2 */
-
-#define MIMIO_PEN_MAX		(MIMIO_PEN_IR)
-
-#define ACC_DONE		(0)
-#define ACC_NEWPAGE		(1)
-#define ACC_TAGPAGE		(2)
-#define ACC_PRINTPAGE		(4)
-#define ACC_MAXIMIZE		(8)
-#define ACC_FINDCTLPNL		(16)
-
-#define isvalidtxsize(n)	((n) > 0 && (n) <= MIMIO_MAXPAYLOAD)
-
-
-struct pktbuf {
-	unsigned char instr;
-	unsigned char buf[16];
-	unsigned char *p;
-	unsigned char *q;
-};
-
-struct usbintendpt {
-	dma_addr_t dma;
-	struct urb *urb;
-	unsigned char *buf;
-	struct usb_endpoint_descriptor *desc;
-};
-
-struct mimio {
-	struct input_dev *idev;
-	struct usb_device *udev;
-	struct usb_interface *uifc;
-	int open;
-	int present;
-	int greeted;
-	int txflags;
-	char phys[MIMIO_MAXNAMELEN];
-	struct usbintendpt in;
-	struct usbintendpt out;
-	struct pktbuf pktbuf;
-	unsigned char minor;
-	wait_queue_head_t waitq;
-	spinlock_t txlock;
-	void (*rxhandler)(struct mimio *, unsigned char *, unsigned int);
-	int last_pen_down;
-};
-
-static void mimio_close(struct input_dev *);
-static void mimio_dealloc(struct mimio *);
-static void mimio_disconnect(struct usb_interface *);
-static int mimio_greet(struct mimio *);
-static void mimio_irq_in(struct urb *);
-static void mimio_irq_out(struct urb *);
-static int mimio_open(struct input_dev *);
-static int mimio_probe(struct usb_interface *, const struct usb_device_id *);
-static void mimio_rx_handler(struct mimio *, unsigned char *, unsigned int);
-static int mimio_tx(struct mimio *, const char *, int);
-
-static char mimio_name[] = "VirtualInk mimio-Xi";
-static struct usb_device_id mimio_table [] = {
-	{ USB_DEVICE(MIMIO_VENDOR_ID, MIMIO_PRODUCT_ID) },
-	{ USB_DEVICE(0x0525, 0xa4a0) }, /* gadget zero firmware */
-	{ }
-};
-
-MODULE_DEVICE_TABLE(usb, mimio_table);
-
-static struct usb_driver mimio_driver = {
-	.name = "mimio",
-	.probe = mimio_probe,
-	.disconnect = mimio_disconnect,
-	.id_table = mimio_table,
-};
-
-static DECLARE_MUTEX(disconnect_sem);
-
-static void mimio_close(struct input_dev *idev)
-{
-	struct mimio *mimio;
-
-	mimio = input_get_drvdata(idev);
-	if (!mimio) {
-		dev_err(&idev->dev, "null mimio attached to input device\n");
-		return;
-	}
-
-	if (mimio->open <= 0)
-		dev_err(&idev->dev, "mimio not open.\n");
-	else
-		mimio->open--;
-
-	if (mimio->present == 0 && mimio->open == 0)
-		mimio_dealloc(mimio);
-}
-
-static void mimio_dealloc(struct mimio *mimio)
-{
-	if (mimio == NULL)
-		return;
-
-	usb_kill_urb(mimio->in.urb);
-
-	usb_kill_urb(mimio->out.urb);
-
-	if (mimio->idev) {
-		input_unregister_device(mimio->idev);
-		if (mimio->idev->grab)
-			input_close_device(mimio->idev->grab);
-		else
-			dev_dbg(&mimio->idev->dev, "mimio->idev->grab == NULL"
-				" -- didn't call input_close_device\n");
-	}
-
-	usb_free_urb(mimio->in.urb);
-
-	usb_free_urb(mimio->out.urb);
-
-	if (mimio->in.buf) {
-		usb_buffer_free(mimio->udev, MIMIO_MAXPAYLOAD, mimio->in.buf,
-				mimio->in.dma);
-	}
-
-	if (mimio->out.buf)
-		usb_buffer_free(mimio->udev, MIMIO_MAXPAYLOAD, mimio->out.buf,
-				mimio->out.dma);
-
-	if (mimio->idev)
-		input_free_device(mimio->idev);
-
-	kfree(mimio);
-}
-
-static void mimio_disconnect(struct usb_interface *ifc)
-{
-	struct mimio *mimio;
-
-	down(&disconnect_sem);
-
-	mimio = usb_get_intfdata(ifc);
-	usb_set_intfdata(ifc, NULL);
-	dev_dbg(&mimio->idev->dev, "disconnect\n");
-
-	if (mimio) {
-		mimio->present = 0;
-
-		if (mimio->open <= 0)
-			mimio_dealloc(mimio);
-	}
-
-	up(&disconnect_sem);
-}
-
-static int mimio_greet(struct mimio *mimio)
-{
-	const struct grtpkt {
-		int nbytes;
-		unsigned delay;
-		char data[8];
-	} grtpkts[] = {
-		{ 3, 0, { 0x11, 0x55, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x53, 0x55, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x43, 0x55, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x33, 0x55, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x13, 0x00, 0x5e, 0x02, 0x4f, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x13, 0x00, 0x04, 0x03, 0x14, 0x00, 0x00, 0x00 } },
-		{ 5, 2, { 0x13, 0x00, 0x00, 0x04, 0x17, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x13, 0x00, 0x0d, 0x08, 0x16, 0x00, 0x00, 0x00 } },
-		{ 5, 0, { 0x13, 0x00, 0x4d, 0x01, 0x5f, 0x00, 0x00, 0x00 } },
-		{ 3, 0, { 0xf1, 0x55, 0xa4, 0x00, 0x00, 0x00, 0x00, 0x00 } },
-		{ 7, 2, { 0x52, 0x55, 0x00, 0x07, 0x31, 0x55, 0x64, 0x00 } },
-		{ 0, 0, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } },
-	};
-	int rslt;
-	const struct grtpkt *pkt;
-
-	for (pkt = grtpkts; pkt->nbytes; pkt++) {
-		rslt = mimio_tx(mimio, pkt->data, pkt->nbytes);
-		if (rslt)
-			return rslt;
-		if (pkt->delay)
-			msleep(pkt->delay);
-	}
-
-	return 0;
-}
-
-static void mimio_irq_in(struct urb *urb)
-{
-	int rslt;
-	char *data;
-	const char *reason = "going down";
-	struct mimio *mimio;
-
-	mimio = urb->context;
-
-	if (mimio == NULL)
-		/* paranoia */
-		return;
-
-	switch (urb->status) {
-	case 0:
-		/* success */
-		break;
-	case -ETIMEDOUT:
-		reason = "timeout -- unplugged?";
-	case -ECONNRESET:
-	case -ENOENT:
-	case -ESHUTDOWN:
-		dev_dbg(&mimio->idev->dev, "%s.\n", reason);
-		return;
-	default:
-		dev_dbg(&mimio->idev->dev, "unknown urb-status: %d.\n",
-			urb->status);
-		goto exit;
-	}
-	data = mimio->in.buf;
-
-	if (mimio->rxhandler)
-		mimio->rxhandler(mimio, data, urb->actual_length);
-exit:
-	/*
-	 * Keep listening to device on same urb.
-	 */
-	rslt = usb_submit_urb(urb, GFP_ATOMIC);
-	if (rslt)
-		dev_err(&mimio->idev->dev, "usb_submit_urb failure: %d.\n",
-			rslt);
-}
-
-static void mimio_irq_out(struct urb *urb)
-{
-	unsigned long flags;
-	struct mimio *mimio;
-
-	mimio = urb->context;
-
-	if (urb->status)
-		dev_dbg(&mimio->idev->dev, "urb-status: %d.\n", urb->status);
-
-	spin_lock_irqsave(&mimio->txlock, flags);
-	mimio->txflags |= MIMIO_TXDONE;
-	spin_unlock_irqrestore(&mimio->txlock, flags);
-	wmb();
-	wake_up(&mimio->waitq);
-}
-
-static int mimio_open(struct input_dev *idev)
-{
-	int rslt;
-	struct mimio *mimio;
-
-	rslt = 0;
-	down(&disconnect_sem);
-	mimio = input_get_drvdata(idev);
-	dev_dbg(&idev->dev, "mimio_open\n");
-
-	if (mimio == NULL) {
-		dev_err(&idev->dev, "null mimio.\n");
-		rslt = -ENODEV;
-		goto exit;
-	}
-
-	if (mimio->open++)
-		goto exit;
-
-	if (mimio->present && !mimio->greeted) {
-		struct urb *urb = mimio->in.urb;
-		mimio->in.urb->dev = mimio->udev;
-		rslt = usb_submit_urb(mimio->in.urb, GFP_KERNEL);
-		if (rslt) {
-			dev_err(&idev->dev, "usb_submit_urb failure "
-				"(res = %d: %s). Not greeting.\n",
-				rslt,
-				(!urb ? "urb is NULL" :
-				 (urb->hcpriv ? "urb->hcpriv is non-NULL" :
-				  (!urb->complete ? "urb is not complete" :
-				   (urb->number_of_packets <= 0 ? "urb has no packets" :
-				    (urb->interval <= 0 ? "urb interval too small" :
-				     "urb interval too large or some other error"))))));
-			rslt = -EIO;
-			goto exit;
-		}
-		rslt = mimio_greet(mimio);
-		if (rslt == 0) {
-			dev_dbg(&idev->dev, "Mimio greeted OK.\n");
-			mimio->greeted = 1;
-		} else {
-			dev_dbg(&idev->dev, "Mimio greet Failure (%d)\n",
-				rslt);
-		}
-	}
-
-exit:
-	up(&disconnect_sem);
-	return rslt;
-}
-
-static int mimio_probe(struct usb_interface *ifc,
-		       const struct usb_device_id *id)
-{
-	char path[64];
-	int pipe, maxp;
-	struct mimio *mimio;
-	struct usb_device *udev;
-	struct usb_host_interface *hostifc;
-	struct input_dev *input_dev;
-	int res = 0;
-	int i;
-
-	udev = interface_to_usbdev(ifc);
-
-	mimio = kzalloc(sizeof(struct mimio), GFP_KERNEL);
-	if (!mimio)
-		return -ENOMEM;
-
-	input_dev = input_allocate_device();
-	if (!input_dev) {
-		mimio_dealloc(mimio);
-		return -ENOMEM;
-	}
-
-	mimio->uifc = ifc;
-	mimio->udev = udev;
-	mimio->pktbuf.p = mimio->pktbuf.buf;
-	mimio->pktbuf.q = mimio->pktbuf.buf;
-	/* init_input_dev(mimio->idev); */
-	mimio->idev = input_dev;
-	init_waitqueue_head(&mimio->waitq);
-	spin_lock_init(&mimio->txlock);
-	hostifc = ifc->cur_altsetting;
-
-	if (hostifc->desc.bNumEndpoints != 2) {
-		dev_err(&udev->dev, "Unexpected endpoint count: %d.\n",
-			hostifc->desc.bNumEndpoints);
-		mimio_dealloc(mimio);
-		return -ENODEV;
-	}
-
-	mimio->in.desc = &(hostifc->endpoint[0].desc);
-	mimio->out.desc = &(hostifc->endpoint[1].desc);
-
-	mimio->in.buf = usb_buffer_alloc(udev, MIMIO_MAXPAYLOAD, GFP_KERNEL,
-					 &mimio->in.dma);
-	mimio->out.buf = usb_buffer_alloc(udev, MIMIO_MAXPAYLOAD, GFP_KERNEL,
-					  &mimio->out.dma);
-
-	if (mimio->in.buf == NULL || mimio->out.buf == NULL) {
-		dev_err(&udev->dev, "usb_buffer_alloc failure.\n");
-		mimio_dealloc(mimio);
-		return -ENOMEM;
-	}
-
-	mimio->in.urb = usb_alloc_urb(0, GFP_KERNEL);
-	mimio->out.urb = usb_alloc_urb(0, GFP_KERNEL);
-
-	if (mimio->in.urb == NULL || mimio->out.urb == NULL) {
-		dev_err(&udev->dev, "usb_alloc_urb failure.\n");
-		mimio_dealloc(mimio);
-		return -ENOMEM;
-	}
-
-	/*
-	 * Build the input urb.
-	 */
-	pipe = usb_rcvintpipe(udev, mimio->in.desc->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
-	if (maxp > MIMIO_MAXPAYLOAD)
-		maxp = MIMIO_MAXPAYLOAD;
-	usb_fill_int_urb(mimio->in.urb, udev, pipe, mimio->in.buf, maxp,
-			 mimio_irq_in, mimio, mimio->in.desc->bInterval);
-	mimio->in.urb->transfer_dma = mimio->in.dma;
-	mimio->in.urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-
-	/*
-	 * Build the output urb.
-	 */
-	pipe = usb_sndintpipe(udev, mimio->out.desc->bEndpointAddress);
-	maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe));
-	if (maxp > MIMIO_MAXPAYLOAD)
-		maxp = MIMIO_MAXPAYLOAD;
-	usb_fill_int_urb(mimio->out.urb, udev, pipe, mimio->out.buf, maxp,
-			 mimio_irq_out, mimio, mimio->out.desc->bInterval);
-	mimio->out.urb->transfer_dma = mimio->out.dma;
-	mimio->out.urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-
-	/*
-	 * Build input device info
-	 */
-	usb_make_path(udev, path, 64);
-	snprintf(mimio->phys, MIMIO_MAXNAMELEN, "%s/input0", path);
-	input_set_drvdata(input_dev, mimio);
-	/* input_dev->dev = &ifc->dev; */
-	input_dev->open = mimio_open;
-	input_dev->close = mimio_close;
-	input_dev->name = mimio_name;
-	input_dev->phys = mimio->phys;
-	input_dev->dev.parent = &ifc->dev;
-
-	input_dev->id.bustype = BUS_USB;
-	input_dev->id.vendor = le16_to_cpu(udev->descriptor.idVendor);
-	input_dev->id.product = le16_to_cpu(udev->descriptor.idProduct);
-	input_dev->id.version = le16_to_cpu(udev->descriptor.bcdDevice);
-
-	input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS);
-	for (i = BTN_TOOL_PEN; i <= LOCALBTN_TOOL_EXTRA2; ++i)
-		set_bit(i, input_dev->keybit);
-
-	input_dev->keybit[BIT_WORD(BTN_MISC)] |= BIT_MASK(BTN_0) |
-						 BIT_MASK(BTN_1) |
-						 BIT_MASK(BTN_2) |
-						 BIT_MASK(BTN_3) |
-						 BIT_MASK(BTN_4) |
-						 BIT_MASK(BTN_5);
-	/*   input_dev->keybit[BTN_MOUSE] |= BIT(BTN_LEFT); */
-	input_dev->absbit[0] |= BIT_MASK(ABS_X) | BIT_MASK(ABS_Y);
-	input_set_abs_params(input_dev, ABS_X, 0, MIMIO_XRANGE_MAX, 0, 0);
-	input_set_abs_params(input_dev, ABS_Y, 0, MIMIO_YRANGE_MAX, 0, 0);
-	input_dev->absbit[BIT_WORD(ABS_MISC)] |= BIT_MASK(ABS_MISC);
-
-#if 0
-	input_dev->absmin[ABS_X] = 0;
-	input_dev->absmin[ABS_Y] = 0;
-	input_dev->absmax[ABS_X] = 9600;
-	input_dev->absmax[ABS_Y] = 4800;
-	input_dev->absfuzz[ABS_X] = 0;
-	input_dev->absfuzz[ABS_Y] = 0;
-	input_dev->absflat[ABS_X] = 0;
-	input_dev->absflat[ABS_Y] = 0;
-#endif
-
-#if 0
-	/* this will just reduce the precision */
-	input_dev->absfuzz[ABS_X] = 8; /* experimental; may need to change */
-	input_dev->absfuzz[ABS_Y] = 8; /* experimental; may need to change */
-#endif
-
-	/*
-	 * Register the input device.
-	 */
-	res = input_register_device(mimio->idev);
-	if (res) {
-		dev_err(&udev->dev, "input_register_device failure (%d)\n",
-			res);
-		mimio_dealloc(mimio);
-		return -EIO;
-	}
-	dev_dbg(&mimio->idev->dev, "input: %s on %s (res = %d).\n",
-		input_dev->name, input_dev->phys, res);
-
-	usb_set_intfdata(ifc, mimio);
-	mimio->present = 1;
-
-	/*
-	 * Submit the input urb to the usb subsystem.
-	 */
-	mimio->in.urb->dev = mimio->udev;
-	res = usb_submit_urb(mimio->in.urb, GFP_KERNEL);
-	if (res) {
-		dev_err(&mimio->idev->dev, "usb_submit_urb failure (%d)\n",
-			res);
-		mimio_dealloc(mimio);
-		return -EIO;
-	}
-
-	/*
-	 * Attempt to greet the mimio after giving
-	 * it some post-init settling time.
-	 *
-	 * note: sometimes this sleep interval isn't
-	 * long enough to permit the device to re-init
-	 * after a hot-swap; maybe need to bump it up.
-	 *
-	 * As it is, this probably breaks module unloading support!
-	 */
-	msleep(1024);
-
-	res = mimio_greet(mimio);
-	if (res == 0) {
-		dev_dbg(&mimio->idev->dev, "Mimio greeted OK.\n");
-		mimio->greeted = 1;
-		mimio->rxhandler = mimio_rx_handler;
-	} else {
-		dev_dbg(&mimio->idev->dev, "Mimio greet Failure (%d)\n", res);
-	}
-
-	return 0;
-}
-
-static int handle_mimio_rx_penupdown(struct mimio *mimio,
-				     int down,
-				     const char *const instr[],
-				     const int instr_ofst[])
-{
-	int penid, x;
-	if (mimio->pktbuf.q - mimio->pktbuf.p < (down ? 4 : 3))
-		return 1; 		/* partial pkt */
-
-	if (down) {
-		x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^
-			*(mimio->pktbuf.p + 2);
-		if (x != *(mimio->pktbuf.p + 3)) {
-			dev_dbg(&mimio->idev->dev, "EV_PEN%s: bad xsum.\n",
-				down ? "DOWN":"UP");
-			/* skip this event data */
-			mimio->pktbuf.p += 4;
-			/* decode any remaining events */
-			return 0;
-		}
-		penid = mimio->pktbuf.instr = *(mimio->pktbuf.p + 2);
-		if (penid > MIMIO_PEN_MAX) {
-			dev_dbg(&mimio->idev->dev,
-				"Unmapped penID (not in [0, %d]): %d\n",
-				MIMIO_PEN_MAX, (int)mimio->pktbuf.instr);
-			penid = mimio->pktbuf.instr = 0;
-		}
-		mimio->last_pen_down = penid;
-	} else {
-		penid = mimio->last_pen_down;
-	}
-	dev_dbg(&mimio->idev->dev, "%s (id %d, code %d) %s.\n", instr[penid],
-		instr_ofst[penid], penid, down ? "down" : "up");
-
-	if (instr_ofst[penid] >= 0) {
-		int code = BTN_TOOL_PEN + instr_ofst[penid];
-		int value = down ? DOWNVALUE : UPVALUE;
-		if (code > KEY_MAX)
-			dev_dbg(&mimio->idev->dev, "input_event will ignore "
-				"-- code (%d) > KEY_MAX\n", code);
-		if (!test_bit(code, mimio->idev->keybit))
-			dev_dbg(&mimio->idev->dev, "input_event will ignore "
-				"-- bit for code (%d) not enabled\n", code);
-		if (!!test_bit(code, mimio->idev->key) == value)
-			dev_dbg(&mimio->idev->dev, "input_event will ignore "
-				"-- bit for code (%d) already set to %d\n",
-				code, value);
-		if (value != DOWNVALUE) {
-			/* input_regs(mimio->idev, regs); */
-			input_report_key(mimio->idev, code, value);
-			input_sync(mimio->idev);
-		} else {
-			/* wait until we get some coordinates */
-		}
-	} else {
-		dev_dbg(&mimio->idev->dev, "penID offset[%d] == %d is < 0 "
-			"- not sending\n", penid, instr_ofst[penid]);
-	}
-	mimio->pktbuf.p += down ? 4 : 3; /* 3 for up, 4 for down */
-	return 0;
-}
-
-/*
- * Stay tuned for partial-packet excitement.
- *
- * This routine buffers data packets received from the mimio device
- * in the mimio's data space.  This buffering is necessary because
- * the mimio's in endpoint can serve us partial packets of data, and
- * we want the driver to support the servicing of multiple mimios.
- * Empirical evidence gathered so far suggests that the method of
- * buffering packet data in the mimio's data space works.  Previous
- * versions of this driver did not buffer packet data in each mimio's
- * data-space, and were therefore not able to service multiple mimios.
- * Note that since the caller of this routine is running in interrupt
- * context, care needs to be taken to ensure that this routine does not
- * become bloated, and it may be that another spinlock is needed in each
- * mimio to guard the buffered packet data properly.
- */
-static void mimio_rx_handler(struct mimio *mimio,
-			     unsigned char *data,
-			     unsigned int nbytes)
-{
-	struct device *dev = &mimio->idev->dev;
-	unsigned int x;
-	unsigned int y;
-	static const char * const instr[] = {
-		"?0",
-		"black pen", "blue pen", "green pen", "red pen",
-		"brown pen", "orange pen", "purple pen", "yellow pen",
-		"big eraser", "lil eraser",
-		"?11", "?12", "?13", "?14", "?15", "?16",
-		"mimio interactive", "interactive button1",
-		"interactive button2"
-	};
-
-	/* Mimio Interactive gives:
-	 * down: [0x22 0x01 0x11 0x32 0x24]
-	 * b1  : [0x22 0x01 0x12 0x31 0x24]
-	 * b2  : [0x22 0x01 0x13 0x30 0x24]
-	 */
-	static const int instr_ofst[] = {
-		-1,
-		0, 1, 2, 3,
-		9, 9, 9, 9,
-		4, 5,
-		-1, -1, -1, -1, -1, -1,
-		6, 7, 8,
-	};
-
-	memcpy(mimio->pktbuf.q, data, nbytes);
-	mimio->pktbuf.q += nbytes;
-
-	while (mimio->pktbuf.p < mimio->pktbuf.q) {
-		int t = *mimio->pktbuf.p;
-		switch (t) {
-		case MIMIO_EV_PENUP:
-		case MIMIO_EV_PENDOWN:
-			if (handle_mimio_rx_penupdown(mimio,
-						      t == MIMIO_EV_PENDOWN,
-						      instr, instr_ofst))
-				return; /* partial packet */
-			break;
-
-		case MIMIO_EV_PENDATA:
-			if (mimio->pktbuf.q - mimio->pktbuf.p < 6)
-				/* partial pkt */
-				return;
-			x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^
-				*(mimio->pktbuf.p + 2) ^
-				*(mimio->pktbuf.p + 3) ^
-				*(mimio->pktbuf.p + 4);
-			if (x != *(mimio->pktbuf.p + 5)) {
-				dev_dbg(dev, "EV_PENDATA: bad xsum.\n");
-				mimio->pktbuf.p += 6; /* skip this event data */
-				break; /* decode any remaining events */
-			}
-			x = *(mimio->pktbuf.p + 1);
-			x <<= 8;
-			x |= *(mimio->pktbuf.p + 2);
-			y = *(mimio->pktbuf.p + 3);
-			y <<= 8;
-			y |= *(mimio->pktbuf.p + 4);
-			dev_dbg(dev, "coord: (%d, %d)\n", x, y);
-			if (instr_ofst[mimio->pktbuf.instr] >= 0) {
-				int code = BTN_TOOL_PEN +
-					   instr_ofst[mimio->last_pen_down];
-#if 0
-				/* Utter hack to ensure we get forwarded _AND_
-				 * so we can identify when a complete signal is
-				 * received */
-				mimio->idev->abs[ABS_Y] = -1;
-				mimio->idev->abs[ABS_X] = -1;
-#endif
-				/* input_regs(mimio->idev, regs); */
-				input_report_abs(mimio->idev, ABS_X, x);
-				input_report_abs(mimio->idev, ABS_Y, y);
-				/* fake a penup */
-				change_bit(code, mimio->idev->key);
-				input_report_key(mimio->idev,
-						 code,
-						 DOWNVALUE);
-				/* always sync here */
-				mimio->idev->sync = 0;
-				input_sync(mimio->idev);
-			}
-			mimio->pktbuf.p += 6;
-			break;
-		case MIMIO_EV_MEMRESET:
-			if (mimio->pktbuf.q - mimio->pktbuf.p < 7)
-				/* partial pkt */
-				return;
-			dev_dbg(dev, "mem-reset.\n");
-			/* input_regs(mimio->idev, regs); */
-			input_event(mimio->idev, EV_KEY, BTN_0, 1);
-			input_event(mimio->idev, EV_KEY, BTN_0, 0);
-			input_sync(mimio->idev);
-			mimio->pktbuf.p += 7;
-			break;
-		case MIMIO_EV_ACC:
-			if (mimio->pktbuf.q - mimio->pktbuf.p < 4)
-				/* partial pkt */
-				return;
-			x = *mimio->pktbuf.p ^ *(mimio->pktbuf.p + 1) ^
-				*(mimio->pktbuf.p + 2);
-			if (x != *(mimio->pktbuf.p + 3)) {
-				dev_dbg(dev, "EV_ACC: bad xsum.\n");
-				mimio->pktbuf.p += 4; /* skip this event data */
-				break; /* decode any remaining events */
-			}
-			switch (*(mimio->pktbuf.p + 2)) {
-			case ACC_NEWPAGE:
-				dev_dbg(&mimio->idev->dev, "new-page.\n");
-				/* input_regs(mimio->idev, regs); */
-				input_event(mimio->idev, EV_KEY, BTN_1, 1);
-				input_event(mimio->idev, EV_KEY, BTN_1, 0);
-				input_sync(mimio->idev);
-				break;
-			case ACC_TAGPAGE:
-				dev_dbg(&mimio->idev->dev, "tag-page.\n");
-				/* input_regs(mimio->idev, regs); */
-				input_event(mimio->idev, EV_KEY, BTN_2, 1);
-				input_event(mimio->idev, EV_KEY, BTN_2, 0);
-				input_sync(mimio->idev);
-				break;
-			case ACC_PRINTPAGE:
-				dev_dbg(&mimio->idev->dev, "print-page.\n");
-				/* input_regs(mimio->idev, regs);*/
-				input_event(mimio->idev, EV_KEY, BTN_3, 1);
-				input_event(mimio->idev, EV_KEY, BTN_3, 0);
-				input_sync(mimio->idev);
-				break;
-			case ACC_MAXIMIZE:
-				dev_dbg(&mimio->idev->dev,
-					"maximize-window.\n");
-				/* input_regs(mimio->idev, regs); */
-				input_event(mimio->idev, EV_KEY, BTN_4, 1);
-				input_event(mimio->idev, EV_KEY, BTN_4, 0);
-				input_sync(mimio->idev);
-				break;
-			case ACC_FINDCTLPNL:
-				dev_dbg(&mimio->idev->dev, "find-ctl-panel.\n");
-				/* input_regs(mimio->idev, regs); */
-				input_event(mimio->idev, EV_KEY, BTN_5, 1);
-				input_event(mimio->idev, EV_KEY, BTN_5, 0);
-				input_sync(mimio->idev);
-				break;
-			case ACC_DONE:
-				dev_dbg(&mimio->idev->dev, "acc-done.\n");
-				/* no event is dispatched to the input
-				 * subsystem for this device event.
-				 */
-				break;
-			default:
-				dev_dbg(dev, "unknown acc event.\n");
-				break;
-			}
-			mimio->pktbuf.p += 4;
-			break;
-		default:
-			mimio->pktbuf.p++;
-			break;
-		}
-	}
-
-	/*
-	 * No partial event was received, so reset mimio's pktbuf ptrs.
-	 */
-	mimio->pktbuf.p = mimio->pktbuf.q = mimio->pktbuf.buf;
-}
-
-static int mimio_tx(struct mimio *mimio, const char *buf, int nbytes)
-{
-	int rslt;
-	int timeout;
-	unsigned long flags;
-	DECLARE_WAITQUEUE(wait, current);
-
-	if (!(isvalidtxsize(nbytes))) {
-		dev_err(&mimio->idev->dev, "invalid arg: nbytes: %d.\n",
-			nbytes);
-		return -EINVAL;
-	}
-
-	/*
-	 * Init the out urb and copy the data to send.
-	 */
-	mimio->out.urb->dev = mimio->udev;
-	mimio->out.urb->transfer_buffer_length = nbytes;
-	memcpy(mimio->out.urb->transfer_buffer, buf, nbytes);
-
-	/*
-	 * Send the data.
-	 */
-	spin_lock_irqsave(&mimio->txlock, flags);
-	mimio->txflags = MIMIO_TXWAIT;
-	rslt = usb_submit_urb(mimio->out.urb, GFP_ATOMIC);
-	spin_unlock_irqrestore(&mimio->txlock, flags);
-	dev_dbg(&mimio->idev->dev, "rslt: %d.\n", rslt);
-
-	if (rslt) {
-		dev_err(&mimio->idev->dev, "usb_submit_urb failure: %d.\n",
-			rslt);
-		return rslt;
-	}
-
-	/*
-	 * Wait for completion to be signalled (the mimio_irq_out
-	 * completion routine will or MIMIO_TXDONE in with txflags).
-	 */
-	timeout = HZ;
-	set_current_state(TASK_INTERRUPTIBLE);
-	add_wait_queue(&mimio->waitq, &wait);
-
-	while (timeout && ((mimio->txflags & MIMIO_TXDONE) == 0)) {
-		timeout = schedule_timeout(timeout);
-		rmb();
-	}
-
-	if ((mimio->txflags & MIMIO_TXDONE) == 0)
-		dev_dbg(&mimio->idev->dev, "tx timed out.\n");
-
-	/*
-	 * Now that completion has been signalled,
-	 * unlink the urb so that it can be recycled.
-	 */
-	set_current_state(TASK_RUNNING);
-	remove_wait_queue(&mimio->waitq, &wait);
-	usb_unlink_urb(mimio->out.urb);
-
-	return rslt;
-}
-
-static int __init mimio_init(void)
-{
-	int rslt;
-
-	rslt = usb_register(&mimio_driver);
-	if (rslt != 0) {
-		err("%s: usb_register failure: %d", __func__, rslt);
-		return rslt;
-	}
-
-	printk(KERN_INFO KBUILD_MODNAME ":"
-	       DRIVER_DESC " " DRIVER_VERSION "\n");
-	return rslt;
-}
-
-static void __exit mimio_exit(void)
-{
-	usb_deregister(&mimio_driver);
-}
-
-module_init(mimio_init);
-module_exit(mimio_exit);
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");



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

* [patch 028/123] dvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid Payload Pointer
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (26 preceding siblings ...)
  2010-03-13  0:12 ` [patch 027/123] Staging: mimio: remove the mimio driver Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 029/123] V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index Greg KH
                   ` (95 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ang Way Chuang,
	Mauro Carvalho Chehab

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

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

From: Ang Way Chuang <wcang79@gmail.com>

commit 29e1fa3565a7951cc415c634eb2b78dbdbee151d upstream.

ULE (Unidirectional Lightweight Encapsulation RFC 4326) decapsulation
has a bug that causes endless loop when Payload Pointer of MPEG2-TS
frame is 182 or 183.  Anyone who sends malicious MPEG2-TS frame will
cause the receiver of ULE SNDU to go into endless loop.

This patch was generated and tested against linux-2.6.32.9 and should
apply cleanly to linux-2.6.33 as well because there was only one typo
fix to dvb_net.c since v2.6.32.

This bug was brought to you by modern day Santa Claus who decided to
shower the satellite dish at Keio University with heavy snow causing
huge burst of errors.  We, receiver end, received Santa Claus's gift in
the form of kernel bug.

Care has been taken not to introduce more bug by fixing this bug, but
please scrutinize the code for I always produces buggy code.

Signed-off-by: Ang Way Chuang <wcang79@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/dvb/dvb-core/dvb_net.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -504,6 +504,7 @@ static void dvb_net_ule( struct net_devi
 				       "bytes left in TS.  Resyncing.\n", ts_remain);
 				priv->ule_sndu_len = 0;
 				priv->need_pusi = 1;
+				ts += TS_SZ;
 				continue;
 			}
 



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

* [patch 029/123] V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (27 preceding siblings ...)
  2010-03-13  0:12 ` [patch 028/123] dvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid Payload Pointer Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 030/123] PM / Hibernate: Fix preallocating of memory Greg KH
                   ` (94 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Baruch Siach,
	Guennadi Liakhovetski, Mauro Carvalho Chehab

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

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

From: Baruch Siach <baruch@tkos.co.il>

commit 84f3751d6a6f766780dee509433bf7b3dfcdf465 upstream.

When code <= V4L2_MBUS_FMT_FIXED soc_mbus_get_fmtdesc returns a pointer to
mbus_fmt[x], where x < 0. Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/media/video/soc_mediabus.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/media/video/soc_mediabus.c
+++ b/drivers/media/video/soc_mediabus.c
@@ -134,7 +134,8 @@ EXPORT_SYMBOL(soc_mbus_bytes_per_line);
 const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc(
 	enum v4l2_mbus_pixelcode code)
 {
-	if ((unsigned int)(code - V4L2_MBUS_FMT_FIXED) > ARRAY_SIZE(mbus_fmt))
+	if (code - V4L2_MBUS_FMT_FIXED > ARRAY_SIZE(mbus_fmt) ||
+	    code <= V4L2_MBUS_FMT_FIXED)
 		return NULL;
 	return mbus_fmt + code - V4L2_MBUS_FMT_FIXED - 1;
 }



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

* [patch 030/123] PM / Hibernate: Fix preallocating of memory
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (28 preceding siblings ...)
  2010-03-13  0:12 ` [patch 029/123] V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 031/123] macintosh/therm_adt746x: Fix sysfs attributes lifetime Greg KH
                   ` (93 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Rafael J. Wysocki

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

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

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

commit a9c9b4429df437982d2fbfab1f4b46b01329e9ed upstream.

The hibernate memory preallocation code allocates memory to push some
user space data out of physical RAM, so that the hibernation image is
not too large.  It allocates more memory than necessary for creating
the image, so it has to release some pages to make room for
allocations made while suspending devices and disabling nonboot CPUs,
or the system will hang due to the lack of free pages to allocate
from.  Unfortunately, the function used for freeing these pages,
free_unnecessary_pages(), contains a bug that prevents it from doing
the job on all systems without highmem.

Fix this problem, which is a regression from the 2.6.30 kernel, by
using the right condition for the termination of the loop in
free_unnecessary_pages().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Alan Jenkins <sourcejedi.lkml@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1181,7 +1181,7 @@ static void free_unnecessary_pages(void)
 
 	memory_bm_position_reset(&copy_bm);
 
-	while (to_free_normal > 0 && to_free_highmem > 0) {
+	while (to_free_normal > 0 || to_free_highmem > 0) {
 		unsigned long pfn = memory_bm_next_pfn(&copy_bm);
 		struct page *page = pfn_to_page(pfn);
 



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

* [patch 031/123] macintosh/therm_adt746x: Fix sysfs attributes lifetime
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (29 preceding siblings ...)
  2010-03-13  0:12 ` [patch 030/123] PM / Hibernate: Fix preallocating of memory Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 032/123] macintosh/hwmon/ams: Fix device removal sequence Greg KH
                   ` (92 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jean Delvare,
	Benjamin Herrenschmidt, Colin Leroy

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

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

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

commit 33a470f6d5e1879c26f16f6b34dc09f82d44f6e9 upstream.

Looking at drivers/macintosh/therm_adt746x.c, the sysfs files are
created in thermostat_init() and removed in thermostat_exit(), which
are the driver's init and exit functions. These files are backed-up by
a per-device structure, so it looks like the wrong thing to do: the
sysfs files have a lifetime longer than the data structure that is
backing it up.

I think that sysfs files creation should be moved to the end of
probe_thermostat() and sysfs files removal should be moved to the
beginning of remove_thermostat().

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Colin Leroy <colin@colino.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/macintosh/therm_adt746x.c |   34 ++++++++++++++++++++++++----------
 1 file changed, 24 insertions(+), 10 deletions(-)

--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -90,6 +90,8 @@ static struct task_struct *thread_therm
 
 static void write_both_fan_speed(struct thermostat *th, int speed);
 static void write_fan_speed(struct thermostat *th, int speed, int fan);
+static void thermostat_create_files(void);
+static void thermostat_remove_files(void);
 
 static int
 write_reg(struct thermostat* th, int reg, u8 data)
@@ -161,6 +163,8 @@ remove_thermostat(struct i2c_client *cli
 	struct thermostat *th = i2c_get_clientdata(client);
 	int i;
 	
+	thermostat_remove_files();
+
 	if (thread_therm != NULL) {
 		kthread_stop(thread_therm);
 	}
@@ -449,6 +453,8 @@ static int probe_thermostat(struct i2c_c
 		return -ENOMEM;
 	}
 
+	thermostat_create_files();
+
 	return 0;
 }
 
@@ -566,7 +572,6 @@ thermostat_init(void)
 	struct device_node* np;
 	const u32 *prop;
 	int i = 0, offset = 0;
-	int err;
 
 	np = of_find_node_by_name(NULL, "fan");
 	if (!np)
@@ -633,6 +638,17 @@ thermostat_init(void)
 		return -ENODEV;
 	}
 
+#ifndef CONFIG_I2C_POWERMAC
+	request_module("i2c-powermac");
+#endif
+
+	return i2c_add_driver(&thermostat_driver);
+}
+
+static void thermostat_create_files(void)
+{
+	int err;
+
 	err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
 	err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
 	err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
@@ -647,16 +663,9 @@ thermostat_init(void)
 	if (err)
 		printk(KERN_WARNING
 			"Failed to create tempertaure attribute file(s).\n");
-
-#ifndef CONFIG_I2C_POWERMAC
-	request_module("i2c-powermac");
-#endif
-
-	return i2c_add_driver(&thermostat_driver);
 }
 
-static void __exit
-thermostat_exit(void)
+static void thermostat_remove_files(void)
 {
 	if (of_dev) {
 		device_remove_file(&of_dev->dev, &dev_attr_sensor1_temperature);
@@ -673,9 +682,14 @@ thermostat_exit(void)
 			device_remove_file(&of_dev->dev,
 					   &dev_attr_sensor2_fan_speed);
 
-		of_device_unregister(of_dev);
 	}
+}
+
+static void __exit
+thermostat_exit(void)
+{
 	i2c_del_driver(&thermostat_driver);
+	of_device_unregister(of_dev);
 }
 
 module_init(thermostat_init);



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

* [patch 032/123] macintosh/hwmon/ams: Fix device removal sequence
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (30 preceding siblings ...)
  2010-03-13  0:12 ` [patch 031/123] macintosh/therm_adt746x: Fix sysfs attributes lifetime Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 033/123] oprofile/x86: fix perfctr nmi reservation for mulitplexing Greg KH
                   ` (91 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jean Delvare,
	Benjamin Herrenschmidt, Stelian Pop, Michael Hanselmann

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

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

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

commit 98ceb75c7c14eada76b0aa9f03a635a735cee3cb upstream.

Some code that is in ams_exit() (the module exit code) should instead
be called when the device (not module) is removed. It probably doesn't
make much of a difference in the PMU case, but in the I2C case it does
matter.

I make no guarantee that my fix isn't racy, I'm not familiar enough
with the ams driver code to tell for sure.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Christian Kujau <lists@nerdbynature.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hwmon/ams/ams-core.c |   11 +++++++----
 drivers/hwmon/ams/ams-i2c.c  |    2 ++
 drivers/hwmon/ams/ams-pmu.c  |    2 ++
 drivers/hwmon/ams/ams.h      |    1 +
 4 files changed, 12 insertions(+), 4 deletions(-)

--- a/drivers/hwmon/ams/ams-core.c
+++ b/drivers/hwmon/ams/ams-core.c
@@ -213,7 +213,7 @@ int __init ams_init(void)
 	return -ENODEV;
 }
 
-void ams_exit(void)
+void ams_sensor_detach(void)
 {
 	/* Remove input device */
 	ams_input_exit();
@@ -221,9 +221,6 @@ void ams_exit(void)
 	/* Remove attributes */
 	device_remove_file(&ams_info.of_dev->dev, &dev_attr_current);
 
-	/* Shut down implementation */
-	ams_info.exit();
-
 	/* Flush interrupt worker
 	 *
 	 * We do this after ams_info.exit(), because an interrupt might
@@ -239,6 +236,12 @@ void ams_exit(void)
 	pmf_unregister_irq_client(&ams_freefall_client);
 }
 
+static void __exit ams_exit(void)
+{
+	/* Shut down implementation */
+	ams_info.exit();
+}
+
 MODULE_AUTHOR("Stelian Pop, Michael Hanselmann");
 MODULE_DESCRIPTION("Apple Motion Sensor driver");
 MODULE_LICENSE("GPL");
--- a/drivers/hwmon/ams/ams-i2c.c
+++ b/drivers/hwmon/ams/ams-i2c.c
@@ -238,6 +238,8 @@ static int ams_i2c_probe(struct i2c_clie
 static int ams_i2c_remove(struct i2c_client *client)
 {
 	if (ams_info.has_device) {
+		ams_sensor_detach();
+
 		/* Disable interrupts */
 		ams_i2c_set_irq(AMS_IRQ_ALL, 0);
 
--- a/drivers/hwmon/ams/ams-pmu.c
+++ b/drivers/hwmon/ams/ams-pmu.c
@@ -133,6 +133,8 @@ static void ams_pmu_get_xyz(s8 *x, s8 *y
 
 static void ams_pmu_exit(void)
 {
+	ams_sensor_detach();
+
 	/* Disable interrupts */
 	ams_pmu_set_irq(AMS_IRQ_ALL, 0);
 
--- a/drivers/hwmon/ams/ams.h
+++ b/drivers/hwmon/ams/ams.h
@@ -61,6 +61,7 @@ extern struct ams ams_info;
 
 extern void ams_sensors(s8 *x, s8 *y, s8 *z);
 extern int ams_sensor_attach(void);
+extern void ams_sensor_detach(void);
 
 extern int ams_pmu_init(struct device_node *np);
 extern int ams_i2c_init(struct device_node *np);



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

* [patch 033/123] oprofile/x86: fix perfctr nmi reservation for mulitplexing
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (31 preceding siblings ...)
  2010-03-13  0:12 ` [patch 032/123] macintosh/hwmon/ams: Fix device removal sequence Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 034/123] perf symbols: Check the right return variable Greg KH
                   ` (90 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robert Richter

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

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

From: Robert Richter <robert.richter@amd.com>

commit 68dc819ce829f7e7977a56524e710473bdb55115 upstream.

Multiple virtual counters share one physical counter. The reservation
of virtual counters fails due to duplicate allocation of the same
counter. The counters are already reserved. Thus, virtual counter
reservation may removed at all. This also makes the code easier.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/oprofile/nmi_int.c      |   11 ++++++-----
 arch/x86/oprofile/op_model_amd.c |   19 -------------------
 2 files changed, 6 insertions(+), 24 deletions(-)

--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -179,7 +179,6 @@ static void nmi_cpu_setup_mux(int cpu, s
 		if (counter_config[i].enabled) {
 			multiplex[i].saved = -(u64)counter_config[i].count;
 		} else {
-			multiplex[i].addr  = 0;
 			multiplex[i].saved = 0;
 		}
 	}
@@ -189,25 +188,27 @@ static void nmi_cpu_setup_mux(int cpu, s
 
 static void nmi_cpu_save_mpx_registers(struct op_msrs *msrs)
 {
+	struct op_msr *counters = msrs->counters;
 	struct op_msr *multiplex = msrs->multiplex;
 	int i;
 
 	for (i = 0; i < model->num_counters; ++i) {
 		int virt = op_x86_phys_to_virt(i);
-		if (multiplex[virt].addr)
-			rdmsrl(multiplex[virt].addr, multiplex[virt].saved);
+		if (counters[i].addr)
+			rdmsrl(counters[i].addr, multiplex[virt].saved);
 	}
 }
 
 static void nmi_cpu_restore_mpx_registers(struct op_msrs *msrs)
 {
+	struct op_msr *counters = msrs->counters;
 	struct op_msr *multiplex = msrs->multiplex;
 	int i;
 
 	for (i = 0; i < model->num_counters; ++i) {
 		int virt = op_x86_phys_to_virt(i);
-		if (multiplex[virt].addr)
-			wrmsrl(multiplex[virt].addr, multiplex[virt].saved);
+		if (counters[i].addr)
+			wrmsrl(counters[i].addr, multiplex[virt].saved);
 	}
 }
 
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -76,19 +76,6 @@ static struct op_ibs_config ibs_config;
 
 #ifdef CONFIG_OPROFILE_EVENT_MULTIPLEX
 
-static void op_mux_fill_in_addresses(struct op_msrs * const msrs)
-{
-	int i;
-
-	for (i = 0; i < NUM_VIRT_COUNTERS; i++) {
-		int hw_counter = op_x86_virt_to_phys(i);
-		if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i))
-			msrs->multiplex[i].addr = MSR_K7_PERFCTR0 + hw_counter;
-		else
-			msrs->multiplex[i].addr = 0;
-	}
-}
-
 static void op_mux_switch_ctrl(struct op_x86_model_spec const *model,
 			       struct op_msrs const * const msrs)
 {
@@ -107,10 +94,6 @@ static void op_mux_switch_ctrl(struct op
 	}
 }
 
-#else
-
-static inline void op_mux_fill_in_addresses(struct op_msrs * const msrs) { }
-
 #endif
 
 /* functions for op_amd_spec */
@@ -132,8 +115,6 @@ static void op_amd_fill_in_addresses(str
 		else
 			msrs->controls[i].addr = 0;
 	}
-
-	op_mux_fill_in_addresses(msrs);
 }
 
 static void op_amd_setup_ctrs(struct op_x86_model_spec const *model,



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

* [patch 034/123] perf symbols: Check the right return variable
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (32 preceding siblings ...)
  2010-03-13  0:12 ` [patch 033/123] oprofile/x86: fix perfctr nmi reservation for mulitplexing Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 035/123] perf_event: Fix preempt warning in perf_clock() Greg KH
                   ` (89 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Zhang Yanmin,
	David S. Miller, Peter Zijlstra, Mike Galbraith, Paul Mackerras,
	Arnaldo Carvalho de Melo, Frederic Weisbecker, Ingo Molnar

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

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

From: Zhang, Yanmin <yanmin_zhang@linux.intel.com>

commit 37fe5fcb7a5b5235c8b71bf5469ce4c7246e3fab upstream.

In function dso__split_kallsyms(), curr_map saves the return value
of map__new2. So check it instead of var map after the call returns.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1267066851.1726.9.camel@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 tools/perf/util/symbol.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -503,7 +503,7 @@ static int dso__split_kallsyms(struct ds
 				return -1;
 
 			curr_map = map__new2(pos->start, dso, map->type);
-			if (map == NULL) {
+			if (curr_map == NULL) {
 				dso__delete(dso);
 				return -1;
 			}



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

* [patch 035/123] perf_event: Fix preempt warning in perf_clock()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (33 preceding siblings ...)
  2010-03-13  0:12 ` [patch 034/123] perf symbols: Check the right return variable Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 036/123] oprofile: remove tracing build dependency Greg KH
                   ` (88 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Peter Zijlstra, Ingo Molnar

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

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

From: Peter Zijlstra <peterz@infradead.org>

commit 24691ea964cc0123e386b661e03a86a481c6ee79 upstream.

A recent commit introduced a preemption warning for
perf_clock(), use raw_smp_processor_id() to avoid this, it
really doesn't matter which cpu we use here.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1267198583.22519.684.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/perf_event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -248,7 +248,7 @@ static void perf_unpin_context(struct pe
 
 static inline u64 perf_clock(void)
 {
-	return cpu_clock(smp_processor_id());
+	return cpu_clock(raw_smp_processor_id());
 }
 
 /*



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

* [patch 036/123] oprofile: remove tracing build dependency
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (34 preceding siblings ...)
  2010-03-13  0:12 ` [patch 035/123] perf_event: Fix preempt warning in perf_clock() Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 037/123] oprofile/x86: remove node check in AMD IBS initialization Greg KH
                   ` (87 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robert Richter

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

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

From: Robert Richter <robert.richter@amd.com>

commit 18b4a4d59e97e7ff13ee84b5bec79f3fc70a9f0a upstream.

The commit

 1155de4 ring-buffer: Make it generally available

already made ring-buffer available without the TRACING option
enabled. This patch removes the TRACING dependency from oprofile.

Fixes also oprofile configuration on ia64.

The patch also applies to the 2.6.32-stable kernel.

Reported-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/Kconfig |    2 --
 1 file changed, 2 deletions(-)

--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -6,8 +6,6 @@ config OPROFILE
 	tristate "OProfile system profiling (EXPERIMENTAL)"
 	depends on PROFILING
 	depends on HAVE_OPROFILE
-	depends on TRACING_SUPPORT
-	select TRACING
 	select RING_BUFFER
 	select RING_BUFFER_ALLOW_SWAP
 	help



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

* [patch 037/123] oprofile/x86: remove node check in AMD IBS initialization
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (35 preceding siblings ...)
  2010-03-13  0:12 ` [patch 036/123] oprofile: remove tracing build dependency Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 038/123] oprofile/x86: use kzalloc() instead of kmalloc() Greg KH
                   ` (86 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robert Richter

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

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

From: Robert Richter <robert.richter@amd.com>

commit 89baaaa98a10cad5cc8516c7208b02d9fc711890 upstream.

Standard AMD systems have the same number of nodes as there are
northbridge devices. However, there may kernel configurations
(especially for 32 bit) or system setups exist, where the node number
is different or it can not be detected properly. Thus the check is not
reliable and may fail though IBS setup was fine. For this reason it is
better to remove the check.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/oprofile/op_model_amd.c |   10 ----------
 1 file changed, 10 deletions(-)

--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -386,16 +386,6 @@ static int init_ibs_nmi(void)
 		return 1;
 	}
 
-#ifdef CONFIG_NUMA
-	/* Sanity check */
-	/* Works only for 64bit with proper numa implementation. */
-	if (nodes != num_possible_nodes()) {
-		printk(KERN_DEBUG "Failed to setup CPU node(s) for IBS, "
-			"found: %d, expected %d",
-			nodes, num_possible_nodes());
-		return 1;
-	}
-#endif
 	return 0;
 }
 



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

* [patch 038/123] oprofile/x86: use kzalloc() instead of kmalloc()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (36 preceding siblings ...)
  2010-03-13  0:12 ` [patch 037/123] oprofile/x86: remove node check in AMD IBS initialization Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 039/123] oprofile/x86: fix msr access to reserved counters Greg KH
                   ` (85 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robert Richter

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

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

From: Robert Richter <robert.richter@amd.com>

commit c17c8fbf349482e89b57d1b800e83e9f4cf40c47 upstream.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/oprofile/nmi_int.c       |    6 +++---
 arch/x86/oprofile/op_model_amd.c  |    4 ----
 arch/x86/oprofile/op_model_p4.c   |    6 ------
 arch/x86/oprofile/op_model_ppro.c |    6 +-----
 4 files changed, 4 insertions(+), 18 deletions(-)

--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -159,7 +159,7 @@ static int nmi_setup_mux(void)
 
 	for_each_possible_cpu(i) {
 		per_cpu(cpu_msrs, i).multiplex =
-			kmalloc(multiplex_size, GFP_KERNEL);
+			kzalloc(multiplex_size, GFP_KERNEL);
 		if (!per_cpu(cpu_msrs, i).multiplex)
 			return 0;
 	}
@@ -304,11 +304,11 @@ static int allocate_msrs(void)
 
 	int i;
 	for_each_possible_cpu(i) {
-		per_cpu(cpu_msrs, i).counters = kmalloc(counters_size,
+		per_cpu(cpu_msrs, i).counters = kzalloc(counters_size,
 							GFP_KERNEL);
 		if (!per_cpu(cpu_msrs, i).counters)
 			return 0;
-		per_cpu(cpu_msrs, i).controls = kmalloc(controls_size,
+		per_cpu(cpu_msrs, i).controls = kzalloc(controls_size,
 							GFP_KERNEL);
 		if (!per_cpu(cpu_msrs, i).controls)
 			return 0;
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -105,15 +105,11 @@ static void op_amd_fill_in_addresses(str
 	for (i = 0; i < NUM_COUNTERS; i++) {
 		if (reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i))
 			msrs->counters[i].addr = MSR_K7_PERFCTR0 + i;
-		else
-			msrs->counters[i].addr = 0;
 	}
 
 	for (i = 0; i < NUM_CONTROLS; i++) {
 		if (reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i))
 			msrs->controls[i].addr = MSR_K7_EVNTSEL0 + i;
-		else
-			msrs->controls[i].addr = 0;
 	}
 }
 
--- a/arch/x86/oprofile/op_model_p4.c
+++ b/arch/x86/oprofile/op_model_p4.c
@@ -394,12 +394,6 @@ static void p4_fill_in_addresses(struct
 	setup_num_counters();
 	stag = get_stagger();
 
-	/* initialize some registers */
-	for (i = 0; i < num_counters; ++i)
-		msrs->counters[i].addr = 0;
-	for (i = 0; i < num_controls; ++i)
-		msrs->controls[i].addr = 0;
-
 	/* the counter & cccr registers we pay attention to */
 	for (i = 0; i < num_counters; ++i) {
 		addr = p4_counters[VIRT_CTR(stag, i)].counter_address;
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -37,15 +37,11 @@ static void ppro_fill_in_addresses(struc
 	for (i = 0; i < num_counters; i++) {
 		if (reserve_perfctr_nmi(MSR_P6_PERFCTR0 + i))
 			msrs->counters[i].addr = MSR_P6_PERFCTR0 + i;
-		else
-			msrs->counters[i].addr = 0;
 	}
 
 	for (i = 0; i < num_counters; i++) {
 		if (reserve_evntsel_nmi(MSR_P6_EVNTSEL0 + i))
 			msrs->controls[i].addr = MSR_P6_EVNTSEL0 + i;
-		else
-			msrs->controls[i].addr = 0;
 	}
 }
 
@@ -57,7 +53,7 @@ static void ppro_setup_ctrs(struct op_x8
 	int i;
 
 	if (!reset_value) {
-		reset_value = kmalloc(sizeof(reset_value[0]) * num_counters,
+		reset_value = kzalloc(sizeof(reset_value[0]) * num_counters,
 					GFP_ATOMIC);
 		if (!reset_value)
 			return;



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

* [patch 039/123] oprofile/x86: fix msr access to reserved counters
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (37 preceding siblings ...)
  2010-03-13  0:12 ` [patch 038/123] oprofile/x86: use kzalloc() instead of kmalloc() Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 040/123] perf: Reimplement frequency driven sampling Greg KH
                   ` (84 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Robert Richter

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

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

From: Robert Richter <robert.richter@amd.com>

commit cfc9c0b450176a077205ef39092f0dc1a04e020a upstream.

During switching virtual counters there is access to perfctr msrs. If
the counter is not available this fails due to an invalid
address. This patch fixes this.

Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/oprofile/op_model_amd.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -85,7 +85,7 @@ static void op_mux_switch_ctrl(struct op
 	/* enable active counters */
 	for (i = 0; i < NUM_COUNTERS; ++i) {
 		int virt = op_x86_phys_to_virt(i);
-		if (!counter_config[virt].enabled)
+		if (!reset_value[virt])
 			continue;
 		rdmsrl(msrs->controls[i].addr, val);
 		val &= model->reserved;
@@ -121,7 +121,8 @@ static void op_amd_setup_ctrs(struct op_
 
 	/* setup reset_value */
 	for (i = 0; i < NUM_VIRT_COUNTERS; ++i) {
-		if (counter_config[i].enabled)
+		if (counter_config[i].enabled
+		    && msrs->counters[op_x86_virt_to_phys(i)].addr)
 			reset_value[i] = counter_config[i].count;
 		else
 			reset_value[i] = 0;
@@ -146,9 +147,7 @@ static void op_amd_setup_ctrs(struct op_
 	/* enable active counters */
 	for (i = 0; i < NUM_COUNTERS; ++i) {
 		int virt = op_x86_phys_to_virt(i);
-		if (!counter_config[virt].enabled)
-			continue;
-		if (!msrs->counters[i].addr)
+		if (!reset_value[virt])
 			continue;
 
 		/* setup counter registers */



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

* [patch 040/123] perf: Reimplement frequency driven sampling
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (38 preceding siblings ...)
  2010-03-13  0:12 ` [patch 039/123] oprofile/x86: fix msr access to reserved counters Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 041/123] tracing: Fix ftrace_event_call alignment for use with gcc 4.5 Greg KH
                   ` (83 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Peter Zijlstra, Ingo Molnar

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

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

From: Peter Zijlstra <a.p.zijlstra@chello.nl>

commit abd50713944c8ea9e0af5b7bffa0aacae21cc91a upstream.

There was a bug in the old period code that caused intel_pmu_enable_all()
or native_write_msr_safe() to show up quite high in the profiles.

In staring at that code it made my head hurt, so I rewrote it in a
hopefully simpler fashion. Its now fully symetric between tick and
overflow driven adjustments and uses less data to boot.

The only complication is that it basically wants to do a u128 division.
The code approximates that in a rather simple truncate until it fits
fashion, taking care to balance the terms while truncating.

This version does not generate that sampling artefact.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/perf_event.h |    5 -
 kernel/perf_event.c        |  132 +++++++++++++++++++++++++++++++--------------
 2 files changed, 94 insertions(+), 43 deletions(-)

--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -496,9 +496,8 @@ struct hw_perf_event {
 	atomic64_t			period_left;
 	u64				interrupts;
 
-	u64				freq_count;
-	u64				freq_interrupts;
-	u64				freq_stamp;
+	u64				freq_time_stamp;
+	u64				freq_count_stamp;
 #endif
 };
 
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1350,14 +1350,83 @@ static void perf_event_cpu_sched_in(stru
 
 static void perf_log_throttle(struct perf_event *event, int enable);
 
-static void perf_adjust_period(struct perf_event *event, u64 events)
+static u64 perf_calculate_period(struct perf_event *event, u64 nsec, u64 count)
+{
+	u64 frequency = event->attr.sample_freq;
+	u64 sec = NSEC_PER_SEC;
+	u64 divisor, dividend;
+
+	int count_fls, nsec_fls, frequency_fls, sec_fls;
+
+	count_fls = fls64(count);
+	nsec_fls = fls64(nsec);
+	frequency_fls = fls64(frequency);
+	sec_fls = 30;
+
+	/*
+	 * We got @count in @nsec, with a target of sample_freq HZ
+	 * the target period becomes:
+	 *
+	 *             @count * 10^9
+	 * period = -------------------
+	 *          @nsec * sample_freq
+	 *
+	 */
+
+	/*
+	 * Reduce accuracy by one bit such that @a and @b converge
+	 * to a similar magnitude.
+	 */
+#define REDUCE_FLS(a, b) 		\
+do {					\
+	if (a##_fls > b##_fls) {	\
+		a >>= 1;		\
+		a##_fls--;		\
+	} else {			\
+		b >>= 1;		\
+		b##_fls--;		\
+	}				\
+} while (0)
+
+	/*
+	 * Reduce accuracy until either term fits in a u64, then proceed with
+	 * the other, so that finally we can do a u64/u64 division.
+	 */
+	while (count_fls + sec_fls > 64 && nsec_fls + frequency_fls > 64) {
+		REDUCE_FLS(nsec, frequency);
+		REDUCE_FLS(sec, count);
+	}
+
+	if (count_fls + sec_fls > 64) {
+		divisor = nsec * frequency;
+
+		while (count_fls + sec_fls > 64) {
+			REDUCE_FLS(count, sec);
+			divisor >>= 1;
+		}
+
+		dividend = count * sec;
+	} else {
+		dividend = count * sec;
+
+		while (nsec_fls + frequency_fls > 64) {
+			REDUCE_FLS(nsec, frequency);
+			dividend >>= 1;
+		}
+
+		divisor = nsec * frequency;
+	}
+
+	return div64_u64(dividend, divisor);
+}
+
+static void perf_adjust_period(struct perf_event *event, u64 nsec, u64 count)
 {
 	struct hw_perf_event *hwc = &event->hw;
 	u64 period, sample_period;
 	s64 delta;
 
-	events *= hwc->sample_period;
-	period = div64_u64(events, event->attr.sample_freq);
+	period = perf_calculate_period(event, nsec, count);
 
 	delta = (s64)(period - hwc->sample_period);
 	delta = (delta + 7) / 8; /* low pass filter */
@@ -1368,13 +1437,22 @@ static void perf_adjust_period(struct pe
 		sample_period = 1;
 
 	hwc->sample_period = sample_period;
+
+	if (atomic64_read(&hwc->period_left) > 8*sample_period) {
+		perf_disable();
+		event->pmu->disable(event);
+		atomic64_set(&hwc->period_left, 0);
+		event->pmu->enable(event);
+		perf_enable();
+	}
 }
 
 static void perf_ctx_adjust_freq(struct perf_event_context *ctx)
 {
 	struct perf_event *event;
 	struct hw_perf_event *hwc;
-	u64 interrupts, freq;
+	u64 interrupts, now;
+	s64 delta;
 
 	raw_spin_lock(&ctx->lock);
 	list_for_each_entry_rcu(event, &ctx->event_list, event_entry) {
@@ -1395,44 +1473,18 @@ static void perf_ctx_adjust_freq(struct
 		if (interrupts == MAX_INTERRUPTS) {
 			perf_log_throttle(event, 1);
 			event->pmu->unthrottle(event);
-			interrupts = 2*sysctl_perf_event_sample_rate/HZ;
 		}
 
 		if (!event->attr.freq || !event->attr.sample_freq)
 			continue;
 
-		/*
-		 * if the specified freq < HZ then we need to skip ticks
-		 */
-		if (event->attr.sample_freq < HZ) {
-			freq = event->attr.sample_freq;
-
-			hwc->freq_count += freq;
-			hwc->freq_interrupts += interrupts;
-
-			if (hwc->freq_count < HZ)
-				continue;
-
-			interrupts = hwc->freq_interrupts;
-			hwc->freq_interrupts = 0;
-			hwc->freq_count -= HZ;
-		} else
-			freq = HZ;
+		event->pmu->read(event);
+		now = atomic64_read(&event->count);
+		delta = now - hwc->freq_count_stamp;
+		hwc->freq_count_stamp = now;
 
-		perf_adjust_period(event, freq * interrupts);
-
-		/*
-		 * In order to avoid being stalled by an (accidental) huge
-		 * sample period, force reset the sample period if we didn't
-		 * get any events in this freq period.
-		 */
-		if (!interrupts) {
-			perf_disable();
-			event->pmu->disable(event);
-			atomic64_set(&hwc->period_left, 0);
-			event->pmu->enable(event);
-			perf_enable();
-		}
+		if (delta > 0)
+			perf_adjust_period(event, TICK_NSEC, delta);
 	}
 	raw_spin_unlock(&ctx->lock);
 }
@@ -3688,12 +3740,12 @@ static int __perf_event_overflow(struct
 
 	if (event->attr.freq) {
 		u64 now = perf_clock();
-		s64 delta = now - hwc->freq_stamp;
+		s64 delta = now - hwc->freq_time_stamp;
 
-		hwc->freq_stamp = now;
+		hwc->freq_time_stamp = now;
 
-		if (delta > 0 && delta < TICK_NSEC)
-			perf_adjust_period(event, NSEC_PER_SEC / (int)delta);
+		if (delta > 0 && delta < 2*TICK_NSEC)
+			perf_adjust_period(event, delta, hwc->last_period);
 	}
 
 	/*



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

* [patch 041/123] tracing: Fix ftrace_event_call alignment for use with gcc 4.5
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (39 preceding siblings ...)
  2010-03-13  0:12 ` [patch 040/123] perf: Reimplement frequency driven sampling Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 042/123] ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q Greg KH
                   ` (82 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jeff Mahoney, Steven Rostedt

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

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

From: Jeff Mahoney <jeffm@suse.com>

commit 86c38a31aa7f2dd6e74a262710bf8ebf7455acc5 upstream.

GCC 4.5 introduces behavior that forces the alignment of structures to
 use the largest possible value. The default value is 32 bytes, so if
 some structures are defined with a 4-byte alignment and others aren't
 declared with an alignment constraint at all - it will align at 32-bytes.

 For things like the ftrace events, this results in a non-standard array.
 When initializing the ftrace subsystem, we traverse the _ftrace_events
 section and call the initialization callback for each event. When the
 structures are misaligned, we could be treating another part of the
 structure (or the zeroed out space between them) as a function pointer.

 This patch forces the alignment for all the ftrace_event_call structures
 to 4 bytes.

 Without this patch, the kernel fails to boot very early when built with
 gcc 4.5.

 It's trivial to check the alignment of the members of the array, so it
 might be worthwhile to add something to the build system to do that
 automatically. Unfortunately, that only covers this case. I've asked one
 of the gcc developers about adding a warning when this condition is seen.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
LKML-Reference: <4B85770B.6010901@suse.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/syscalls.h |    6 ++++--
 include/trace/ftrace.h   |    3 ++-
 kernel/trace/trace.h     |    3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -132,7 +132,8 @@ struct perf_event_attr;
 
 #define SYSCALL_TRACE_ENTER_EVENT(sname)				\
 	static const struct syscall_metadata __syscall_meta_##sname;	\
-	static struct ftrace_event_call event_enter_##sname;		\
+	static struct ftrace_event_call					\
+	__attribute__((__aligned__(4))) event_enter_##sname;		\
 	static struct trace_event enter_syscall_print_##sname = {	\
 		.trace                  = print_syscall_enter,		\
 	};								\
@@ -154,7 +155,8 @@ struct perf_event_attr;
 
 #define SYSCALL_TRACE_EXIT_EVENT(sname)					\
 	static const struct syscall_metadata __syscall_meta_##sname;	\
-	static struct ftrace_event_call event_exit_##sname;		\
+	static struct ftrace_event_call					\
+	__attribute__((__aligned__(4))) event_exit_##sname;		\
 	static struct trace_event exit_syscall_print_##sname = {	\
 		.trace                  = print_syscall_exit,		\
 	};								\
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -65,7 +65,8 @@
 	};
 #undef DEFINE_EVENT
 #define DEFINE_EVENT(template, name, proto, args)	\
-	static struct ftrace_event_call event_##name
+	static struct ftrace_event_call			\
+	__attribute__((__aligned__(4))) event_##name
 
 #undef DEFINE_EVENT_PRINT
 #define DEFINE_EVENT_PRINT(template, name, proto, args, print)	\
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -791,7 +791,8 @@ extern const char *__stop___trace_bprint
 
 #undef FTRACE_ENTRY
 #define FTRACE_ENTRY(call, struct_name, id, tstruct, print)		\
-	extern struct ftrace_event_call event_##call;
+	extern struct ftrace_event_call					\
+	__attribute__((__aligned__(4))) event_##call;
 #undef FTRACE_ENTRY_DUP
 #define FTRACE_ENTRY_DUP(call, struct_name, id, tstruct, print)		\
 	FTRACE_ENTRY(call, struct_name, id, PARAMS(tstruct), PARAMS(print))



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

* [patch 042/123] ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (40 preceding siblings ...)
  2010-03-13  0:12 ` [patch 041/123] tracing: Fix ftrace_event_call alignment for use with gcc 4.5 Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 043/123] ALSA: via82xx: add quirk for D1289 motherboard Greg KH
                   ` (81 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai

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

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

From: Daniel T Chen <crimsun@ubuntu.com>

commit ba579eb7b30791751f556ee01905636cda50c864 upstream.

BugLink: https://bugs.launchpad.net/bugs/524948

The OR has verified that the existing model=laptop-eapd quirk does not
function correctly but instead needs model=3stack.  Make this change
so that manual corrections to module-init-tools file(s) are not
required.

Reported-by: Lasse Havelund <lasse@havelund.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/hda/patch_analog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1008,7 +1008,7 @@ static struct snd_pci_quirk ad1986a_cfg_
 	SND_PCI_QUIRK(0x1043, 0x81cb, "ASUS M2N", AD1986A_3STACK),
 	SND_PCI_QUIRK(0x1043, 0x8234, "ASUS M2N", AD1986A_3STACK),
 	SND_PCI_QUIRK(0x10de, 0xcb84, "ASUS A8N-VM", AD1986A_3STACK),
-	SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD),
+	SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba Satellite L40-10Q", AD1986A_3STACK),
 	SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK),
 	SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP),
 	SND_PCI_QUIRK(0x144d, 0xc024, "Samsung P50", AD1986A_SAMSUNG_P50),



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

* [patch 043/123] ALSA: via82xx: add quirk for D1289 motherboard
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (41 preceding siblings ...)
  2010-03-13  0:12 ` [patch 042/123] ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 044/123] ALSA: pcm core - fix fifo_size channels interval check Greg KH
                   ` (80 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch, Jaroslav Kysela

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

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

From: Clemens Ladisch <clemens@ladisch.de>

commit bf30a4309d4294d3eca248ea8a20c1c3570f5e74 upstream.

Add a headphones-only quirk for the Fujitsu Siemens D1289.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Marc Haber <mh+alsa201002@zugschlus.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/via82xx.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -1791,6 +1791,12 @@ static struct ac97_quirk ac97_quirks[] =
 		.type = AC97_TUNE_HP_ONLY
 	},
 	{
+		.subvendor = 0x110a,
+		.subdevice = 0x0079,
+		.name = "Fujitsu Siemens D1289",
+		.type = AC97_TUNE_HP_ONLY
+	},
+	{
 		.subvendor = 0x1019,
 		.subdevice = 0x0a81,
 		.name = "ECS K7VTA3",



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

* [patch 044/123] ALSA: pcm core - fix fifo_size channels interval check
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (42 preceding siblings ...)
  2010-03-13  0:12 ` [patch 043/123] ALSA: via82xx: add quirk for D1289 motherboard Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 045/123] ALSA: usb-audio: reduce MIDI packet size to work around broken firmware Greg KH
                   ` (79 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jaroslav Kysela

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

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

From: Jaroslav Kysela <perex@perex.cz>

commit 3be522a9514f58e0596db34898a514df206cadc5 upstream.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/core/pcm_native.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -315,10 +315,10 @@ int snd_pcm_hw_refine(struct snd_pcm_sub
 	if (!params->info)
 		params->info = hw->info & ~SNDRV_PCM_INFO_FIFO_IN_FRAMES;
 	if (!params->fifo_size) {
-		if (snd_mask_min(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT]) ==
-		    snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT]) &&
-                    snd_mask_min(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS]) ==
-                    snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) {
+		m = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
+		i = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS);
+		if (snd_mask_min(m) == snd_mask_max(m) &&
+                    snd_interval_min(i) == snd_interval_max(i)) {
 			changed = substream->ops->ioctl(substream,
 					SNDRV_PCM_IOCTL1_FIFO_SIZE, params);
 			if (changed < 0)



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

* [patch 045/123] ALSA: usb-audio: reduce MIDI packet size to work around broken firmware
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (43 preceding siblings ...)
  2010-03-13  0:12 ` [patch 044/123] ALSA: pcm core - fix fifo_size channels interval check Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 046/123] ALSA: USB MIDI support for Access Music VirusTI Greg KH
                   ` (78 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch, Jaroslav Kysela

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

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

From: Clemens Ladisch <clemens@ladisch.de>

commit f167e1d073278fe231bbdd5d6c24fb9d091aa544 upstream.

Extend the list of devices whose firmware does not expect more than one
USB MIDI packet in one USB packet.

bug report: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3752

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/usb/usbmidi.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1162,10 +1162,22 @@ static int snd_usbmidi_out_endpoint_crea
 		pipe = usb_sndintpipe(umidi->dev, ep_info->out_ep);
 	else
 		pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep);
-	if (umidi->usb_id == USB_ID(0x0a92, 0x1020)) /* ESI M4U */
-		ep->max_transfer = 4;
-	else
+	switch (umidi->usb_id) {
+	default:
 		ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1);
+		break;
+		/*
+		 * Various chips declare a packet size larger than 4 bytes, but
+		 * do not actually work with larger packets:
+		 */
+	case USB_ID(0x0a92, 0x1020): /* ESI M4U */
+	case USB_ID(0x1430, 0x474b): /* RedOctane GH MIDI INTERFACE */
+	case USB_ID(0x15ca, 0x0101): /* Textech USB Midi Cable */
+	case USB_ID(0x15ca, 0x1806): /* Textech USB Midi Cable */
+	case USB_ID(0x1a86, 0x752d): /* QinHeng CH345 "USB2.0-MIDI" */
+		ep->max_transfer = 4;
+		break;
+	}
 	for (i = 0; i < OUTPUT_URBS; ++i) {
 		buffer = usb_buffer_alloc(umidi->dev,
 					  ep->max_transfer, GFP_KERNEL,



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

* [patch 046/123] ALSA: USB MIDI support for Access Music VirusTI
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (44 preceding siblings ...)
  2010-03-13  0:12 ` [patch 045/123] ALSA: usb-audio: reduce MIDI packet size to work around broken firmware Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 047/123] thinkpad-acpi: fix ALSA callback return status Greg KH
                   ` (77 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Sebastien Alaiwan,
	Clemens Ladisch, Jaroslav Kysela

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

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

From: Sebastien Alaiwan <sebastien.alaiwan@gmail.com>

commit d39e82db73eb876c60d00f00219d767b3be30307 upstream.

Here's a patch that adds MIDI support through USB for one of the Access
Music synths, the VirusTI.

The synth uses standard USBMIDI protocol on its USB interface 3, although
it does signal "vendor specific" class. A magic string has to be sent on
interface 3 to enable the sending of MIDI from the synth (this string was
found by sniffing usb communication of the Windows driver). This is all
my patch does, and it works on my computer.

Please note that the synth can also do standard usb audio I/O on its
interfaces 2&3, which already works with the current snd-usb-audio driver,
except for the audio input from the synth. I'm going to work on it when I
have some time.

Signed-off-by: Sebastien Alaiwan <sebastien.alaiwan@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/usb/usbaudio.c  |   32 ++++++++++++++++++++++++++++++++
 sound/usb/usbmidi.c   |    6 ++++++
 sound/usb/usbquirks.h |   27 +++++++++++++++++++++++++++
 3 files changed, 65 insertions(+)

--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3327,6 +3327,32 @@ static int snd_usb_cm6206_boot_quirk(str
 }
 
 /*
+ * This call will put the synth in "USB send" mode, i.e it will send MIDI
+ * messages through USB (this is disabled at startup). The synth will
+ * acknowledge by sending a sysex on endpoint 0x85 and by displaying a USB
+ * sign on its LCD. Values here are chosen based on sniffing USB traffic
+ * under Windows.
+ */
+static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
+{
+	int err, actual_length;
+
+	/* "midi send" enable */
+	static const u8 seq[] = { 0x4e, 0x73, 0x52, 0x01 };
+
+	void *buf = kmemdup(seq, ARRAY_SIZE(seq), GFP_KERNEL);
+	if (!buf)
+		return -ENOMEM;
+	err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
+			ARRAY_SIZE(seq), &actual_length, 1000);
+	kfree(buf);
+	if (err < 0)
+		return err;
+
+	return 0;
+}
+
+/*
  * Setup quirks
  */
 #define AUDIOPHILE_SET			0x01 /* if set, parse device_setup */
@@ -3624,6 +3650,12 @@ static void *snd_usb_audio_probe(struct
 			goto __err_val;
 	}
 
+	/* Access Music VirusTI Desktop */
+	if (id == USB_ID(0x133e, 0x0815)) {
+		if (snd_usb_accessmusic_boot_quirk(dev) < 0)
+			goto __err_val;
+	}
+
 	/*
 	 * found a config.  now register to ALSA
 	 */
--- a/sound/usb/usbmidi.c
+++ b/sound/usb/usbmidi.c
@@ -1419,6 +1419,12 @@ static struct port_info {
 	EXTERNAL_PORT(0x086a, 0x0001, 8, "%s Broadcast"),
 	EXTERNAL_PORT(0x086a, 0x0002, 8, "%s Broadcast"),
 	EXTERNAL_PORT(0x086a, 0x0003, 4, "%s Broadcast"),
+	/* Access Music Virus TI */
+	EXTERNAL_PORT(0x133e, 0x0815, 0, "%s MIDI"),
+	PORT_INFO(0x133e, 0x0815, 1, "%s Synth", 0,
+		SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
+		SNDRV_SEQ_PORT_TYPE_HARDWARE |
+		SNDRV_SEQ_PORT_TYPE_SYNTHESIZER),
 };
 
 static struct port_info *find_port_info(struct snd_usb_midi* umidi, int number)
--- a/sound/usb/usbquirks.h
+++ b/sound/usb/usbquirks.h
@@ -2073,6 +2073,33 @@ YAMAHA_DEVICE(0x7010, "UB99"),
 	}
 },
 
+/* Access Music devices */
+{
+	/* VirusTI Desktop */
+	USB_DEVICE_VENDOR_SPEC(0x133e, 0x0815),
+	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
+		.ifnum = QUIRK_ANY_INTERFACE,
+		.type = QUIRK_COMPOSITE,
+		.data = &(const struct snd_usb_audio_quirk[]) {
+			{
+				.ifnum = 3,
+				.type = QUIRK_MIDI_FIXED_ENDPOINT,
+				.data = &(const struct snd_usb_midi_endpoint_info) {
+					.out_cables = 0x0003,
+					.in_cables  = 0x0003
+				}
+			},
+			{
+				.ifnum = 4,
+				.type = QUIRK_IGNORE_INTERFACE
+			},
+			{
+				.ifnum = -1
+			}
+		}
+	}
+},
+
 /* */
 {
 	/* aka. Serato Scratch Live DJ Box */



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

* [patch 047/123] thinkpad-acpi: fix ALSA callback return status
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (45 preceding siblings ...)
  2010-03-13  0:12 ` [patch 046/123] ALSA: USB MIDI support for Access Music VirusTI Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 048/123] ALSA: hda: Use LPIB for Dell Latitude 131L Greg KH
                   ` (76 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit 88cc83772a3c7756b9f2b4ba835545ad90a08409 upstream.

Clemens Ladisch reports that thinkpad-acpi improperly implements the
ALSA API, and always returns 0 for success for the "put" callbacks
while the API requires it to return "1" when the control value has
been changed in the hardware/firmware.

Rework the volume subdriver to be able to properly implement the ALSA
API.  Based on a patch by Clemens Ladisch <clemens@ladisch.de>.

This fix is also needed on 2.6.33.

Reported-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |   39 ++++++++++++++++++++++++++---------
 1 file changed, 29 insertions(+), 10 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6522,7 +6522,8 @@ static int volume_set_status(const u8 st
 	return volume_set_status_ec(status);
 }
 
-static int volume_set_mute_ec(const bool mute)
+/* returns < 0 on error, 0 on no change, 1 on change */
+static int __volume_set_mute_ec(const bool mute)
 {
 	int rc;
 	u8 s, n;
@@ -6537,22 +6538,37 @@ static int volume_set_mute_ec(const bool
 	n = (mute) ? s | TP_EC_AUDIO_MUTESW_MSK :
 		     s & ~TP_EC_AUDIO_MUTESW_MSK;
 
-	if (n != s)
+	if (n != s) {
 		rc = volume_set_status_ec(n);
+		if (!rc)
+			rc = 1;
+	}
 
 unlock:
 	mutex_unlock(&volume_mutex);
 	return rc;
 }
 
+static int volume_alsa_set_mute(const bool mute)
+{
+	dbg_printk(TPACPI_DBG_MIXER, "ALSA: trying to %smute\n",
+		   (mute) ? "" : "un");
+	return __volume_set_mute_ec(mute);
+}
+
 static int volume_set_mute(const bool mute)
 {
+	int rc;
+
 	dbg_printk(TPACPI_DBG_MIXER, "trying to %smute\n",
 		   (mute) ? "" : "un");
-	return volume_set_mute_ec(mute);
+
+	rc = __volume_set_mute_ec(mute);
+	return (rc < 0) ? rc : 0;
 }
 
-static int volume_set_volume_ec(const u8 vol)
+/* returns < 0 on error, 0 on no change, 1 on change */
+static int __volume_set_volume_ec(const u8 vol)
 {
 	int rc;
 	u8 s, n;
@@ -6569,19 +6585,22 @@ static int volume_set_volume_ec(const u8
 
 	n = (s & ~TP_EC_AUDIO_LVL_MSK) | vol;
 
-	if (n != s)
+	if (n != s) {
 		rc = volume_set_status_ec(n);
+		if (!rc)
+			rc = 1;
+	}
 
 unlock:
 	mutex_unlock(&volume_mutex);
 	return rc;
 }
 
-static int volume_set_volume(const u8 vol)
+static int volume_alsa_set_volume(const u8 vol)
 {
 	dbg_printk(TPACPI_DBG_MIXER,
-		   "trying to set volume level to %hu\n", vol);
-	return volume_set_volume_ec(vol);
+		   "ALSA: trying to set volume level to %hu\n", vol);
+	return __volume_set_volume_ec(vol);
 }
 
 static void volume_alsa_notify_change(void)
@@ -6628,7 +6647,7 @@ static int volume_alsa_vol_get(struct sn
 static int volume_alsa_vol_put(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
-	return volume_set_volume(ucontrol->value.integer.value[0]);
+	return volume_alsa_set_volume(ucontrol->value.integer.value[0]);
 }
 
 #define volume_alsa_mute_info snd_ctl_boolean_mono_info
@@ -6651,7 +6670,7 @@ static int volume_alsa_mute_get(struct s
 static int volume_alsa_mute_put(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_value *ucontrol)
 {
-	return volume_set_mute(!ucontrol->value.integer.value[0]);
+	return volume_alsa_set_mute(!ucontrol->value.integer.value[0]);
 }
 
 static struct snd_kcontrol_new volume_alsa_control_vol __devinitdata = {



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

* [patch 048/123] ALSA: hda: Use LPIB for Dell Latitude 131L
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (46 preceding siblings ...)
  2010-03-13  0:12 ` [patch 047/123] thinkpad-acpi: fix ALSA callback return status Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 049/123] ALSA: hda: Use LPIB for a Biostar Microtech board Greg KH
                   ` (75 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai

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

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

From: Daniel T Chen <crimsun@ubuntu.com>

commit 9919c7619c52d01e89103bca405cc3d4a2b1ac31 upstream.

BugLink: https://launchpad.net/bugs/530346

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: Tom Louwrier
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/hda/hda_intel.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2261,6 +2261,7 @@ static int azx_dev_free(struct snd_devic
 static struct snd_pci_quirk position_fix_list[] __devinitdata = {
 	SND_PCI_QUIRK(0x1028, 0x01cc, "Dell D820", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
+	SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),



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

* [patch 049/123] ALSA: hda: Use LPIB for a Biostar Microtech board
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (47 preceding siblings ...)
  2010-03-13  0:12 ` [patch 048/123] ALSA: hda: Use LPIB for Dell Latitude 131L Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 050/123] ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE Greg KH
                   ` (74 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai

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

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

From: Daniel T Chen <crimsun@ubuntu.com>

commit 0321b69569eadbc13242922925a4316754c5f744 upstream.

BugLink: https://launchpad.net/bugs/523953

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: MMarking
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/hda/hda_intel.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2265,6 +2265,7 @@ static struct snd_pci_quirk position_fix
 	SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
+	SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
 	{}
 };
 



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

* [patch 050/123] ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (48 preceding siblings ...)
  2010-03-13  0:12 ` [patch 049/123] ALSA: hda: Use LPIB for a Biostar Microtech board Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 051/123] ASoC: fix ak4104 register array access Greg KH
                   ` (73 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Paul Menzel, Takashi Iwai

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

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

From: Paul Menzel <paulepanter@users.sourceforge.net>

commit 0708cc582f0fe2578eaab722841caf2b4f8cfe37 upstream.

With PulseAudio and an application accessing an input device like `gnome-volume-manager` both have high CPU load as reported in [1].

Loading `snd-hda-intel` with `position_fix=1` fixes this issue. Therefore add a quirk for ASUS M2V-MX SE.

The only downside is, when now exiting for example MPlayer when it is playing an audio file a high pitched sound is outputted by the speaker.

$ lspci -vvnn | grep -A10 Audio
20:01.0 Audio device [0403]: VIA Technologies, Inc. VT1708/A [Azalia HDAC] (VIA High Definition Audio Controller) [1106:3288] (rev 10)
	Subsystem: ASUSTeK Computer Inc. Device [1043:8290]
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 17
	Region 0: Memory at fbffc000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: HDA Intel

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=1265550675.4642.24.camel%40mattotaupa&forum_name=alsa-user

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/hda/hda_intel.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2263,6 +2263,7 @@ static struct snd_pci_quirk position_fix
 	SND_PCI_QUIRK(0x1028, 0x01de, "Dell Precision 390", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
+	SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
 	SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),



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

* [patch 051/123] ASoC: fix ak4104 register array access
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (49 preceding siblings ...)
  2010-03-13  0:12 ` [patch 050/123] ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 052/123] driver-core: fix race condition in get_device_parent() Greg KH
                   ` (72 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel Mack, Liam Girdwood,
	Mark Brown

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

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

From: Daniel Mack <daniel@caiaq.de>

commit e555317c083fda01f516d2153589e82514e20e70 upstream.

Don't touch the variable 'reg' to construct the value for the actual SPI
transport. This variable is again used to access the driver's register
cache, and so random memory is overwritten.
Compute the value in-place instead.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/soc/codecs/ak4104.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -90,12 +90,10 @@ static int ak4104_spi_write(struct snd_s
 	if (reg >= codec->reg_cache_size)
 		return -EINVAL;
 
-	reg &= AK4104_REG_MASK;
-	reg |= AK4104_WRITE;
-
 	/* only write to the hardware if value has changed */
 	if (cache[reg] != value) {
-		u8 tmp[2] = { reg, value };
+		u8 tmp[2] = { (reg & AK4104_REG_MASK) | AK4104_WRITE, value };
+
 		if (spi_write(spi, tmp, sizeof(tmp))) {
 			dev_err(&spi->dev, "SPI write failed\n");
 			return -EIO;



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

* [patch 052/123] driver-core: fix race condition in get_device_parent()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (50 preceding siblings ...)
  2010-03-13  0:12 ` [patch 051/123] ASoC: fix ak4104 register array access Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 053/123] Driver-Core: devtmpfs - reset inode permissions before unlinking Greg KH
                   ` (71 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Tejun Heo

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

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

From: Tejun Heo <tj@kernel.org>

commit 77d3d7c1d561f49f755d7390f0764dff90765974 upstream.

sysfs is creating several devices in cuse class concurrently and with
CONFIG_SYSFS_DEPRECATED turned off, it triggers the following oops.

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
 IP: [<ffffffff81158b0a>] sysfs_addrm_start+0x4a/0xf0
 PGD 75bb067 PUD 75be067 PMD 0
 Oops: 0000 [#1] PREEMPT SMP
 last sysfs file: /sys/devices/system/cpu/cpu7/topology/core_siblings
 CPU 1
 Modules linked in: cuse fuse
 Pid: 4737, comm: osspd Not tainted 2.6.31-work #77
 RIP: 0010:[<ffffffff81158b0a>]  [<ffffffff81158b0a>] sysfs_addrm_start+0x4a/0xf0
 RSP: 0018:ffff88000042f8f8  EFLAGS: 00010296
 RAX: ffff88000042ffd8 RBX: 0000000000000000 RCX: 0000000000000000
 RDX: 0000000000000000 RSI: ffff880007eef660 RDI: 0000000000000001
 RBP: ffff88000042f918 R08: 0000000000000000 R09: 0000000000000000
 R10: 0000000000000001 R11: ffffffff81158b0a R12: ffff88000042f928
 R13: 00000000fffffff4 R14: 0000000000000000 R15: ffff88000042f9a0
 FS:  00007fe93905a950(0000) GS:ffff880008600000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000038 CR3: 00000000077c9000 CR4: 00000000000006e0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process osspd (pid: 4737, threadinfo ffff88000042e000, task ffff880007eef040)
 Stack:
  ffff880005da10e8 0000000011cc8d6e ffff88000042f928 ffff880003d28a28
 <0> ffff88000042f988 ffffffff811592d7 0000000000000000 0000000000000000
 <0> 0000000000000000 0000000000000000 ffff88000042f958 0000000011cc8d6e
 Call Trace:
  [<ffffffff811592d7>] create_dir+0x67/0xe0
  [<ffffffff811593a8>] sysfs_create_dir+0x58/0xb0
  [<ffffffff8128ca7c>] ? kobject_add_internal+0xcc/0x220
  [<ffffffff812942e1>] ? vsnprintf+0x3c1/0xb90
  [<ffffffff8128cab7>] kobject_add_internal+0x107/0x220
  [<ffffffff8128cd37>] kobject_add_varg+0x47/0x80
  [<ffffffff8128ce53>] kobject_add+0x53/0x90
  [<ffffffff81357d84>] device_add+0xd4/0x690
  [<ffffffff81356c2b>] ? dev_set_name+0x4b/0x70
  [<ffffffffa001a884>] cuse_process_init_reply+0x2b4/0x420 [cuse]
  ...

The problem is that kobject_add_internal() first adds a kobject to the
kset and then try to create sysfs directory for it.  If the creation
fails, it remove the kobject from the kset.  get_device_parent()
accesses class_dirs kset while only holding class_dirs.list_lock to
see whether the cuse class dir exists.  But when it exists, it may not
have finished initialization yet or may fail and get removed soon.  In
the above case, the former happened so the second one ends up trying
to create subdirectory under NULL sysfs_dirent.

Fix it by grabbing a mutex in get_device_parent().

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Colin Guthrie <cguthrie@mandriva.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/base/core.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -607,6 +607,7 @@ static struct kobject *get_device_parent
 	int retval;
 
 	if (dev->class) {
+		static DEFINE_MUTEX(gdp_mutex);
 		struct kobject *kobj = NULL;
 		struct kobject *parent_kobj;
 		struct kobject *k;
@@ -623,6 +624,8 @@ static struct kobject *get_device_parent
 		else
 			parent_kobj = &parent->kobj;
 
+		mutex_lock(&gdp_mutex);
+
 		/* find our class-directory at the parent and reference it */
 		spin_lock(&dev->class->p->class_dirs.list_lock);
 		list_for_each_entry(k, &dev->class->p->class_dirs.list, entry)
@@ -631,20 +634,26 @@ static struct kobject *get_device_parent
 				break;
 			}
 		spin_unlock(&dev->class->p->class_dirs.list_lock);
-		if (kobj)
+		if (kobj) {
+			mutex_unlock(&gdp_mutex);
 			return kobj;
+		}
 
 		/* or create a new class-directory at the parent device */
 		k = kobject_create();
-		if (!k)
+		if (!k) {
+			mutex_unlock(&gdp_mutex);
 			return NULL;
+		}
 		k->kset = &dev->class->p->class_dirs;
 		retval = kobject_add(k, parent_kobj, "%s", dev->class->name);
 		if (retval < 0) {
+			mutex_unlock(&gdp_mutex);
 			kobject_put(k);
 			return NULL;
 		}
 		/* do not emit an uevent for this simple "glue" directory */
+		mutex_unlock(&gdp_mutex);
 		return k;
 	}
 



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

* [patch 053/123] Driver-Core: devtmpfs - reset inode permissions before unlinking
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (51 preceding siblings ...)
  2010-03-13  0:12 ` [patch 052/123] driver-core: fix race condition in get_device_parent() Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 054/123] sysfs: Cache the last sysfs_dirent to improve readdir scalability v2 Greg KH
                   ` (70 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Kay Sievers

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

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

From: Kay Sievers <kay.sievers@vrfy.org>

commit 5e31d76f2817bd50258a092a7c5b15b3006fd61c upstream.

Before unlinking the inode, reset the current permissions of possible
references like hardlinks, so granted permissions can not be retained
across the device lifetime by creating hardlinks, in the unusual case
that there is a user-writable directory on the same filesystem.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/base/devtmpfs.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -301,6 +301,19 @@ int devtmpfs_delete_node(struct device *
 		if (dentry->d_inode) {
 			err = vfs_getattr(nd.path.mnt, dentry, &stat);
 			if (!err && dev_mynode(dev, dentry->d_inode, &stat)) {
+				struct iattr newattrs;
+				/*
+				 * before unlinking this node, reset permissions
+				 * of possible references like hardlinks
+				 */
+				newattrs.ia_uid = 0;
+				newattrs.ia_gid = 0;
+				newattrs.ia_mode = stat.mode & ~0777;
+				newattrs.ia_valid =
+					ATTR_UID|ATTR_GID|ATTR_MODE;
+				mutex_lock(&dentry->d_inode->i_mutex);
+				notify_change(dentry, &newattrs);
+				mutex_unlock(&dentry->d_inode->i_mutex);
 				err = vfs_unlink(nd.path.dentry->d_inode,
 						 dentry);
 				if (!err || err == -ENOENT)



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

* [patch 054/123] sysfs: Cache the last sysfs_dirent to improve readdir scalability v2
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (52 preceding siblings ...)
  2010-03-13  0:12 ` [patch 053/123] Driver-Core: devtmpfs - reset inode permissions before unlinking Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 055/123] tty: Fix the ldisc hangup race Greg KH
                   ` (69 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Eric W. Biederman

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

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

From: Eric W. Biederman <ebiederm@xmission.com>

commit 1e5289c97bba2d8ee7239a416bc3f28743362cd9 upstream.

When sysfs_readdir stops short we now cache the next
sysfs_dirent to return to user space in filp->private_data.
There is no impact on the rest of sysfs by doing this and
in the common case it allows us to pick up exactly where
we left off with no seeking.

Additionally I drop and regrab the sysfs_mutex around
filldir to avoid a page fault abritrarily increasing the
hold time on the sysfs_mutex.

v2: Returned to using INT_MAX as the EOF condition.
    seekdir is ambiguous unless all directory entries have
    a unique f_pos value.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=14949

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/sysfs/dir.c |   82 +++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 60 insertions(+), 22 deletions(-)

--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -837,11 +837,46 @@ static inline unsigned char dt_type(stru
 	return (sd->s_mode >> 12) & 15;
 }
 
+static int sysfs_dir_release(struct inode *inode, struct file *filp)
+{
+	sysfs_put(filp->private_data);
+	return 0;
+}
+
+static struct sysfs_dirent *sysfs_dir_pos(struct sysfs_dirent *parent_sd,
+	ino_t ino, struct sysfs_dirent *pos)
+{
+	if (pos) {
+		int valid = !(pos->s_flags & SYSFS_FLAG_REMOVED) &&
+			pos->s_parent == parent_sd &&
+			ino == pos->s_ino;
+		sysfs_put(pos);
+		if (valid)
+			return pos;
+	}
+	pos = NULL;
+	if ((ino > 1) && (ino < INT_MAX)) {
+		pos = parent_sd->s_dir.children;
+		while (pos && (ino > pos->s_ino))
+			pos = pos->s_sibling;
+	}
+	return pos;
+}
+
+static struct sysfs_dirent *sysfs_dir_next_pos(struct sysfs_dirent *parent_sd,
+	ino_t ino, struct sysfs_dirent *pos)
+{
+	pos = sysfs_dir_pos(parent_sd, ino, pos);
+	if (pos)
+		pos = pos->s_sibling;
+	return pos;
+}
+
 static int sysfs_readdir(struct file * filp, void * dirent, filldir_t filldir)
 {
 	struct dentry *dentry = filp->f_path.dentry;
 	struct sysfs_dirent * parent_sd = dentry->d_fsdata;
-	struct sysfs_dirent *pos;
+	struct sysfs_dirent *pos = filp->private_data;
 	ino_t ino;
 
 	if (filp->f_pos == 0) {
@@ -857,29 +892,31 @@ static int sysfs_readdir(struct file * f
 		if (filldir(dirent, "..", 2, filp->f_pos, ino, DT_DIR) == 0)
 			filp->f_pos++;
 	}
-	if ((filp->f_pos > 1) && (filp->f_pos < INT_MAX)) {
-		mutex_lock(&sysfs_mutex);
+	mutex_lock(&sysfs_mutex);
+	for (pos = sysfs_dir_pos(parent_sd, filp->f_pos, pos);
+	     pos;
+	     pos = sysfs_dir_next_pos(parent_sd, filp->f_pos, pos)) {
+		const char * name;
+		unsigned int type;
+		int len, ret;
+
+		name = pos->s_name;
+		len = strlen(name);
+		ino = pos->s_ino;
+		type = dt_type(pos);
+		filp->f_pos = ino;
+		filp->private_data = sysfs_get(pos);
 
-		/* Skip the dentries we have already reported */
-		pos = parent_sd->s_dir.children;
-		while (pos && (filp->f_pos > pos->s_ino))
-			pos = pos->s_sibling;
-
-		for ( ; pos; pos = pos->s_sibling) {
-			const char * name;
-			int len;
-
-			name = pos->s_name;
-			len = strlen(name);
-			filp->f_pos = ino = pos->s_ino;
-
-			if (filldir(dirent, name, len, filp->f_pos, ino,
-					 dt_type(pos)) < 0)
-				break;
-		}
-		if (!pos)
-			filp->f_pos = INT_MAX;
 		mutex_unlock(&sysfs_mutex);
+		ret = filldir(dirent, name, len, filp->f_pos, ino, type);
+		mutex_lock(&sysfs_mutex);
+		if (ret < 0)
+			break;
+	}
+	mutex_unlock(&sysfs_mutex);
+	if ((filp->f_pos > 1) && !pos) { /* EOF */
+		filp->f_pos = INT_MAX;
+		filp->private_data = NULL;
 	}
 	return 0;
 }
@@ -888,5 +925,6 @@ static int sysfs_readdir(struct file * f
 const struct file_operations sysfs_dir_operations = {
 	.read		= generic_read_dir,
 	.readdir	= sysfs_readdir,
+	.release	= sysfs_dir_release,
 	.llseek		= generic_file_llseek,
 };



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

* [patch 055/123] tty: Fix the ldisc hangup race
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (53 preceding siblings ...)
  2010-03-13  0:12 ` [patch 054/123] sysfs: Cache the last sysfs_dirent to improve readdir scalability v2 Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 056/123] serial: imx: fix NULL dereference Oops when pdata == NULL Greg KH
                   ` (68 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Cox

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

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

From: Alan Cox <alan@linux.intel.com>

commit 638b9648ab51c9c549ff5735d3de519ef6199df3 upstream.

This was noticed by Matthias Urlichs and he proposed a fix. This patch
does the fixing a different way to avoid introducing several new race
conditions into the code.

The problem case is TTY_DRIVER_RESET_TERMIOS = 0. In that case while we
abort the ldisc change, the hangup processing has not cleaned up and restarted
the ldisc either.

We can't restart the ldisc stuff in the set_ldisc as we don't know what
the hangup did and may touch stuff we shouldn't as we are no longer
supposed to influence the tty at that point in case it has been re-opened
before we get rescheduled.

Instead do it the simple way. Always re-init the ldisc on the hangup, but
use TTY_DRIVER_RESET_TERMIOS to indicate that we should force N_TTY.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/char/tty_ldisc.c |   50 ++++++++++++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 20 deletions(-)

--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -706,12 +706,13 @@ static void tty_reset_termios(struct tty
 /**
  *	tty_ldisc_reinit	-	reinitialise the tty ldisc
  *	@tty: tty to reinit
+ *	@ldisc: line discipline to reinitialize
  *
- *	Switch the tty back to N_TTY line discipline and leave the
- *	ldisc state closed
+ *	Switch the tty to a line discipline and leave the ldisc
+ *	state closed
  */
 
-static void tty_ldisc_reinit(struct tty_struct *tty)
+static void tty_ldisc_reinit(struct tty_struct *tty, int ldisc)
 {
 	struct tty_ldisc *ld;
 
@@ -721,10 +722,10 @@ static void tty_ldisc_reinit(struct tty_
 	/*
 	 *	Switch the line discipline back
 	 */
-	ld = tty_ldisc_get(N_TTY);
+	ld = tty_ldisc_get(ldisc);
 	BUG_ON(IS_ERR(ld));
 	tty_ldisc_assign(tty, ld);
-	tty_set_termios_ldisc(tty, N_TTY);
+	tty_set_termios_ldisc(tty, ldisc);
 }
 
 /**
@@ -745,6 +746,8 @@ static void tty_ldisc_reinit(struct tty_
 void tty_ldisc_hangup(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld;
+	int reset = tty->driver->flags & TTY_DRIVER_RESET_TERMIOS;
+	int err = 0;
 
 	/*
 	 * FIXME! What are the locking issues here? This may me overdoing
@@ -772,25 +775,32 @@ void tty_ldisc_hangup(struct tty_struct
 	wake_up_interruptible_poll(&tty->read_wait, POLLIN);
 	/*
 	 * Shutdown the current line discipline, and reset it to
-	 * N_TTY.
+	 * N_TTY if need be.
+	 *
+	 * Avoid racing set_ldisc or tty_ldisc_release
 	 */
-	if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
-		/* Avoid racing set_ldisc or tty_ldisc_release */
-		mutex_lock(&tty->ldisc_mutex);
-		tty_ldisc_halt(tty);
-		if (tty->ldisc) {	/* Not yet closed */
-			/* Switch back to N_TTY */
-			tty_ldisc_reinit(tty);
-			/* At this point we have a closed ldisc and we want to
-			   reopen it. We could defer this to the next open but
-			   it means auditing a lot of other paths so this is
-			   a FIXME */
+	mutex_lock(&tty->ldisc_mutex);
+	tty_ldisc_halt(tty);
+	/* At this point we have a closed ldisc and we want to
+	   reopen it. We could defer this to the next open but
+	   it means auditing a lot of other paths so this is
+	   a FIXME */
+	if (tty->ldisc) {	/* Not yet closed */
+		if (reset == 0) {
+			tty_ldisc_reinit(tty, tty->termios->c_line);
+			err = tty_ldisc_open(tty, tty->ldisc);
+		}
+		/* If the re-open fails or we reset then go to N_TTY. The
+		   N_TTY open cannot fail */
+		if (reset || err) {
+			tty_ldisc_reinit(tty, N_TTY);
 			WARN_ON(tty_ldisc_open(tty, tty->ldisc));
-			tty_ldisc_enable(tty);
 		}
-		mutex_unlock(&tty->ldisc_mutex);
-		tty_reset_termios(tty);
+		tty_ldisc_enable(tty);
 	}
+	mutex_unlock(&tty->ldisc_mutex);
+	if (reset)
+		tty_reset_termios(tty);
 }
 
 /**



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

* [patch 056/123] serial: imx: fix NULL dereference Oops when pdata == NULL
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (54 preceding siblings ...)
  2010-03-13  0:12 ` [patch 055/123] tty: Fix the ldisc hangup race Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 057/123] USB: serial: sierra driver indat_callback fix Greg KH
                   ` (67 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Baruch Siach, Alan Cox,
	Sascha Hauer, Oskar Schirmer, Fabian Godehardt,
	Daniel Glöckner

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]

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

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

From: Baruch Siach <baruch@tkos.co.il>

commit bbcd18d1b37413d25eaf4580682b1b8e4a09ff5e upstream.

The platform code doesn't have to provide platform data to get sensible
default behaviour from the imx serial driver.

This patch does not handle NULL dereference in the IrDA case, which still
requires a valid platform data pointer (in imx_startup()/imx_shutdown()),
since I don't know whether there is a sensible default behaviour, or
should the operation just fail cleanly.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Cc: Baruch Siach <baruch@tkos.co.il>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Oskar Schirmer <os@emlix.com>
Cc: Fabian Godehardt <fg@emlix.com>
Cc: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/serial/imx.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1279,7 +1279,7 @@ static int serial_imx_probe(struct platf
 		sport->use_irda = 1;
 #endif
 
-	if (pdata->init) {
+	if (pdata && pdata->init) {
 		ret = pdata->init(pdev);
 		if (ret)
 			goto clkput;
@@ -1292,7 +1292,7 @@ static int serial_imx_probe(struct platf
 
 	return 0;
 deinit:
-	if (pdata->exit)
+	if (pdata && pdata->exit)
 		pdata->exit(pdev);
 clkput:
 	clk_put(sport->clk);
@@ -1321,7 +1321,7 @@ static int serial_imx_remove(struct plat
 
 	clk_disable(sport->clk);
 
-	if (pdata->exit)
+	if (pdata && pdata->exit)
 		pdata->exit(pdev);
 
 	iounmap(sport->port.membase);



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

* [patch 057/123] USB: serial: sierra driver indat_callback fix
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (55 preceding siblings ...)
  2010-03-13  0:12 ` [patch 056/123] serial: imx: fix NULL dereference Oops when pdata == NULL Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 058/123] USB: fix I2C API usage in ohci-pnx4008 Greg KH
                   ` (66 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Elina Pasheva

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

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

From: Elina Pasheva <epasheva@sierrawireless.com>

commit b87c6e86dac1bb5222279cc8ff7e09529e1c4ed9 upstream.

A crash has been reported with sierra driver on disconnect with
Ubuntu/Lucid distribution based on kernel-2.6.32.
The cause of the crash was determined as "NULL tty pointer was being
referenced" and the NULL pointer was passed by sierra_indat_callback().

This patch modifies sierra_indat_callback() function to check for NULL
tty structure pointer. This modification prevents a crash from happening
when the device is disconnected.

This patch fixes the bug reported in Launchpad:
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/511157

Signed-off-by: Elina Pasheva <epasheva@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/sierra.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -604,14 +604,17 @@ static void sierra_indat_callback(struct
 	} else {
 		if (urb->actual_length) {
 			tty = tty_port_tty_get(&port->port);
+			if (tty) {
+				tty_buffer_request_room(tty,
+					urb->actual_length);
+				tty_insert_flip_string(tty, data,
+					urb->actual_length);
+				tty_flip_buffer_push(tty);
 
-			tty_buffer_request_room(tty, urb->actual_length);
-			tty_insert_flip_string(tty, data, urb->actual_length);
-			tty_flip_buffer_push(tty);
-
-			tty_kref_put(tty);
-			usb_serial_debug_data(debug, &port->dev, __func__,
-				urb->actual_length, data);
+				tty_kref_put(tty);
+				usb_serial_debug_data(debug, &port->dev,
+					__func__, urb->actual_length, data);
+			}
 		} else {
 			dev_dbg(&port->dev, "%s: empty read urb"
 				" received\n", __func__);



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

* [patch 058/123] USB: fix I2C API usage in ohci-pnx4008.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (56 preceding siblings ...)
  2010-03-13  0:12 ` [patch 057/123] USB: serial: sierra driver indat_callback fix Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 059/123] p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec Greg KH
                   ` (65 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Luotao Fu, Jean Delvare

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

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

From: Luotao Fu <l.fu@pengutronix.de>

commit 8740cc7d0c532e098cc428251c08befd14f087d8 upstream.

i2c_board_info doesn't contain a member called name. i2c_register_client
call does not exist.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/ohci-pnx4008.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/usb/host/ohci-pnx4008.c
+++ b/drivers/usb/host/ohci-pnx4008.c
@@ -327,7 +327,7 @@ static int __devinit usb_hcd_pnx4008_pro
 	}
 	i2c_adap = i2c_get_adapter(2);
 	memset(&i2c_info, 0, sizeof(struct i2c_board_info));
-	strlcpy(i2c_info.name, "isp1301_pnx", I2C_NAME_SIZE);
+	strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE);
 	isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
 						   normal_i2c);
 	i2c_put_adapter(i2c_adap);
@@ -411,7 +411,7 @@ out3:
 out2:
 	clk_put(usb_clk);
 out1:
-	i2c_unregister_client(isp1301_i2c_client);
+	i2c_unregister_device(isp1301_i2c_client);
 	isp1301_i2c_client = NULL;
 out_i2c_driver:
 	i2c_del_driver(&isp1301_driver);
@@ -430,7 +430,7 @@ static int usb_hcd_pnx4008_remove(struct
 	pnx4008_unset_usb_bits();
 	clk_disable(usb_clk);
 	clk_put(usb_clk);
-	i2c_unregister_client(isp1301_i2c_client);
+	i2c_unregister_device(isp1301_i2c_client);
 	isp1301_i2c_client = NULL;
 	i2c_del_driver(&isp1301_driver);
 



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

* [patch 059/123] p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (57 preceding siblings ...)
  2010-03-13  0:12 ` [patch 058/123] USB: fix I2C API usage in ohci-pnx4008 Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 060/123] p54pci: handle dma mapping errors Greg KH
                   ` (64 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jean-François Moine,
	Larry Finger, John W. Linville

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]

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

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

From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= <moinejf@free.fr>

commit 5b9a919a97ac8bdda8020c9b366491b5b91b196e upstream.

Yet another USB ID.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/p54usb.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/p54/p54usb.c
+++ b/drivers/net/wireless/p54/p54usb.c
@@ -60,6 +60,7 @@ static struct usb_device_id p54u_table[]
 	{USB_DEVICE(0x06b9, 0x0121)},	/* Thomson SpeedTouch 121g */
 	{USB_DEVICE(0x0707, 0xee13)},   /* SMC 2862W-G version 2 */
 	{USB_DEVICE(0x083a, 0x4521)},   /* Siemens Gigaset USB Adapter 54 version 2 */
+	{USB_DEVICE(0x083a, 0xf503)},	/* Accton FD7050E ver 1010ec  */
 	{USB_DEVICE(0x0846, 0x4240)},	/* Netgear WG111 (v2) */
 	{USB_DEVICE(0x0915, 0x2000)},	/* Cohiba Proto board */
 	{USB_DEVICE(0x0915, 0x2002)},	/* Cohiba Proto board */



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

* [patch 060/123] p54pci: handle dma mapping errors
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (58 preceding siblings ...)
  2010-03-13  0:12 ` [patch 059/123] p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 061/123] gpiolib: Actually set output state in wm831x_gpio_direction_output() Greg KH
                   ` (63 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Christian Lamparter,
	John W. Linville

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

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

From: Christian Lamparter <chunkeey@googlemail.com>

commit 288c8ce8047695fd8872dd5db3ef21a9679c402f upstream.

This patch adds error-paths to handle pci_dma_mapping errors.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/p54/p54pci.c |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -157,6 +157,14 @@ static void p54p_refill_rx_ring(struct i
 						 skb_tail_pointer(skb),
 						 priv->common.rx_mtu + 32,
 						 PCI_DMA_FROMDEVICE);
+
+			if (pci_dma_mapping_error(priv->pdev, mapping)) {
+				dev_kfree_skb_any(skb);
+				dev_err(&priv->pdev->dev,
+					"RX DMA Mapping error\n");
+				break;
+			}
+
 			desc->host_addr = cpu_to_le32(mapping);
 			desc->device_addr = 0;	// FIXME: necessary?
 			desc->len = cpu_to_le16(priv->common.rx_mtu + 32);
@@ -325,14 +333,20 @@ static void p54p_tx(struct ieee80211_hw
 	u32 device_idx, idx, i;
 
 	spin_lock_irqsave(&priv->lock, flags);
-
 	device_idx = le32_to_cpu(ring_control->device_idx[1]);
 	idx = le32_to_cpu(ring_control->host_idx[1]);
 	i = idx % ARRAY_SIZE(ring_control->tx_data);
 
-	priv->tx_buf_data[i] = skb;
 	mapping = pci_map_single(priv->pdev, skb->data, skb->len,
 				 PCI_DMA_TODEVICE);
+	if (pci_dma_mapping_error(priv->pdev, mapping)) {
+		spin_unlock_irqrestore(&priv->lock, flags);
+		p54_free_skb(dev, skb);
+		dev_err(&priv->pdev->dev, "TX DMA mapping error\n");
+		return ;
+	}
+	priv->tx_buf_data[i] = skb;
+
 	desc = &ring_control->tx_data[i];
 	desc->host_addr = cpu_to_le32(mapping);
 	desc->device_addr = ((struct p54_hdr *)skb->data)->req_id;



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

* [patch 061/123] gpiolib: Actually set output state in wm831x_gpio_direction_output()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (59 preceding siblings ...)
  2010-03-13  0:12 ` [patch 060/123] p54pci: handle dma mapping errors Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 062/123] gpio: cs5535-gpio: fix input direction Greg KH
                   ` (62 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Mark Brown, Samuel Ortiz

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

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

From: Mark Brown <broonie@opensource.wolfsonmicro.com>

commit 3383d23d86791503559cb87837491af37469d9e5 upstream.

wm831x_gpio_direction_output() ignored the state passed into it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpio/wm831x-gpio.c |   22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

--- a/drivers/gpio/wm831x-gpio.c
+++ b/drivers/gpio/wm831x-gpio.c
@@ -60,23 +60,31 @@ static int wm831x_gpio_get(struct gpio_c
 		return 0;
 }
 
-static int wm831x_gpio_direction_out(struct gpio_chip *chip,
-				     unsigned offset, int value)
+static void wm831x_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
 {
 	struct wm831x_gpio *wm831x_gpio = to_wm831x_gpio(chip);
 	struct wm831x *wm831x = wm831x_gpio->wm831x;
 
-	return wm831x_set_bits(wm831x, WM831X_GPIO1_CONTROL + offset,
-			       WM831X_GPN_DIR | WM831X_GPN_TRI, 0);
+	wm831x_set_bits(wm831x, WM831X_GPIO_LEVEL, 1 << offset,
+			value << offset);
 }
 
-static void wm831x_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
+static int wm831x_gpio_direction_out(struct gpio_chip *chip,
+				     unsigned offset, int value)
 {
 	struct wm831x_gpio *wm831x_gpio = to_wm831x_gpio(chip);
 	struct wm831x *wm831x = wm831x_gpio->wm831x;
+	int ret;
 
-	wm831x_set_bits(wm831x, WM831X_GPIO_LEVEL, 1 << offset,
-			value << offset);
+	ret = wm831x_set_bits(wm831x, WM831X_GPIO1_CONTROL + offset,
+			      WM831X_GPN_DIR | WM831X_GPN_TRI, 0);
+	if (ret < 0)
+		return ret;
+
+	/* Can only set GPIO state once it's in output mode */
+	wm831x_gpio_set(chip, offset, value);
+
+	return 0;
 }
 
 static int wm831x_gpio_to_irq(struct gpio_chip *chip, unsigned offset)



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

* [patch 062/123] gpio: cs5535-gpio: fix input direction
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (60 preceding siblings ...)
  2010-03-13  0:12 ` [patch 061/123] gpiolib: Actually set output state in wm831x_gpio_direction_output() Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 063/123] hwmon: (tmp421) Fix temperature conversions Greg KH
                   ` (61 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ben Gardner, Andres Salomon,
	David Brownell, Mark Brown

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

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

From: Ben Gardner <gardner.ben@gmail.com>

commit a8a5164c297c16c2f4be776714ca47dba252cc3d upstream.

The cs5535-gpio driver's get() function was returning the output value.
This means that the GPIO pins would never work as an input, even if
configured as an input.

The driver should return the READ_BACK value, which is the sensed line
value.  To make that work when the direction is 'output', INPUT_ENABLE
needs to be set.

In addition, the driver was not disabling OUTPUT_ENABLE when the direction
is set to 'input'.  That would cause the GPIO to continue to drive the pin
if the direction was ever set to output.

This issue was noticed when attempting to use the gpiolib driver to read
an external input.  I had previously been using the char/cs5535-gpio
driver.

Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
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>

---
 drivers/gpio/cs5535-gpio.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/gpio/cs5535-gpio.c
+++ b/drivers/gpio/cs5535-gpio.c
@@ -154,7 +154,7 @@ static int chip_gpio_request(struct gpio
 
 static int chip_gpio_get(struct gpio_chip *chip, unsigned offset)
 {
-	return cs5535_gpio_isset(offset, GPIO_OUTPUT_VAL);
+	return cs5535_gpio_isset(offset, GPIO_READ_BACK);
 }
 
 static void chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
@@ -172,6 +172,7 @@ static int chip_direction_input(struct g
 
 	spin_lock_irqsave(&chip->lock, flags);
 	__cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
+	__cs5535_gpio_clear(chip, offset, GPIO_OUTPUT_ENABLE);
 	spin_unlock_irqrestore(&chip->lock, flags);
 
 	return 0;
@@ -184,6 +185,7 @@ static int chip_direction_output(struct
 
 	spin_lock_irqsave(&chip->lock, flags);
 
+	__cs5535_gpio_set(chip, offset, GPIO_INPUT_ENABLE);
 	__cs5535_gpio_set(chip, offset, GPIO_OUTPUT_ENABLE);
 	if (val)
 		__cs5535_gpio_set(chip, offset, GPIO_OUTPUT_VAL);



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

* [patch 063/123] hwmon: (tmp421) Fix temperature conversions
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (61 preceding siblings ...)
  2010-03-13  0:12 ` [patch 062/123] gpio: cs5535-gpio: fix input direction Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 064/123] hwmon: (tmp421) Restore missing inputs Greg KH
                   ` (60 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jean Delvare

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

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

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

commit a44908d742a577fb5ccb9a8c082326d4cea234c2 upstream.

The low bits of temperature registers are status bits, they must be
masked out before converting the register values to temperatures.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andre Prendel <andre.prendel@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/drivers/hwmon/tmp421.c
+++ b/drivers/hwmon/tmp421.c
@@ -80,14 +80,16 @@ struct tmp421_data {
 
 static int temp_from_s16(s16 reg)
 {
-	int temp = reg;
+	/* Mask out status bits */
+	int temp = reg & ~0xf;
 
 	return (temp * 1000 + 128) / 256;
 }
 
 static int temp_from_u16(u16 reg)
 {
-	int temp = reg;
+	/* Mask out status bits */
+	int temp = reg & ~0xf;
 
 	/* Add offset for extended temperature range. */
 	temp -= 64 * 256;



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

* [patch 064/123] hwmon: (tmp421) Restore missing inputs
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (62 preceding siblings ...)
  2010-03-13  0:12 ` [patch 063/123] hwmon: (tmp421) Fix temperature conversions Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 065/123] hwmon: Fix off-by-one kind values Greg KH
                   ` (59 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jean Delvare

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

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

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

commit 8d59582a867470a3e0c3eced4a01625ae8dc546b upstream.

An off-by-one error caused some inputs to not be created by the driver
when they should. TMP421 gets only one input instead of two, TMP422
gets two instead of three, etc. Fix the bug by listing explicitly the
number of inputs each device has.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andre Prendel <andre.prendel@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hwmon/tmp421.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/drivers/hwmon/tmp421.c
+++ b/drivers/hwmon/tmp421.c
@@ -61,9 +61,9 @@ static const u8 TMP421_TEMP_LSB[4]		= {
 #define TMP423_DEVICE_ID			0x23
 
 static const struct i2c_device_id tmp421_id[] = {
-	{ "tmp421", tmp421 },
-	{ "tmp422", tmp422 },
-	{ "tmp423", tmp423 },
+	{ "tmp421", 2 },
+	{ "tmp422", 3 },
+	{ "tmp423", 4 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, tmp421_id);
@@ -73,7 +73,7 @@ struct tmp421_data {
 	struct mutex update_lock;
 	char valid;
 	unsigned long last_updated;
-	int kind;
+	int channels;
 	u8 config;
 	s16 temp[4];
 };
@@ -109,7 +109,7 @@ static struct tmp421_data *tmp421_update
 		data->config = i2c_smbus_read_byte_data(client,
 			TMP421_CONFIG_REG_1);
 
-		for (i = 0; i <= data->kind; i++) {
+		for (i = 0; i < data->channels; i++) {
 			data->temp[i] = i2c_smbus_read_byte_data(client,
 				TMP421_TEMP_MSB[i]) << 8;
 			data->temp[i] |= i2c_smbus_read_byte_data(client,
@@ -168,7 +168,7 @@ static mode_t tmp421_is_visible(struct k
 	devattr = container_of(a, struct device_attribute, attr);
 	index = to_sensor_dev_attr(devattr)->index;
 
-	if (data->kind > index)
+	if (index < data->channels)
 		return a->mode;
 
 	return 0;
@@ -273,7 +273,7 @@ static int tmp421_probe(struct i2c_clien
 
 	i2c_set_clientdata(client, data);
 	mutex_init(&data->update_lock);
-	data->kind = id->driver_data;
+	data->channels = id->driver_data;
 
 	err = tmp421_init_client(client);
 	if (err)



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

* [patch 065/123] hwmon: Fix off-by-one kind values
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (63 preceding siblings ...)
  2010-03-13  0:12 ` [patch 064/123] hwmon: (tmp421) Restore missing inputs Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 066/123] pata_hpt3x2n: always stretch UltraDMA timing Greg KH
                   ` (58 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Hans de Goede,
	Andre Prendel

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

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

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

commit dc71afe5ac7e8d049bb991330518e4c898a7d92e upstream.

Recent changes on the I2C front have left off-by-one array indexes in
3 hwmon drivers. Fix them.

Faulty commit:
e5e9f44c2 i2c: Drop I2C_CLIENT_INSMOD_2 to 8

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andre Prendel <andre.prendel@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/hwmon/fschmd.c |   15 ++++++---------
 drivers/hwmon/tmp401.c |    7 +++----
 drivers/hwmon/tmp421.c |    4 ++--
 3 files changed, 11 insertions(+), 15 deletions(-)

--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -267,7 +267,7 @@ struct fschmd_data {
 	struct list_head list; /* member of the watchdog_data_list */
 	struct kref kref;
 	struct miscdevice watchdog_miscdev;
-	int kind;
+	enum chips kind;
 	unsigned long watchdog_is_open;
 	char watchdog_expect_close;
 	char watchdog_name[10]; /* must be unique to avoid sysfs conflict */
@@ -325,8 +325,7 @@ static ssize_t show_in_value(struct devi
 	int index = to_sensor_dev_attr(devattr)->index;
 	struct fschmd_data *data = fschmd_update_device(dev);
 
-	/* fscher / fschrc - 1 as data->kind is an array index, not a chips */
-	if (data->kind == (fscher - 1) || data->kind >= (fschrc - 1))
+	if (data->kind == fscher || data->kind >= fschrc)
 		return sprintf(buf, "%d\n", (data->volt[index] * dmi_vref *
 			dmi_mult[index]) / 255 + dmi_offset[index]);
 	else
@@ -492,7 +491,7 @@ static ssize_t show_pwm_auto_point1_pwm(
 	int val = data->fan_min[index];
 
 	/* 0 = allow turning off (except on the syl), 1-255 = 50-100% */
-	if (val || data->kind == fscsyl - 1)
+	if (val || data->kind == fscsyl)
 		val = val / 2 + 128;
 
 	return sprintf(buf, "%d\n", val);
@@ -506,7 +505,7 @@ static ssize_t store_pwm_auto_point1_pwm
 	unsigned long v = simple_strtoul(buf, NULL, 10);
 
 	/* reg: 0 = allow turning off (except on the syl), 1-255 = 50-100% */
-	if (v || data->kind == fscsyl - 1) {
+	if (v || data->kind == fscsyl) {
 		v = SENSORS_LIMIT(v, 128, 255);
 		v = (v - 128) * 2 + 1;
 	}
@@ -1037,7 +1036,7 @@ static int fschmd_detect(struct i2c_clie
 	else
 		return -ENODEV;
 
-	strlcpy(info->type, fschmd_id[kind - 1].name, I2C_NAME_SIZE);
+	strlcpy(info->type, fschmd_id[kind].name, I2C_NAME_SIZE);
 
 	return 0;
 }
@@ -1065,6 +1064,7 @@ static int fschmd_probe(struct i2c_clien
 	   (where the client is found through a data ptr instead of the
 	   otherway around) */
 	data->client = client;
+	data->kind = kind;
 
 	if (kind == fscpos) {
 		/* The Poseidon has hardwired temp limits, fill these
@@ -1085,9 +1085,6 @@ static int fschmd_probe(struct i2c_clien
 		}
 	}
 
-	/* i2c kind goes from 1-6, we want from 0-5 to address arrays */
-	data->kind = kind - 1;
-
 	/* Read in some never changing registers */
 	data->revision = i2c_smbus_read_byte_data(client, FSCHMD_REG_REVISION);
 	data->global_control = i2c_smbus_read_byte_data(client,
--- a/drivers/hwmon/tmp401.c
+++ b/drivers/hwmon/tmp401.c
@@ -134,7 +134,7 @@ struct tmp401_data {
 	struct mutex update_lock;
 	char valid; /* zero until following fields are valid */
 	unsigned long last_updated; /* in jiffies */
-	int kind;
+	enum chips kind;
 
 	/* register values */
 	u8 status;
@@ -524,7 +524,7 @@ static int tmp401_detect(struct i2c_clie
 	if (reg > 15)
 		return -ENODEV;
 
-	strlcpy(info->type, tmp401_id[kind - 1].name, I2C_NAME_SIZE);
+	strlcpy(info->type, tmp401_id[kind].name, I2C_NAME_SIZE);
 
 	return 0;
 }
@@ -572,8 +572,7 @@ static int tmp401_probe(struct i2c_clien
 		goto exit_remove;
 	}
 
-	dev_info(&client->dev, "Detected TI %s chip\n",
-		 names[data->kind - 1]);
+	dev_info(&client->dev, "Detected TI %s chip\n", names[data->kind]);
 
 	return 0;
 
--- a/drivers/hwmon/tmp421.c
+++ b/drivers/hwmon/tmp421.c
@@ -254,9 +254,9 @@ static int tmp421_detect(struct i2c_clie
 		return -ENODEV;
 	}
 
-	strlcpy(info->type, tmp421_id[kind - 1].name, I2C_NAME_SIZE);
+	strlcpy(info->type, tmp421_id[kind].name, I2C_NAME_SIZE);
 	dev_info(&adapter->dev, "Detected TI %s chip at 0x%02x\n",
-		 names[kind - 1], client->addr);
+		 names[kind], client->addr);
 
 	return 0;
 }



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

* [patch 066/123] pata_hpt3x2n: always stretch UltraDMA timing
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (64 preceding siblings ...)
  2010-03-13  0:12 ` [patch 065/123] hwmon: Fix off-by-one kind values Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 067/123] scm: Only support SCM_RIGHTS on unix domain sockets Greg KH
                   ` (57 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Sergei Shtylyov, Jeff Garzik

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

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

From: Sergei Shtylyov <sshtylyov@ru.mvista.com>

commit 60661933995bc7a09686c901439e17c2a4ea7d5d upstream.

The UltraDMA Tss timing must be stretched with ATA clock of 66 MHz, but the
driver only does this when PCI clock is 66 MHz, whereas it always programs
DPLL clock (which is used as the ATA clock) to 66 MHz.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/ata/pata_hpt3x2n.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -25,7 +25,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME	"pata_hpt3x2n"
-#define DRV_VERSION	"0.3.8"
+#define DRV_VERSION	"0.3.9"
 
 enum {
 	HPT_PCI_FAST	=	(1 << 31),
@@ -544,16 +544,16 @@ static int hpt3x2n_init_one(struct pci_d
 	       pci_mhz);
 	/* Set our private data up. We only need a few flags so we use
 	   it directly */
-	if (pci_mhz > 60) {
+	if (pci_mhz > 60)
 		hpriv = (void *)(PCI66 | USE_DPLL);
-		/*
-		 * On  HPT371N, if ATA clock is 66 MHz we must set bit 2 in
-		 * the MISC. register to stretch the UltraDMA Tss timing.
-		 * NOTE: This register is only writeable via I/O space.
-		 */
-		if (dev->device == PCI_DEVICE_ID_TTI_HPT371)
-			outb(inb(iobase + 0x9c) | 0x04, iobase + 0x9c);
-	}
+
+	/*
+	 * On  HPT371N, if ATA clock is 66 MHz we must set bit 2 in
+	 * the MISC. register to stretch the UltraDMA Tss timing.
+	 * NOTE: This register is only writeable via I/O space.
+	 */
+	if (dev->device == PCI_DEVICE_ID_TTI_HPT371)
+		outb(inb(iobase + 0x9c) | 0x04, iobase + 0x9c);
 
 	/* Now kick off ATA set up */
 	return ata_pci_sff_init_one(dev, ppi, &hpt3x2n_sht, hpriv);



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

* [patch 067/123] scm: Only support SCM_RIGHTS on unix domain sockets.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (65 preceding siblings ...)
  2010-03-13  0:12 ` [patch 066/123] pata_hpt3x2n: always stretch UltraDMA timing Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 068/123] skbuff: align sk_buff::cb to 64 bit and close some potential holes Greg KH
                   ` (56 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Eric W. Biederman, David S. Miller

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

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

From: Eric W. Biederman <ebiederm@xmission.com>

commit 76dadd76c265a0cdb5a76aa4eef03fcc9639b388 upstream.

We use scm_send and scm_recv on both unix domain and
netlink sockets, but only unix domain sockets support
everything required for file descriptor passing,
so error if someone attempts to pass file descriptors
over netlink sockets.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/core/scm.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -156,6 +156,8 @@ int __scm_send(struct socket *sock, stru
 		switch (cmsg->cmsg_type)
 		{
 		case SCM_RIGHTS:
+			if (!sock->ops || sock->ops->family != PF_UNIX)
+				goto error;
 			err=scm_fp_copy(cmsg, &p->fp);
 			if (err<0)
 				goto error;



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

* [patch 068/123] skbuff: align sk_buff::cb to 64 bit and close some potential holes
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (66 preceding siblings ...)
  2010-03-13  0:12 ` [patch 067/123] scm: Only support SCM_RIGHTS on unix domain sockets Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 069/123] netdevice.h: check for CONFIG_WLAN instead of CONFIG_WLAN_80211 Greg KH
                   ` (55 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Felix Fietkau, David S. Miller

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

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

From: Felix Fietkau <nbd@openwrt.org>

commit da3f5cf1f8ebb0fab5c5fd09adb189166594ad6c upstream.

The alignment requirement for 64-bit load/store instructions on ARM is
implementation defined. Some CPUs (such as Marvell Feroceon) do not
generate an exception, if such an instruction is executed with an
address that is not 64 bit aligned. In such a case, the Feroceon
corrupts adjacent memory, which showed up in my tests as a crash in the
rx path of ath9k that only occured with CONFIG_XFRM set.

This crash happened, because the first field of the mac80211 rx status
info in the cb is an u64, and changing it corrupted the skb->sp field.

This patch also closes some potential pre-existing holes in the sk_buff
struct surrounding the cb[] area.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/skbuff.h |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -315,22 +315,23 @@ struct sk_buff {
 	struct sk_buff		*next;
 	struct sk_buff		*prev;
 
-	struct sock		*sk;
 	ktime_t			tstamp;
+
+	struct sock		*sk;
 	struct net_device	*dev;
 
-	unsigned long		_skb_dst;
-#ifdef CONFIG_XFRM
-	struct	sec_path	*sp;
-#endif
 	/*
 	 * This is the control buffer. It is free to use for every
 	 * layer. Please put your private variables there. If you
 	 * want to keep them across layers you have to do a skb_clone()
 	 * first. This is owned by whoever has the skb queued ATM.
 	 */
-	char			cb[48];
+	char			cb[48] __aligned(8);
 
+	unsigned long		_skb_dst;
+#ifdef CONFIG_XFRM
+	struct	sec_path	*sp;
+#endif
 	unsigned int		len,
 				data_len;
 	__u16			mac_len,



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

* [patch 069/123] netdevice.h: check for CONFIG_WLAN instead of CONFIG_WLAN_80211
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (67 preceding siblings ...)
  2010-03-13  0:12 ` [patch 068/123] skbuff: align sk_buff::cb to 64 bit and close some potential holes Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 070/123] ath9k: re-enable ps by default for new single chip families Greg KH
                   ` (54 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, John W. Linville

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

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

From: John W. Linville <linville@tuxdriver.com>

commit caf66e581172dc5032bb84841a91bc7b77ad9876 upstream.

In "wireless: remove WLAN_80211 and WLAN_PRE80211 from Kconfig" I
inadvertantly missed a line in include/linux/netdevice.h.  I thereby
effectively reverted "net: Set LL_MAX_HEADER properly for wireless." by
accident. :-(  Now we should check there for CONFIG_WLAN instead.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reported-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/netdevice.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -136,7 +136,7 @@ static inline bool dev_xmit_complete(int
  *	used.
  */
 
-#if defined(CONFIG_WLAN_80211) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
+#if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
 # if defined(CONFIG_MAC80211_MESH)
 #  define LL_MAX_HEADER 128
 # else



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

* [patch 070/123] ath9k: re-enable ps by default for new single chip families
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (68 preceding siblings ...)
  2010-03-13  0:12 ` [patch 069/123] netdevice.h: check for CONFIG_WLAN instead of CONFIG_WLAN_80211 Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-16  1:04   ` [Stable-review] " Luis R. Rodriguez
  2010-03-13  0:12 ` [patch 071/123] ath9k: fix beacon timer restart after a card reset Greg KH
                   ` (53 subsequent siblings)
  123 siblings, 1 reply; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Peter Stuge,
	Justin P. Mattock, Kristoffer Ericson, Luis R. Rodriguez,
	John W. Linville

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

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

From: Luis R. Rodriguez <lrodriguez@atheros.com>

commit 14acdde6e527950f66c084dbf19bad6fbfcaeedc upstream.

The newer single chip hardware family of chipsets have not been
experiencing issues with power saving set by default with recent
fixes merged (even into stable). The remaining issues are only
reported with AR5416 and since enabling PS by default can increase
power savings considerably best to take advantage of that feature
as this has been tested properly.

For more details on this issue see the bug report:

http://bugzilla.kernel.org/show_bug.cgi?id=14267

We leave AR5416 with PS disabled by default, that seems to require
some more work.

Cc: Peter Stuge <peter@stuge.se>
Cc: Justin P. Mattock  <justinmattock@gmail.com>
Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath9k/main.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1849,6 +1849,8 @@ bad_free_hw:
 
 void ath_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
 {
+	struct ath_hw *ah = sc->sc_ah;
+
 	hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
 		IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
 		IEEE80211_HW_SIGNAL_DBM |
@@ -1866,7 +1868,8 @@ void ath_set_hw_capab(struct ath_softc *
 		BIT(NL80211_IFTYPE_ADHOC) |
 		BIT(NL80211_IFTYPE_MESH_POINT);
 
-	hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
+	if (AR_SREV_5416(ah))
+		hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
 
 	hw->queues = 4;
 	hw->max_rates = 4;



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

* [patch 071/123] ath9k: fix beacon timer restart after a card reset
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (69 preceding siblings ...)
  2010-03-13  0:12 ` [patch 070/123] ath9k: re-enable ps by default for new single chip families Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 072/123] ath9k: fix rate control fallback rate selection Greg KH
                   ` (52 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Felix Fietkau, John W. Linville

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

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

From: Felix Fietkau <nbd@openwrt.org>

commit d8728ee919282c7b01b65cd479ec1e2a9c5d3ba8 upstream.

In AP mode, ath_beacon_config_ap only restarts the timer if a TSF
restart is requested. Apparently this was added, because this function
unconditionally sets the flag for TSF reset.

The problem with this is, that ath9k_hw_reset() clobbers the timer
registers (specified in the initvals), thus effectively disabling the
SWBA interrupt whenever a card reset without TSF reset is issued
(happens in a few places in the code).

This patch fixes ath_beacon_config_ap to only issue the TSF reset flag
when necessary, but reinitialize the timer unconditionally. Tests show,
that this is enough to keep the SWBA interrupt going after a call to
ath_reset()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath9k/beacon.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -525,16 +525,13 @@ static void ath_beacon_config_ap(struct
 {
 	u32 nexttbtt, intval;
 
-	/* Configure the timers only when the TSF has to be reset */
-
-	if (!(sc->sc_flags & SC_OP_TSF_RESET))
-		return;
-
 	/* NB: the beacon interval is kept internally in TU's */
 	intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
 	intval /= ATH_BCBUF;    /* for staggered beacons */
 	nexttbtt = intval;
-	intval |= ATH9K_BEACON_RESET_TSF;
+
+	if (sc->sc_flags & SC_OP_TSF_RESET)
+		intval |= ATH9K_BEACON_RESET_TSF;
 
 	/*
 	 * In AP mode we enable the beacon timers and SWBA interrupts to



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

* [patch 072/123] ath9k: fix rate control fallback rate selection
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (70 preceding siblings ...)
  2010-03-13  0:12 ` [patch 071/123] ath9k: fix beacon timer restart after a card reset Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 073/123] ath9k: disable RIFS search for AR91xx based chips Greg KH
                   ` (51 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Felix Fietkau, John W. Linville

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

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

From: Felix Fietkau <nbd@openwrt.org>

commit 5c0ba62fd4b2dce08055a89600f1d834f9f0fe9e upstream.

When selecting the tx fallback rate, rc.c used a separate variable
'nrix' for storing the next rate index, however it did not use that as
reference for further rate index lowering. Because of that, it ended up
reusing the same rate for multiple multi-rate retry stages, thus
decreasing delivery probability under changing link conditions.

This patch removes the separate (unnecessary) variable and fixes
fallback the way it was intended to work.
This should result in increased throughput and better link stability.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath9k/rc.c |   15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -668,7 +668,7 @@ static void ath_get_rate(void *priv, str
 	struct ieee80211_tx_rate *rates = tx_info->control.rates;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	__le16 fc = hdr->frame_control;
-	u8 try_per_rate, i = 0, rix, nrix;
+	u8 try_per_rate, i = 0, rix;
 	int is_probe = 0;
 
 	if (rate_control_send_low(sta, priv_sta, txrc))
@@ -688,26 +688,25 @@ static void ath_get_rate(void *priv, str
 
 	rate_table = sc->cur_rate_table;
 	rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
-	nrix = rix;
 
 	if (is_probe) {
 		/* set one try for probe rates. For the
 		 * probes don't enable rts */
 		ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-				       1, nrix, 0);
+				       1, rix, 0);
 
 		/* Get the next tried/allowed rate. No RTS for the next series
 		 * after the probe rate
 		 */
-		ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
+		ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
 		ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-				       try_per_rate, nrix, 0);
+				       try_per_rate, rix, 0);
 
 		tx_info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
 	} else {
 		/* Set the choosen rate. No RTS for first series entry. */
 		ath_rc_rate_set_series(rate_table, &rates[i++], txrc,
-				       try_per_rate, nrix, 0);
+				       try_per_rate, rix, 0);
 	}
 
 	/* Fill in the other rates for multirate retry */
@@ -716,10 +715,10 @@ static void ath_get_rate(void *priv, str
 		if (i + 1 == 4)
 			try_per_rate = 4;
 
-		ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
+		ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &rix);
 		/* All other rates in the series have RTS enabled */
 		ath_rc_rate_set_series(rate_table, &rates[i], txrc,
-				       try_per_rate, nrix, 1);
+				       try_per_rate, rix, 1);
 	}
 
 	/*



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

* [patch 073/123] ath9k: disable RIFS search for AR91xx based chips
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (71 preceding siblings ...)
  2010-03-13  0:12 ` [patch 072/123] ath9k: fix rate control fallback rate selection Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 074/123] ath5k: use correct packet type when transmitting Greg KH
                   ` (50 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Felix Fietkau,
	Luis R. Rodriguez, John W. Linville

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

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

From: Felix Fietkau <nbd@openwrt.org>

commit 7bfbae10dc10a5c94a780d117a57e875d77e8e5a upstream.

While ath9k does not support RIFS yet, the ability to receive RIFS
frames is currently enabled for most chipsets in the initvals.
This is causing baseband related issues on AR9160 and AR9130 based
chipsets, which can lock up under certain conditions.

This patch fixes these issues by overriding the initvals, effectively
disabling RIFS for all affected chipsets.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath9k/hw.c  |   10 ++++++++++
 drivers/net/wireless/ath/ath9k/phy.h |    3 +++
 2 files changed, 13 insertions(+)

--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1345,6 +1345,16 @@ static void ath9k_hw_override_ini(struct
 	 * Necessary to avoid issues on AR5416 2.0
 	 */
 	REG_WRITE(ah, 0x9800 + (651 << 2), 0x11);
+
+	/*
+	 * Disable RIFS search on some chips to avoid baseband
+	 * hang issues.
+	 */
+	if (AR_SREV_9100(ah) || AR_SREV_9160(ah)) {
+		val = REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS);
+		val &= ~AR_PHY_RIFS_INIT_DELAY;
+		REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val);
+	}
 }
 
 static u32 ath9k_hw_def_ini_fixup(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/phy.h
+++ b/drivers/net/wireless/ath/ath9k/phy.h
@@ -384,6 +384,9 @@ bool ath9k_hw_set_rf_regs(struct ath_hw
 
 #define AR_PHY_HEAVY_CLIP_ENABLE         0x99E0
 
+#define AR_PHY_HEAVY_CLIP_FACTOR_RIFS    0x99EC
+#define AR_PHY_RIFS_INIT_DELAY         0x03ff0000
+
 #define AR_PHY_M_SLEEP      0x99f0
 #define AR_PHY_REFCLKDLY    0x99f4
 #define AR_PHY_REFCLKPD     0x99f8



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

* [patch 074/123] ath5k: use correct packet type when transmitting
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (72 preceding siblings ...)
  2010-03-13  0:12 ` [patch 073/123] ath9k: disable RIFS search for AR91xx based chips Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 075/123] b43/b43legacy: Wake queues in wireless_core_start Greg KH
                   ` (49 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Bob Copeland, John W. Linville

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

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

From: Bob Copeland <me@bobcopeland.com>

commit 2ac2927a953a01c83df255118922cce1523d1a18 upstream.

The hardware needs to know what type of frames are being
sent in order to fill in various fields, for example the
timestamp in probe responses (before this patch, it was
always 0).  Set it correctly when initializing the TX
descriptor.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/ath/ath5k/ath5k.h |    1 -
 drivers/net/wireless/ath/ath5k/base.c  |   26 +++++++++++++++++++++++++-
 2 files changed, 25 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -541,7 +541,6 @@ struct ath5k_txq_info {
 /*
  * Transmit packet types.
  * used on tx control descriptor
- * TODO: Use them inside base.c corectly
  */
 enum ath5k_pkt_type {
 	AR5K_PKT_TYPE_NORMAL		= 0,
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1246,6 +1246,29 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc
 	return 0;
 }
 
+static enum ath5k_pkt_type get_hw_packet_type(struct sk_buff *skb)
+{
+	struct ieee80211_hdr *hdr;
+	enum ath5k_pkt_type htype;
+	__le16 fc;
+
+	hdr = (struct ieee80211_hdr *)skb->data;
+	fc = hdr->frame_control;
+
+	if (ieee80211_is_beacon(fc))
+		htype = AR5K_PKT_TYPE_BEACON;
+	else if (ieee80211_is_probe_resp(fc))
+		htype = AR5K_PKT_TYPE_PROBE_RESP;
+	else if (ieee80211_is_atim(fc))
+		htype = AR5K_PKT_TYPE_ATIM;
+	else if (ieee80211_is_pspoll(fc))
+		htype = AR5K_PKT_TYPE_PSPOLL;
+	else
+		htype = AR5K_PKT_TYPE_NORMAL;
+
+	return htype;
+}
+
 static int
 ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
 		  struct ath5k_txq *txq)
@@ -1300,7 +1323,8 @@ ath5k_txbuf_setup(struct ath5k_softc *sc
 			sc->vif, pktlen, info));
 	}
 	ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
-		ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL,
+		ieee80211_get_hdrlen_from_skb(skb),
+		get_hw_packet_type(skb),
 		(sc->power_level * 2),
 		hw_rate,
 		info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags,



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

* [patch 075/123] b43/b43legacy: Wake queues in wireless_core_start
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (73 preceding siblings ...)
  2010-03-13  0:12 ` [patch 074/123] ath5k: use correct packet type when transmitting Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 076/123] netfilter: xt_recent: fix buffer overflow Greg KH
                   ` (48 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Larry Finger, John W. Linville

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

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

From: Larry Finger <Larry.Finger@lwfinger.net>

commit 0866b03c7d7dee8a34ffa527ecda426c0f405518 upstream.

If b43 or b43legacy are deauthenticated or disconnected, there is a
possibility that a reconnection is tried with the queues stopped in
mac80211. To prevent this, start the queues before setting
STAT_INITIALIZED.

In b43, a similar change has been in place (twice) in the
wireless_core_init() routine. Remove the duplicate and add similar
code to b43legacy.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/b43/main.c       |    3 +--
 drivers/net/wireless/b43legacy/main.c |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3970,6 +3970,7 @@ static int b43_wireless_core_start(struc
 	}
 
 	/* We are ready to run. */
+	ieee80211_wake_queues(dev->wl->hw);
 	b43_set_status(dev, B43_STAT_STARTED);
 
 	/* Start data flow (TX/RX). */
@@ -4379,8 +4380,6 @@ static int b43_wireless_core_init(struct
 
 	ieee80211_wake_queues(dev->wl->hw);
 
-	ieee80211_wake_queues(dev->wl->hw);
-
 	b43_set_status(dev, B43_STAT_INITIALIZED);
 
 out:
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2921,6 +2921,7 @@ static int b43legacy_wireless_core_start
 		goto out;
 	}
 	/* We are ready to run. */
+	ieee80211_wake_queues(dev->wl->hw);
 	b43legacy_set_status(dev, B43legacy_STAT_STARTED);
 
 	/* Start data flow (TX/RX) */
@@ -3341,6 +3342,7 @@ static int b43legacy_wireless_core_init(
 	b43legacy_security_init(dev);
 	b43legacy_rng_init(wl);
 
+	ieee80211_wake_queues(dev->wl->hw);
 	b43legacy_set_status(dev, B43legacy_STAT_INITIALIZED);
 
 	b43legacy_leds_init(dev);



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

* [patch 076/123] netfilter: xt_recent: fix buffer overflow
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (74 preceding siblings ...)
  2010-03-13  0:12 ` [patch 075/123] b43/b43legacy: Wake queues in wireless_core_start Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 077/123] netfilter: xt_recent: fix false match Greg KH
                   ` (47 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Tim Gardner, Patrick McHardy

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

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

From: Tim Gardner <tim.gardner@canonical.com>

commit 2c08522e5d2f0af2d6f05be558946dcbf8173683 upstream.

e->index overflows e->stamps[] every ip_pkt_list_tot packets.

Consider the case when ip_pkt_list_tot==1; the first packet received is stored
in e->stamps[0] and e->index is initialized to 1. The next received packet
timestamp is then stored at e->stamps[1] in recent_entry_update(),
a buffer overflow because the maximum e->stamps[] index is 0.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/netfilter/xt_recent.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -173,10 +173,10 @@ recent_entry_init(struct recent_table *t
 
 static void recent_entry_update(struct recent_table *t, struct recent_entry *e)
 {
+	e->index %= ip_pkt_list_tot;
 	e->stamps[e->index++] = jiffies;
 	if (e->index > e->nstamps)
 		e->nstamps = e->index;
-	e->index %= ip_pkt_list_tot;
 	list_move_tail(&e->lru_list, &t->lru_list);
 }
 



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

* [patch 077/123] netfilter: xt_recent: fix false match
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (75 preceding siblings ...)
  2010-03-13  0:12 ` [patch 076/123] netfilter: xt_recent: fix buffer overflow Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 078/123] sunxvr500: Additional PCI id for sunxvr500 driver Greg KH
                   ` (46 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Tim Gardner, Patrick McHardy

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

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

From: Tim Gardner <tim.gardner@canonical.com>

commit 8ccb92ad41cb311e52ad1b1fe77992c7f47a3b63 upstream.

A rule with a zero hit_count will always match.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/netfilter/xt_recent.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -260,7 +260,7 @@ recent_mt(const struct sk_buff *skb, con
 		for (i = 0; i < e->nstamps; i++) {
 			if (info->seconds && time_after(time, e->stamps[i]))
 				continue;
-			if (++hits >= info->hit_count) {
+			if (info->hit_count && ++hits >= info->hit_count) {
 				ret = !ret;
 				break;
 			}



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

* [patch 078/123] sunxvr500: Additional PCI id for sunxvr500 driver
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (76 preceding siblings ...)
  2010-03-13  0:12 ` [patch 077/123] netfilter: xt_recent: fix false match Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 079/123] mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces Greg KH
                   ` (45 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ben Hutchings, David S. Miller

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

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

From: Ben Hutchings <ben@decadent.org.uk>

commit 275143e9b237dd7e0b6d01660fd9b8acd9922fa7 upstream.

Intergraph bought 3D Labs and some XVR-500 chips have Intergraph's
vendor id.

Reported-by: Jurij Smakov <jurij@wooyd.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/video/sunxvr500.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/video/sunxvr500.c
+++ b/drivers/video/sunxvr500.c
@@ -400,6 +400,7 @@ static void __devexit e3d_pci_unregister
 
 static struct pci_device_id e3d_pci_table[] = {
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a0),	},
+	{	PCI_DEVICE(0x1091, 0x7a0),			},
 	{	PCI_DEVICE(PCI_VENDOR_ID_3DLABS, 0x7a2),	},
 	{	.vendor = PCI_VENDOR_ID_3DLABS,
 		.device = PCI_ANY_ID,



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

* [patch 079/123] mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (77 preceding siblings ...)
  2010-03-13  0:12 ` [patch 078/123] sunxvr500: Additional PCI id for sunxvr500 driver Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 080/123] eeepc-laptop: disable wireless hotplug for 1005PE Greg KH
                   ` (44 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Felix Fietkau, John W. Linville

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

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

From: Felix Fietkau <nbd@openwrt.org>

commit 3f0e0b220f80075ce15483b20458192c0ac27426 upstream.

If frames are transmitted on 4-addr ap vlan interfaces with no station,
they end up being transmitted unencrypted, even if the ap interface
uses WPA. This patch add some sanity checking to make sure that this
does not happen.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/mac80211/tx.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1052,8 +1052,11 @@ ieee80211_tx_prepare(struct ieee80211_su
 
 	hdr = (struct ieee80211_hdr *) skb->data;
 
-	if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+	if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
 		tx->sta = rcu_dereference(sdata->u.vlan.sta);
+		if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
+			return TX_DROP;
+	}
 	if (!tx->sta)
 		tx->sta = sta_info_get(local, hdr->addr1);
 



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

* [patch 080/123] eeepc-laptop: disable wireless hotplug for 1005PE
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (78 preceding siblings ...)
  2010-03-13  0:12 ` [patch 079/123] mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:12 ` [patch 081/123] thinkpad-acpi: fix poll thread auto-start Greg KH
                   ` (43 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Jenkins

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

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

From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>

commit ced69c59811f05b2f8378467cbb82ac6ed3c6a5a upstream.

The wireless hotplug code is not needed on this model, and it disables
the wired ethernet card.  (Like on the 1005HA and 1201N).

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Reported-by: Ansgar Burchardt <ansgar@43-1.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/eeepc-laptop.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -1277,7 +1277,8 @@ static void eeepc_dmi_check(struct eeepc
 	 * hotplug code. In fact, current hotplug code seems to unplug another
 	 * device...
 	 */
-	if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0) {
+	if (strcmp(model, "1005HA") == 0 || strcmp(model, "1201N") == 0 ||
+	    strcmp(model, "1005PE") == 0) {
 		eeepc->hotplug_disabled = true;
 		pr_info("wlan hotplug disabled\n");
 	}



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

* [patch 081/123] thinkpad-acpi: fix poll thread auto-start
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (79 preceding siblings ...)
  2010-03-13  0:12 ` [patch 080/123] eeepc-laptop: disable wireless hotplug for 1005PE Greg KH
@ 2010-03-13  0:12 ` Greg KH
  2010-03-13  0:13 ` [patch 082/123] thinkpad-acpi: R52 brightness_mode has been confirmed Greg KH
                   ` (42 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:12 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit b589ea4c44170d3f7a845684e2d1b3b9571663af upstream.

The driver was not starting the NVRAM polling thread if the input
device was bound immediately after registration.

This fixes:
http://bugzilla.kernel.org/show_bug.cgi?id=15118

Reported-by: Florian Zumbiehl <florz@florz.de>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2607,16 +2607,11 @@ static int hotkey_inputdev_open(struct i
 {
 	switch (tpacpi_lifecycle) {
 	case TPACPI_LIFE_INIT:
-		/*
-		 * hotkey_init will call hotkey_poll_setup_safe
-		 * at the appropriate moment
-		 */
-		return 0;
-	case TPACPI_LIFE_EXITING:
-		return -EBUSY;
 	case TPACPI_LIFE_RUNNING:
 		hotkey_poll_setup_safe(false);
 		return 0;
+	case TPACPI_LIFE_EXITING:
+		return -EBUSY;
 	}
 
 	/* Should only happen if tpacpi_lifecycle is corrupt */
@@ -2627,7 +2622,7 @@ static int hotkey_inputdev_open(struct i
 static void hotkey_inputdev_close(struct input_dev *dev)
 {
 	/* disable hotkey polling when possible */
-	if (tpacpi_lifecycle == TPACPI_LIFE_RUNNING &&
+	if (tpacpi_lifecycle != TPACPI_LIFE_EXITING &&
 	    !(hotkey_source_mask & hotkey_driver_mask))
 		hotkey_poll_setup_safe(false);
 }
@@ -9051,6 +9046,9 @@ static int __init thinkpad_acpi_module_i
 			return ret;
 		}
 	}
+
+	tpacpi_lifecycle = TPACPI_LIFE_RUNNING;
+
 	ret = input_register_device(tpacpi_inputdev);
 	if (ret < 0) {
 		printk(TPACPI_ERR "unable to register input device\n");
@@ -9060,7 +9058,6 @@ static int __init thinkpad_acpi_module_i
 		tp_features.input_device_registered = 1;
 	}
 
-	tpacpi_lifecycle = TPACPI_LIFE_RUNNING;
 	return 0;
 }
 



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

* [patch 082/123] thinkpad-acpi: R52 brightness_mode has been confirmed
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (80 preceding siblings ...)
  2010-03-13  0:12 ` [patch 081/123] thinkpad-acpi: fix poll thread auto-start Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 083/123] thinkpad-acpi: document HKEY event 3006 Greg KH
                   ` (41 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit 7d1894d8d1c411d2dad95abfe0f65bacf68c4afa upstream.

We can stop pestering users for confirmation of the brightness_mode
default for firmware TP-76.

While at it, add a few missing comments in that quirk table.

Reported-by: Whoopie <whoopie79@gmx.net>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6128,13 +6128,13 @@ static const struct tpacpi_quirk brightn
 	TPACPI_Q_IBM('1', 'Y', TPACPI_BRGHT_Q_EC),	/* T43/p ATI */
 
 	/* Models with ATI GPUs that can use ECNVRAM */
-	TPACPI_Q_IBM('1', 'R', TPACPI_BRGHT_Q_EC),
+	TPACPI_Q_IBM('1', 'R', TPACPI_BRGHT_Q_EC),	/* R50,51 T40-42 */
 	TPACPI_Q_IBM('1', 'Q', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
-	TPACPI_Q_IBM('7', '6', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
+	TPACPI_Q_IBM('7', '6', TPACPI_BRGHT_Q_EC),	/* R52 */
 	TPACPI_Q_IBM('7', '8', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
 
 	/* Models with Intel Extreme Graphics 2 */
-	TPACPI_Q_IBM('1', 'U', TPACPI_BRGHT_Q_NOEC),
+	TPACPI_Q_IBM('1', 'U', TPACPI_BRGHT_Q_NOEC),	/* X40 */
 	TPACPI_Q_IBM('1', 'V', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
 	TPACPI_Q_IBM('1', 'W', TPACPI_BRGHT_Q_ASK|TPACPI_BRGHT_Q_EC),
 



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

* [patch 083/123] thinkpad-acpi: document HKEY event 3006
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (81 preceding siblings ...)
  2010-03-13  0:13 ` [patch 082/123] thinkpad-acpi: R52 brightness_mode has been confirmed Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 084/123] thinkpad-acpi: make driver events work in NVRAM poll mode Greg KH
                   ` (40 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit bf8b29c8f7f8269e99eca8b19048ed5b34b51810 upstream.

Event 0x3006 is used to help power management of the ODD in the
UltraBay.  The EC generates this event when the ODD eject button is
pressed (even if the bay is powered down).

Normally, Linux doesn't need this as we keep the SATA link powered
up (which wastes power).  The EC powers up the bay by itself when the
ODD eject button is pressed, and the SATA PHY reports the hotplug.

However, we could also power that SATA link down (and for that matter,
also power down the Ultrabay) if the ODD is left idle for a while with
no disk inside, and use event 0x3006 to know when we need that SATA link
powered back up.

For now, just stop asking for more information when event 0x3006 is
seen, there is no point in pestering users about it anymore.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3650,13 +3650,19 @@ static void hotkey_notify(struct ibm_str
 			break;
 		case 3:
 			/* 0x3000-0x3FFF: bay-related wakeups */
-			if (hkey == TP_HKEY_EV_BAYEJ_ACK) {
+			switch (hkey) {
+			case TP_HKEY_EV_BAYEJ_ACK:
 				hotkey_autosleep_ack = 1;
 				printk(TPACPI_INFO
 				       "bay ejected\n");
 				hotkey_wakeup_hotunplug_complete_notify_change();
 				known_ev = true;
-			} else {
+				break;
+			case TP_HKEY_EV_OPTDRV_EJ:
+				/* FIXME: kick libata if SATA link offline */
+				known_ev = true;
+				break;
+			default:
 				known_ev = false;
 			}
 			break;



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

* [patch 084/123] thinkpad-acpi: make driver events work in NVRAM poll mode
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (82 preceding siblings ...)
  2010-03-13  0:13 ` [patch 083/123] thinkpad-acpi: document HKEY event 3006 Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 085/123] thinkpad-acpi: fix bluetooth/wwan resume Greg KH
                   ` (39 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit 7f0cf712a74fcc3ad21f0bde95bd32c2f2cc3888 upstream.

Thadeu Lima de Souza Cascardo reports this:

Brightness notification does not work until the user writes to
hotkey_mask attribute.  That's because the polling thread will only run
if hotkey_user_mask is set and someone is reading the input device or
if hotkey_driver_mask is set.  In this second case, this condition is
not tested after the mask is changed, because the brightness and
volume drivers are started after the hotkey drivers.

Fix tpacpi_hotkey_driver_mask_set() to call hotkey_poll_setup(), so
that the poller kthread will be started when needed.

Reported-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Tested-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2082,6 +2082,7 @@ static struct attribute_set *hotkey_dev_
 
 static void tpacpi_driver_event(const unsigned int hkey_event);
 static void hotkey_driver_event(const unsigned int scancode);
+static void hotkey_poll_setup(const bool may_warn);
 
 /* HKEY.MHKG() return bits */
 #define TP_HOTKEY_TABLET_MASK (1 << 3)
@@ -2264,6 +2265,8 @@ static int tpacpi_hotkey_driver_mask_set
 
 	rc = hotkey_mask_set((hotkey_acpi_mask | hotkey_driver_mask) &
 							~hotkey_source_mask);
+	hotkey_poll_setup(true);
+
 	mutex_unlock(&hotkey_mutex);
 
 	return rc;
@@ -2548,7 +2551,7 @@ static void hotkey_poll_stop_sync(void)
 }
 
 /* call with hotkey_mutex held */
-static void hotkey_poll_setup(bool may_warn)
+static void hotkey_poll_setup(const bool may_warn)
 {
 	const u32 poll_driver_mask = hotkey_driver_mask & hotkey_source_mask;
 	const u32 poll_user_mask = hotkey_user_mask & hotkey_source_mask;
@@ -2579,7 +2582,7 @@ static void hotkey_poll_setup(bool may_w
 	}
 }
 
-static void hotkey_poll_setup_safe(bool may_warn)
+static void hotkey_poll_setup_safe(const bool may_warn)
 {
 	mutex_lock(&hotkey_mutex);
 	hotkey_poll_setup(may_warn);
@@ -2597,7 +2600,11 @@ static void hotkey_poll_set_freq(unsigne
 
 #else /* CONFIG_THINKPAD_ACPI_HOTKEY_POLL */
 
-static void hotkey_poll_setup_safe(bool __unused)
+static void hotkey_poll_setup(const bool __unused)
+{
+}
+
+static void hotkey_poll_setup_safe(const bool __unused)
 {
 }
 



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

* [patch 085/123] thinkpad-acpi: fix bluetooth/wwan resume
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (83 preceding siblings ...)
  2010-03-13  0:13 ` [patch 084/123] thinkpad-acpi: make driver events work in NVRAM poll mode Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 086/123] thinkpad-acpi: lock down video output state access Greg KH
                   ` (38 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit 08fedfc903c78e380b0baa7b57c52d367794d0a5 upstream.

Studying the DSDTs of various thinkpads, it looks like bit 3 of the
argument to SBDC and SWAN is not "set radio to last state on resume".
Rather, it seems to be "if this bit is set, enable radio on resume,
otherwise disable it on resume".

So, the proper way to prepare the radios for S3 suspend is: disable
radio and clear bit 3 on the SBDC/SWAN call to to resume with radio
disabled, and enable radio and set bit 3 on the SBDC/SWAN call to
resume with the radio enabled.

Also, for persistent devices, the rfkill core does not restore state,
so we really need to get the firmware to do the right thing.

We don't sync the radio state on suspend, instead we trust the BIOS to
not do anything weird if we never touched the radio state since boot.
Time will tell if that's a wise way of doing things...

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/platform/x86/thinkpad_acpi.c |   18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3878,7 +3878,7 @@ enum {
 	TP_ACPI_BLUETOOTH_HWPRESENT	= 0x01,	/* Bluetooth hw available */
 	TP_ACPI_BLUETOOTH_RADIOSSW	= 0x02,	/* Bluetooth radio enabled */
 	TP_ACPI_BLUETOOTH_RESUMECTRL	= 0x04,	/* Bluetooth state at resume:
-						   off / last state */
+						   0 = disable, 1 = enable */
 };
 
 enum {
@@ -3924,10 +3924,11 @@ static int bluetooth_set_status(enum tpa
 	}
 #endif
 
-	/* We make sure to keep TP_ACPI_BLUETOOTH_RESUMECTRL off */
-	status = TP_ACPI_BLUETOOTH_RESUMECTRL;
 	if (state == TPACPI_RFK_RADIO_ON)
-		status |= TP_ACPI_BLUETOOTH_RADIOSSW;
+		status = TP_ACPI_BLUETOOTH_RADIOSSW
+			  | TP_ACPI_BLUETOOTH_RESUMECTRL;
+	else
+		status = 0;
 
 	if (!acpi_evalf(hkey_handle, NULL, "SBDC", "vd", status))
 		return -EIO;
@@ -4078,7 +4079,7 @@ enum {
 	TP_ACPI_WANCARD_HWPRESENT	= 0x01,	/* Wan hw available */
 	TP_ACPI_WANCARD_RADIOSSW	= 0x02,	/* Wan radio enabled */
 	TP_ACPI_WANCARD_RESUMECTRL	= 0x04,	/* Wan state at resume:
-						   off / last state */
+						   0 = disable, 1 = enable */
 };
 
 #define TPACPI_RFK_WWAN_SW_NAME		"tpacpi_wwan_sw"
@@ -4115,10 +4116,11 @@ static int wan_set_status(enum tpacpi_rf
 	}
 #endif
 
-	/* We make sure to set TP_ACPI_WANCARD_RESUMECTRL */
-	status = TP_ACPI_WANCARD_RESUMECTRL;
 	if (state == TPACPI_RFK_RADIO_ON)
-		status |= TP_ACPI_WANCARD_RADIOSSW;
+		status = TP_ACPI_WANCARD_RADIOSSW
+			 | TP_ACPI_WANCARD_RESUMECTRL;
+	else
+		status = 0;
 
 	if (!acpi_evalf(hkey_handle, NULL, "SWAN", "vd", status))
 		return -EIO;



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

* [patch 086/123] thinkpad-acpi: lock down video output state access
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (84 preceding siblings ...)
  2010-03-13  0:13 ` [patch 085/123] thinkpad-acpi: fix bluetooth/wwan resume Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 087/123] ocfs2: Only bug out in direct io write for reflinked extent Greg KH
                   ` (37 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Henrique de Moraes Holschuh

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

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

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

commit b525c06cdbd8a3963f0173ccd23f9147d4c384b5 upstream.

Given the right combination of ThinkPad and X.org, just reading the
video output control state is enough to hard-crash X.org.

Until the day I somehow find out a model or BIOS cut date to not
provide this feature to ThinkPads that can do video switching through
X RandR, change permissions so that only processes with CAP_SYS_ADMIN
can access any sort of video output control state.

This bug could be considered a local DoS I suppose, as it allows any
non-privledged local user to cause some versions of X.org to
hard-crash some ThinkPads.

Reported-by: Jidanni <jidanni@jidanni.org>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/laptops/thinkpad-acpi.txt |    4 ++++
 drivers/platform/x86/Kconfig            |   10 ++++++++--
 drivers/platform/x86/thinkpad_acpi.c    |   15 +++++++++++++--
 3 files changed, 25 insertions(+), 4 deletions(-)

--- a/Documentation/laptops/thinkpad-acpi.txt
+++ b/Documentation/laptops/thinkpad-acpi.txt
@@ -650,6 +650,10 @@ LCD, CRT or DVI (if available). The foll
 	echo expand_toggle > /proc/acpi/ibm/video
 	echo video_switch > /proc/acpi/ibm/video
 
+NOTE: Access to this feature is restricted to processes owning the
+CAP_SYS_ADMIN capability for safety reasons, as it can interact badly
+enough with some versions of X.org to crash it.
+
 Each video output device can be enabled or disabled individually.
 Reading /proc/acpi/ibm/video shows the status of each device.
 
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -319,9 +319,15 @@ config THINKPAD_ACPI_VIDEO
 	  server running, phase of the moon, and the current mood of
 	  Schroedinger's cat.  If you can use X.org's RandR to control
 	  your ThinkPad's video output ports instead of this feature,
-	  don't think twice: do it and say N here to save some memory.
+	  don't think twice: do it and say N here to save memory and avoid
+	  bad interactions with X.org.
 
-	  If you are not sure, say Y here.
+	  NOTE: access to this feature is limited to processes with the
+	  CAP_SYS_ADMIN capability, to avoid local DoS issues in platforms
+	  where it interacts badly with X.org.
+
+	  If you are not sure, say Y here but do try to check if you could
+	  be using X.org RandR instead.
 
 config THINKPAD_ACPI_HOTKEY_POLL
 	bool "Support NVRAM polling for hot keys"
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -286,6 +286,7 @@ struct ibm_init_struct {
 	char param[32];
 
 	int (*init) (struct ibm_init_struct *);
+	mode_t base_procfs_mode;
 	struct ibm_struct *data;
 };
 
@@ -4629,6 +4630,10 @@ static int video_read(struct seq_file *m
 		return 0;
 	}
 
+	/* Even reads can crash X.org, so... */
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
 	status = video_outputsw_get();
 	if (status < 0)
 		return status;
@@ -4662,6 +4667,10 @@ static int video_write(char *buf)
 	if (video_supported == TPACPI_VIDEO_NONE)
 		return -ENODEV;
 
+	/* Even reads can crash X.org, let alone writes... */
+	if (!capable(CAP_SYS_ADMIN))
+		return -EPERM;
+
 	enable = 0;
 	disable = 0;
 
@@ -8506,9 +8515,10 @@ static int __init ibm_init(struct ibm_in
 		"%s installed\n", ibm->name);
 
 	if (ibm->read) {
-		mode_t mode;
+		mode_t mode = iibm->base_procfs_mode;
 
-		mode = S_IRUGO;
+		if (!mode)
+			mode = S_IRUGO;
 		if (ibm->write)
 			mode |= S_IWUSR;
 		entry = proc_create_data(ibm->name, mode, proc_dir,
@@ -8699,6 +8709,7 @@ static struct ibm_init_struct ibms_init[
 #ifdef CONFIG_THINKPAD_ACPI_VIDEO
 	{
 		.init = video_init,
+		.base_procfs_mode = S_IRUSR,
 		.data = &video_driver_data,
 	},
 #endif



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

* [patch 087/123] ocfs2: Only bug out in direct io write for reflinked extent.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (85 preceding siblings ...)
  2010-03-13  0:13 ` [patch 086/123] thinkpad-acpi: lock down video output state access Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 088/123] x86, ia32_aout: do not kill argument mapping Greg KH
                   ` (36 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Tao Ma, Joel Becker

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

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

From: Tao Ma <tao.ma@oracle.com>

commit cbaee472f274ea9a98aabe47025f6e5551acadcb upstream.

In ocfs2_direct_IO_get_blocks, we only need to bug out
in case of we are going to write a recounted extent rec.

What a silly bug introduced by me!

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/ocfs2/aops.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -577,8 +577,9 @@ static int ocfs2_direct_IO_get_blocks(st
 		goto bail;
 	}
 
-	/* We should already CoW the refcounted extent. */
-	BUG_ON(ext_flags & OCFS2_EXT_REFCOUNTED);
+	/* We should already CoW the refcounted extent in case of create. */
+	BUG_ON(create && (ext_flags & OCFS2_EXT_REFCOUNTED));
+
 	/*
 	 * get_more_blocks() expects us to describe a hole by clearing
 	 * the mapped bit on bh_result().



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

* [patch 088/123] x86, ia32_aout: do not kill argument mapping
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (86 preceding siblings ...)
  2010-03-13  0:13 ` [patch 087/123] ocfs2: Only bug out in direct io write for reflinked extent Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 089/123] x86: Add iMac9,1 to pci_reboot_dmi_table Greg KH
                   ` (35 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, Ingo Molnar,
	Thomas Gleixner, Ollie Wild, x86, H. Peter Anvin

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

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

From: Jiri Slaby <jslaby@suse.cz>

commit 318f6b228ba88a394ef560efc1bfe028ad5ae6b6 upstream.

Do not set current->mm->mmap to NULL in 32-bit emulation on 64-bit
load_aout_binary after flush_old_exec as it would destroy already
set brpm mapping with arguments.

Introduced by b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
mm: variable length argument support
where the argument mapping in bprm was added.

[ hpa: this is a regression from 2.6.22... time to kill a.out? ]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
LKML-Reference: <1265831716-7668-1-git-send-email-jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ollie Wild <aaw@google.com>
Cc: x86@kernel.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/ia32/ia32_aout.c |    1 -
 1 file changed, 1 deletion(-)

--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -327,7 +327,6 @@ static int load_aout_binary(struct linux
 	current->mm->free_area_cache = TASK_UNMAPPED_BASE;
 	current->mm->cached_hole_size = 0;
 
-	current->mm->mmap = NULL;
 	install_exec_creds(bprm);
 	current->flags &= ~PF_FORKNOEXEC;
 



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

* [patch 089/123] x86: Add iMac9,1 to pci_reboot_dmi_table
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (87 preceding siblings ...)
  2010-03-13  0:13 ` [patch 088/123] x86, ia32_aout: do not kill argument mapping Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13   ` Greg KH
                   ` (34 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Justin P. Mattock,
	H. Peter Anvin, Ingo Molnar

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

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

From: Justin P. Mattock <justinmattock@gmail.com>

commit 0a832320f1bae6a4169bf683e201378f2437cfc1 upstream.

On the iMac9,1 /sbin/reboot results in a black mangled screen. Adding
this DMI entry gets the machine to reboot cleanly as it should.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
LKML-Reference: <1266362249-3337-1-git-send-email-justinmattock@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/reboot.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -461,6 +461,14 @@ static struct dmi_system_id __initdata p
 			DMI_MATCH(DMI_PRODUCT_NAME, "Macmini3,1"),
 		},
 	},
+	{	/* Handle problems with rebooting on the iMac9,1. */
+		.callback = set_pci_reboot,
+		.ident = "Apple iMac9,1",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"),
+		},
+	},
 	{ }
 };
 



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

* [patch 090/123] x86, xen: Disable highmem PTE allocation even when CONFIG_HIGHPTE=y
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
@ 2010-03-13  0:13   ` Greg KH
  2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
                     ` (122 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ian Campbell,
	Jeremy Fitzhardinge, Ingo Molnar, Pasi Kärkkäinen,
	xen-devel, H. Peter Anvin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2296 bytes --]

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

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

From: Ian Campbell <ian.campbell@citrix.com>

commit 817a824b75b1475f1b067c8cee318c7b4d66fcde upstream.

There's a path in the pagefault code where the kernel deliberately
breaks its own locking rules by kmapping a high pte page without
holding the pagetable lock (in at least page_check_address). This
breaks Xen's ability to track the pinned/unpinned state of the
page. There does not appear to be a viable workaround for this
behaviour so simply disable HIGHPTE for all Xen guests.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
LKML-Reference: <1267204562-11844-1-git-send-email-ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pasi Kärkkäinen <pasik@iki.fi>
Cc: <xen-devel@lists.xensource.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/xen/enlighten.c |    7 +++++++
 arch/x86/xen/mmu.c       |   11 ++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -50,6 +50,7 @@
 #include <asm/traps.h>
 #include <asm/setup.h>
 #include <asm/desc.h>
+#include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/reboot.h>
@@ -1094,6 +1095,12 @@ asmlinkage void __init xen_start_kernel(
 
 	__supported_pte_mask |= _PAGE_IOMAP;
 
+	/*
+	 * Prevent page tables from being allocated in highmem, even
+	 * if CONFIG_HIGHPTE is enabled.
+	 */
+	__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
+
 	/* Work out if we support NX */
 	x86_configure_nx();
 
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1432,14 +1432,15 @@ static void *xen_kmap_atomic_pte(struct
 {
 	pgprot_t prot = PAGE_KERNEL;
 
+	/*
+	 * We disable highmem allocations for page tables so we should never
+	 * see any calls to kmap_atomic_pte on a highmem page.
+	 */
+	BUG_ON(PageHighMem(page));
+
 	if (PagePinned(page))
 		prot = PAGE_KERNEL_RO;
 
-	if (0 && PageHighMem(page))
-		printk("mapping highpte %lx type %d prot %s\n",
-		       page_to_pfn(page), type,
-		       (unsigned long)pgprot_val(prot) & _PAGE_RW ? "WRITE" : "READ");
-
 	return kmap_atomic_prot(page, type, prot);
 }
 #endif



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

* [patch 090/123] x86, xen: Disable highmem PTE allocation even when CONFIG_HIGHPTE=y
@ 2010-03-13  0:13   ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Jeremy Fitzhardinge, xen-devel, Ian Campbell, Ingo Molnar,
	H. Peter Anvin, akpm, torvalds, stable-review, alan

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2294 bytes --]

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

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

From: Ian Campbell <ian.campbell@citrix.com>

commit 817a824b75b1475f1b067c8cee318c7b4d66fcde upstream.

There's a path in the pagefault code where the kernel deliberately
breaks its own locking rules by kmapping a high pte page without
holding the pagetable lock (in at least page_check_address). This
breaks Xen's ability to track the pinned/unpinned state of the
page. There does not appear to be a viable workaround for this
behaviour so simply disable HIGHPTE for all Xen guests.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
LKML-Reference: <1267204562-11844-1-git-send-email-ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pasi Kärkkäinen <pasik@iki.fi>
Cc: <xen-devel@lists.xensource.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/xen/enlighten.c |    7 +++++++
 arch/x86/xen/mmu.c       |   11 ++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -50,6 +50,7 @@
 #include <asm/traps.h>
 #include <asm/setup.h>
 #include <asm/desc.h>
+#include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/tlbflush.h>
 #include <asm/reboot.h>
@@ -1094,6 +1095,12 @@ asmlinkage void __init xen_start_kernel(
 
 	__supported_pte_mask |= _PAGE_IOMAP;
 
+	/*
+	 * Prevent page tables from being allocated in highmem, even
+	 * if CONFIG_HIGHPTE is enabled.
+	 */
+	__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
+
 	/* Work out if we support NX */
 	x86_configure_nx();
 
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1432,14 +1432,15 @@ static void *xen_kmap_atomic_pte(struct
 {
 	pgprot_t prot = PAGE_KERNEL;
 
+	/*
+	 * We disable highmem allocations for page tables so we should never
+	 * see any calls to kmap_atomic_pte on a highmem page.
+	 */
+	BUG_ON(PageHighMem(page));
+
 	if (PagePinned(page))
 		prot = PAGE_KERNEL_RO;
 
-	if (0 && PageHighMem(page))
-		printk("mapping highpte %lx type %d prot %s\n",
-		       page_to_pfn(page), type,
-		       (unsigned long)pgprot_val(prot) & _PAGE_RW ? "WRITE" : "READ");
-
 	return kmap_atomic_prot(page, type, prot);
 }
 #endif

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

* [patch 091/123] x86: Avoid race condition in pci_enable_msix()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (89 preceding siblings ...)
  2010-03-13  0:13   ` Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 092/123] x86: Fix SCI on IOAPIC != 0 Greg KH
                   ` (32 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Yinghai Lu,
	Brandon Phililps, H. Peter Anvin

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

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

From: Brandon Phiilps <bphilips@suse.de>

commit ced5b697a76d325e7a7ac7d382dbbb632c765093 upstream.

Keep chip_data in create_irq_nr and destroy_irq.

When two drivers are setting up MSI-X at the same time via
pci_enable_msix() there is a race.  See this dmesg excerpt:

[   85.170610] ixgbe 0000:02:00.1: irq 97 for MSI/MSI-X
[   85.170611]   alloc irq_desc for 99 on node -1
[   85.170613] igb 0000:08:00.1: irq 98 for MSI/MSI-X
[   85.170614]   alloc kstat_irqs on node -1
[   85.170616] alloc irq_2_iommu on node -1
[   85.170617]   alloc irq_desc for 100 on node -1
[   85.170619]   alloc kstat_irqs on node -1
[   85.170621] alloc irq_2_iommu on node -1
[   85.170625] ixgbe 0000:02:00.1: irq 99 for MSI/MSI-X
[   85.170626]   alloc irq_desc for 101 on node -1
[   85.170628] igb 0000:08:00.1: irq 100 for MSI/MSI-X
[   85.170630]   alloc kstat_irqs on node -1
[   85.170631] alloc irq_2_iommu on node -1
[   85.170635]   alloc irq_desc for 102 on node -1
[   85.170636]   alloc kstat_irqs on node -1
[   85.170639] alloc irq_2_iommu on node -1
[   85.170646] BUG: unable to handle kernel NULL pointer dereference
at 0000000000000088

As you can see igb and ixgbe are both alternating on create_irq_nr()
via pci_enable_msix() in their probe function.

ixgbe: While looping through irq_desc_ptrs[] via create_irq_nr() ixgbe
choses irq_desc_ptrs[102] and exits the loop, drops vector_lock and
calls dynamic_irq_init. Then it sets irq_desc_ptrs[102]->chip_data =
NULL via dynamic_irq_init().

igb: Grabs the vector_lock now and starts looping over irq_desc_ptrs[]
via create_irq_nr(). It gets to irq_desc_ptrs[102] and does this:

	cfg_new = irq_desc_ptrs[102]->chip_data;
	if (cfg_new->vector != 0)
		continue;

This hits the NULL deref.

Another possible race exists via pci_disable_msix() in a driver or in
the number of error paths that call free_msi_irqs():

destroy_irq()
dynamic_irq_cleanup() which sets desc->chip_data = NULL
...race window...
desc->chip_data = cfg;

Remove the save and restore code for cfg in create_irq_nr() and
destroy_irq() and take the desc->lock when checking the irq_cfg.

Reported-and-analyzed-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1265793639-15071-3-git-send-email-yinghai@kernel.org>
Signed-off-by: Brandon Phililps <bphilips@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kernel/apic/io_apic.c |   18 +++-----------
 include/linux/irq.h            |    2 +
 kernel/irq/chip.c              |   52 +++++++++++++++++++++++++++++++++--------
 3 files changed, 50 insertions(+), 22 deletions(-)

--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3228,12 +3228,9 @@ unsigned int create_irq_nr(unsigned int
 	}
 	spin_unlock_irqrestore(&vector_lock, flags);
 
-	if (irq > 0) {
-		dynamic_irq_init(irq);
-		/* restore it, in case dynamic_irq_init clear it */
-		if (desc_new)
-			desc_new->chip_data = cfg_new;
-	}
+	if (irq > 0)
+		dynamic_irq_init_keep_chip_data(irq);
+
 	return irq;
 }
 
@@ -3256,17 +3253,12 @@ void destroy_irq(unsigned int irq)
 {
 	unsigned long flags;
 	struct irq_cfg *cfg;
-	struct irq_desc *desc;
 
-	/* store it, in case dynamic_irq_cleanup clear it */
-	desc = irq_to_desc(irq);
-	cfg = desc->chip_data;
-	dynamic_irq_cleanup(irq);
-	/* connect back irq_cfg */
-	desc->chip_data = cfg;
+	dynamic_irq_cleanup_keep_chip_data(irq);
 
 	free_irte(irq);
 	spin_lock_irqsave(&vector_lock, flags);
+	cfg = irq_to_desc(irq)->chip_data;
 	__clear_irq_vector(irq, cfg);
 	spin_unlock_irqrestore(&vector_lock, flags);
 }
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -400,7 +400,9 @@ static inline int irq_has_action(unsigne
 
 /* Dynamic irq helper functions */
 extern void dynamic_irq_init(unsigned int irq);
+void dynamic_irq_init_keep_chip_data(unsigned int irq);
 extern void dynamic_irq_cleanup(unsigned int irq);
+void dynamic_irq_cleanup_keep_chip_data(unsigned int irq);
 
 /* Set/get chip/data for an IRQ: */
 extern int set_irq_chip(unsigned int irq, struct irq_chip *chip);
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -18,11 +18,7 @@
 
 #include "internals.h"
 
-/**
- *	dynamic_irq_init - initialize a dynamically allocated irq
- *	@irq:	irq number to initialize
- */
-void dynamic_irq_init(unsigned int irq)
+static void dynamic_irq_init_x(unsigned int irq, bool keep_chip_data)
 {
 	struct irq_desc *desc;
 	unsigned long flags;
@@ -41,7 +37,8 @@ void dynamic_irq_init(unsigned int irq)
 	desc->depth = 1;
 	desc->msi_desc = NULL;
 	desc->handler_data = NULL;
-	desc->chip_data = NULL;
+	if (!keep_chip_data)
+		desc->chip_data = NULL;
 	desc->action = NULL;
 	desc->irq_count = 0;
 	desc->irqs_unhandled = 0;
@@ -55,10 +52,26 @@ void dynamic_irq_init(unsigned int irq)
 }
 
 /**
- *	dynamic_irq_cleanup - cleanup a dynamically allocated irq
+ *	dynamic_irq_init - initialize a dynamically allocated irq
  *	@irq:	irq number to initialize
  */
-void dynamic_irq_cleanup(unsigned int irq)
+void dynamic_irq_init(unsigned int irq)
+{
+	dynamic_irq_init_x(irq, false);
+}
+
+/**
+ *	dynamic_irq_init_keep_chip_data - initialize a dynamically allocated irq
+ *	@irq:	irq number to initialize
+ *
+ *	does not set irq_to_desc(irq)->chip_data to NULL
+ */
+void dynamic_irq_init_keep_chip_data(unsigned int irq)
+{
+	dynamic_irq_init_x(irq, true);
+}
+
+static void dynamic_irq_cleanup_x(unsigned int irq, bool keep_chip_data)
 {
 	struct irq_desc *desc = irq_to_desc(irq);
 	unsigned long flags;
@@ -77,7 +90,8 @@ void dynamic_irq_cleanup(unsigned int ir
 	}
 	desc->msi_desc = NULL;
 	desc->handler_data = NULL;
-	desc->chip_data = NULL;
+	if (!keep_chip_data)
+		desc->chip_data = NULL;
 	desc->handle_irq = handle_bad_irq;
 	desc->chip = &no_irq_chip;
 	desc->name = NULL;
@@ -85,6 +99,26 @@ void dynamic_irq_cleanup(unsigned int ir
 	raw_spin_unlock_irqrestore(&desc->lock, flags);
 }
 
+/**
+ *	dynamic_irq_cleanup - cleanup a dynamically allocated irq
+ *	@irq:	irq number to initialize
+ */
+void dynamic_irq_cleanup(unsigned int irq)
+{
+	dynamic_irq_cleanup_x(irq, false);
+}
+
+/**
+ *	dynamic_irq_cleanup_keep_chip_data - cleanup a dynamically allocated irq
+ *	@irq:	irq number to initialize
+ *
+ *	does not set irq_to_desc(irq)->chip_data to NULL
+ */
+void dynamic_irq_cleanup_keep_chip_data(unsigned int irq)
+{
+	dynamic_irq_cleanup_x(irq, true);
+}
+
 
 /**
  *	set_irq_chip - set the irq chip for an irq



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

* [patch 092/123] x86: Fix SCI on IOAPIC != 0
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (90 preceding siblings ...)
  2010-03-13  0:13 ` [patch 091/123] x86: Avoid race condition in pci_enable_msix() Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 093/123] USB: xhci: Fix finding extended capabilities registers Greg KH
                   ` (31 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Yinghai Lu, H. Peter Anvin

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

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

From: Yinghai Lu <yinghai@kernel.org>

commit 18dce6ba5c8c6bd0f3ab4efa4cbdd698dab5c40a upstream.

Thomas Renninger <trenn@suse.de> reported on IBM x3330

booting a latest kernel on this machine results in:

PCI: PCI BIOS revision 2.10 entry at 0xfd61c, last bus=1
PCI: Using configuration type 1 for base access bio: create slab <bio-0> at 0
ACPI: SCI (IRQ30) allocation failed
ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20090903/evevent-161)
ACPI: Unable to start the ACPI Interpreter

Later all kind of devices fail...

and bisect it down to this commit:
commit b9c61b70075c87a8612624736faf4a2de5b1ed30

    x86/pci: update pirq_enable_irq() to setup io apic routing

it turns out we need to set irq routing for the sci on ioapic1 early.

-v2: make it work without sparseirq too.
-v3: fix checkpatch.pl warning, and cc to stable

Reported-by: Thomas Renninger <trenn@suse.de>
Bisected-by: Thomas Renninger <trenn@suse.de>
Tested-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1265793639-15071-2-git-send-email-yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/io_apic.h |    1 
 arch/x86/kernel/acpi/boot.c    |    9 ++++++-
 arch/x86/kernel/apic/io_apic.c |   50 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 59 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -160,6 +160,7 @@ extern int io_apic_get_redir_entries(int
 struct io_apic_irq_attr;
 extern int io_apic_set_pci_routing(struct device *dev, int irq,
 		 struct io_apic_irq_attr *irq_attr);
+void setup_IO_APIC_irq_extra(u32 gsi);
 extern int (*ioapic_renumber_irq)(int ioapic, int irq);
 extern void ioapic_init_mappings(void);
 extern void ioapic_insert_resources(void);
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -446,6 +446,12 @@ void __init acpi_pic_sci_set_trigger(uns
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
 {
 	*irq = gsi;
+
+#ifdef CONFIG_X86_IO_APIC
+	if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC)
+		setup_IO_APIC_irq_extra(gsi);
+#endif
+
 	return 0;
 }
 
@@ -473,7 +479,8 @@ int acpi_register_gsi(struct device *dev
 		plat_gsi = mp_register_gsi(dev, gsi, trigger, polarity);
 	}
 #endif
-	acpi_gsi_to_irq(plat_gsi, &irq);
+	irq = plat_gsi;
+
 	return irq;
 }
 
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1539,6 +1539,56 @@ static void __init setup_IO_APIC_irqs(vo
 }
 
 /*
+ * for the gsit that is not in first ioapic
+ * but could not use acpi_register_gsi()
+ * like some special sci in IBM x3330
+ */
+void setup_IO_APIC_irq_extra(u32 gsi)
+{
+	int apic_id = 0, pin, idx, irq;
+	int node = cpu_to_node(boot_cpu_id);
+	struct irq_desc *desc;
+	struct irq_cfg *cfg;
+
+	/*
+	 * Convert 'gsi' to 'ioapic.pin'.
+	 */
+	apic_id = mp_find_ioapic(gsi);
+	if (apic_id < 0)
+		return;
+
+	pin = mp_find_ioapic_pin(apic_id, gsi);
+	idx = find_irq_entry(apic_id, pin, mp_INT);
+	if (idx == -1)
+		return;
+
+	irq = pin_2_irq(idx, apic_id, pin);
+#ifdef CONFIG_SPARSE_IRQ
+	desc = irq_to_desc(irq);
+	if (desc)
+		return;
+#endif
+	desc = irq_to_desc_alloc_node(irq, node);
+	if (!desc) {
+		printk(KERN_INFO "can not get irq_desc for %d\n", irq);
+		return;
+	}
+
+	cfg = desc->chip_data;
+	add_pin_to_irq_node(cfg, node, apic_id, pin);
+
+	if (test_bit(pin, mp_ioapic_routing[apic_id].pin_programmed)) {
+		pr_debug("Pin %d-%d already programmed\n",
+			 mp_ioapics[apic_id].apicid, pin);
+		return;
+	}
+	set_bit(pin, mp_ioapic_routing[apic_id].pin_programmed);
+
+	setup_IO_APIC_irq(apic_id, pin, irq, desc,
+			irq_trigger(idx), irq_polarity(idx));
+}
+
+/*
  * Set up the timer pin, possibly with the 8259A-master behind.
  */
 static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin,



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

* [patch 093/123] USB: xhci: Fix finding extended capabilities registers
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (91 preceding siblings ...)
  2010-03-13  0:13 ` [patch 092/123] x86: Fix SCI on IOAPIC != 0 Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 094/123] USB: fix the idProduct value for USB-3.0 root hubs Greg KH
                   ` (30 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Edward Shao, Sarah Sharp

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

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

From: Edward Shao <laface.tw@gmail.com>

commit 05197921ff3dad52d99fd1647974c57d9c28d40e upstream.

According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
value of xECP register indicates a relative offset, in 32-bit words,
from Base to the beginning of the first extended capability.
The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
in some platform with BIOS USB legacy sup support.

Signed-off-by: Edward Shao <laface.tw@gmail.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/xhci-ext-caps.h |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/usb/host/xhci-ext-caps.h
+++ b/drivers/usb/host/xhci-ext-caps.h
@@ -101,12 +101,15 @@ static inline int xhci_find_next_cap_off
 
 	next = readl(base + ext_offset);
 
-	if (ext_offset == XHCI_HCC_PARAMS_OFFSET)
+	if (ext_offset == XHCI_HCC_PARAMS_OFFSET) {
 		/* Find the first extended capability */
 		next = XHCI_HCC_EXT_CAPS(next);
-	else
+		ext_offset = 0;
+	} else {
 		/* Find the next extended capability */
 		next = XHCI_EXT_CAPS_NEXT(next);
+	}
+
 	if (!next)
 		return 0;
 	/*



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

* [patch 094/123] USB: fix the idProduct value for USB-3.0 root hubs
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (92 preceding siblings ...)
  2010-03-13  0:13 ` [patch 093/123] USB: xhci: Fix finding extended capabilities registers Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 095/123] USB: fix crash in uhci_scan_schedule Greg KH
                   ` (29 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Alan Stern, Sarah Sharp

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

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

From: Alan Stern <stern@rowland.harvard.edu>

commit cd780694920fbf869b23c8afb0bd083e7b0448c7 upstream.

This patch (as1346) changes the idProduct value for USB-3.0 root hubs
from 0x0002 (which we already use for USB-2.0 root hubs) to 0x0003.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -141,7 +141,7 @@ static const u8 usb3_rh_dev_descriptor[1
 	0x09,       /*  __u8  bMaxPacketSize0; 2^9 = 512 Bytes */
 
 	0x6b, 0x1d, /*  __le16 idVendor; Linux Foundation */
-	0x02, 0x00, /*  __le16 idProduct; device 0x0002 */
+	0x03, 0x00, /*  __le16 idProduct; device 0x0003 */
 	KERNEL_VER, KERNEL_REL, /*  __le16 bcdDevice */
 
 	0x03,       /*  __u8  iManufacturer; */



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

* [patch 095/123] USB: fix crash in uhci_scan_schedule
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (93 preceding siblings ...)
  2010-03-13  0:13 ` [patch 094/123] USB: fix the idProduct value for USB-3.0 root hubs Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 096/123] USB: remove debugging message for uevent constructions Greg KH
                   ` (28 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Pete Zaitcev

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

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

From: Pete Zaitcev <zaitcev@redhat.com>

commit d23356da714595b888686d22cd19061323c09190 upstream.

When hardware is removed on a Stratus, the system may crash like this:

ACPI: PCI interrupt for device 0000:7c:00.1 disabled
Trying to free nonexistent resource <00000000a8000000-00000000afffffff>
Trying to free nonexistent resource <00000000a4800000-00000000a480ffff>
uhci_hcd 0000:7e:1d.0: remove, state 1
usb usb2: USB disconnect, address 1
usb 2-1: USB disconnect, address 2
Unable to handle kernel paging request at 0000000000100100 RIP:
 [<ffffffff88021950>] :uhci_hcd:uhci_scan_schedule+0xa2/0x89c

 #4 [ffff81011de17e50] uhci_scan_schedule at ffffffff88021918
 #5 [ffff81011de17ed0] uhci_irq at ffffffff88023cb8
 #6 [ffff81011de17f10] usb_hcd_irq at ffffffff801f1c1f
 #7 [ffff81011de17f20] handle_IRQ_event at ffffffff8001123b
 #8 [ffff81011de17f50] __do_IRQ at ffffffff800ba749

This occurs because an interrupt scans uhci->skelqh, which is
being freed. We do the right thing: disable the interrupts in the
device, and do not do any processing if the interrupt is shared
with other source, but it's possible that another CPU gets
delayed somewhere (e.g. loops) until we started freeing.

The agreed-upon solution is to wait for interrupts to play out
before proceeding. No other bareers are neceesary.

A backport of this patch was tested on a 2.6.18 based kernel.
Testing of 2.6.32-based kernels is under way, but it takes us
forever (months) to turn this around. So I think it's a good
patch and we should keep it.

Tracked in RH bz#516851

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/uhci-hcd.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -735,6 +735,7 @@ static void uhci_stop(struct usb_hcd *hc
 		uhci_hc_died(uhci);
 	uhci_scan_schedule(uhci);
 	spin_unlock_irq(&uhci->lock);
+	synchronize_irq(hcd->irq);
 
 	del_timer_sync(&uhci->fsbr_timer);
 	release_uhci(uhci);



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

* [patch 096/123] USB: remove debugging message for uevent constructions
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (94 preceding siblings ...)
  2010-03-13  0:13 ` [patch 095/123] USB: fix crash in uhci_scan_schedule Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 097/123] USB: Move hcd free_dev call into usb_disconnect to fix oops Greg KH
                   ` (27 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Stern

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

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

From: Alan Stern <stern@rowland.harvard.edu>

commit cceffe9348f93188d7811bda95924d4bd3040d0f upstream.

This patch (as1332) removes an unneeded and annoying debugging message
announcing all USB uevent constructions.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/driver.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -691,9 +691,6 @@ static int usb_uevent(struct device *dev
 {
 	struct usb_device *usb_dev;
 
-	/* driver is often null here; dev_dbg() would oops */
-	pr_debug("usb %s: uevent\n", dev_name(dev));
-
 	if (is_usb_device(dev)) {
 		usb_dev = to_usb_device(dev);
 	} else if (is_usb_interface(dev)) {
@@ -705,6 +702,7 @@ static int usb_uevent(struct device *dev
 	}
 
 	if (usb_dev->devnum < 0) {
+		/* driver is often null here; dev_dbg() would oops */
 		pr_debug("usb %s: already deleted?\n", dev_name(dev));
 		return -ENODEV;
 	}



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

* [patch 097/123] USB: Move hcd free_dev call into usb_disconnect to fix oops
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (95 preceding siblings ...)
  2010-03-13  0:13 ` [patch 096/123] USB: remove debugging message for uevent constructions Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 098/123] USB: f_mass_storage: fix crash on bind() error Greg KH
                   ` (26 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Herbert Xu

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

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

From: Herbert Xu <herbert@gondor.apana.org.au>

commit f7410ced7f931bb1ad79d1336412cf7b7a33cb14 upstream.

USB: Move hcd free_dev call into usb_disconnect

I found a way to oops the kernel:

1. Open a USB device through devio.
2. Remove the hcd module in the host kernel.
3. Close the devio file descriptor.

The problem is that closing the file descriptor does usb_release_dev
as it is the last reference.  usb_release_dev then tries to invoke
the hcd free_dev function (or rather dereferencing the hcd driver
struct).  This causes an oops as the hcd driver has already been
unloaded so the struct is gone.

This patch tries to fix this by bringing the free_dev call earlier
and into usb_disconnect.  I have verified that repeating the
above steps no longer crashes with this patch applied.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/hcd.h |    2 +-
 drivers/usb/core/hub.c |   12 ++++++++++++
 drivers/usb/core/usb.c |    3 ---
 3 files changed, 13 insertions(+), 4 deletions(-)

--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -248,7 +248,7 @@ struct hc_driver {
 	/* xHCI specific functions */
 		/* Called by usb_alloc_dev to alloc HC device structures */
 	int	(*alloc_dev)(struct usb_hcd *, struct usb_device *);
-		/* Called by usb_release_dev to free HC device structures */
+		/* Called by usb_disconnect to free HC device structures */
 	void	(*free_dev)(struct usb_hcd *, struct usb_device *);
 
 	/* Bandwidth computation functions */
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1554,6 +1554,15 @@ static inline void usb_stop_pm(struct us
 
 #endif
 
+static void hub_free_dev(struct usb_device *udev)
+{
+	struct usb_hcd *hcd = bus_to_hcd(udev->bus);
+
+	/* Root hubs aren't real devices, so don't free HCD resources */
+	if (hcd->driver->free_dev && udev->parent)
+		hcd->driver->free_dev(hcd, udev);
+}
+
 /**
  * usb_disconnect - disconnect a device (usbcore-internal)
  * @pdev: pointer to device being disconnected
@@ -1624,6 +1633,8 @@ void usb_disconnect(struct usb_device **
 
 	usb_stop_pm(udev);
 
+	hub_free_dev(udev);
+
 	put_device(&udev->dev);
 }
 
@@ -3191,6 +3202,7 @@ loop_disable:
 loop:
 		usb_ep0_reinit(udev);
 		release_address(udev);
+		hub_free_dev(udev);
 		usb_put_dev(udev);
 		if ((status == -ENOTCONN) || (status == -ENOTSUPP))
 			break;
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -228,9 +228,6 @@ static void usb_release_dev(struct devic
 	hcd = bus_to_hcd(udev->bus);
 
 	usb_destroy_configuration(udev);
-	/* Root hubs aren't real devices, so don't free HCD resources */
-	if (hcd->driver->free_dev && udev->parent)
-		hcd->driver->free_dev(hcd, udev);
 	usb_put_hcd(hcd);
 	kfree(udev->product);
 	kfree(udev->manufacturer);



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

* [patch 098/123] USB: f_mass_storage: fix crash on bind() error
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (96 preceding siblings ...)
  2010-03-13  0:13 ` [patch 097/123] USB: Move hcd free_dev call into usb_disconnect to fix oops Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 099/123] USB: add new ftdi_sio device ids Greg KH
                   ` (25 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Peter Korsgaard, Michal Nazarewicz

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

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

From: Peter Korsgaard <jacmet@sunsite.dk>

commit 8e7e61dfbf1ec6418bf89505980b158a8d00d877 upstream.

init_completion() hasn't been called yet and the thread isn't created
if we end up here, so don't call complete() on thread_notifier.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/gadget/f_mass_storage.c |    1 -
 1 file changed, 1 deletion(-)

--- a/drivers/usb/gadget/f_mass_storage.c
+++ b/drivers/usb/gadget/f_mass_storage.c
@@ -2852,7 +2852,6 @@ error_release:
 	/* Call fsg_common_release() directly, ref might be not
 	 * initialised */
 	fsg_common_release(&common->ref);
-	complete(&common->thread_notifier);
 	return ERR_PTR(rc);
 }
 



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

* [patch 099/123] USB: add new ftdi_sio device ids
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (97 preceding siblings ...)
  2010-03-13  0:13 ` [patch 098/123] USB: f_mass_storage: fix crash on bind() error Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 100/123] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
                   ` (24 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Mitchell Solomon

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

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

From: Mitchell Solomon <mitchjs@rush2112.net>

commit 9714080d20f2ec4b671a06ce69367d91fa9e227e upstream.

PID patch for my products

Signed-off-by: Mitchell Solomon <mitchjs@rush2112.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    4 ++++
 drivers/usb/serial/ftdi_sio_ids.h |    8 ++++++++
 2 files changed, 12 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -737,6 +737,10 @@ static struct usb_device_id id_table_com
 		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
 	{ USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
 	{ USB_DEVICE(FTDI_VID, HAMEG_HO870_PID) },
+	{ USB_DEVICE(FTDI_VID, MJSG_GENERIC_PID) },
+	{ USB_DEVICE(FTDI_VID, MJSG_SR_RADIO_PID) },
+	{ USB_DEVICE(FTDI_VID, MJSG_HD_RADIO_PID) },
+	{ USB_DEVICE(FTDI_VID, MJSG_XM_RADIO_PID) },
 	{ },					/* Optional parameter entry */
 	{ }					/* Terminating entry */
 };
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1002,3 +1002,11 @@
 #define EVO_8U232AM_PID	0x02FF	/* Evolution robotics RCM2 (FT232AM)*/
 #define EVO_HYBRID_PID		0x0302	/* Evolution robotics RCM4 PID (FT232BM)*/
 #define EVO_RCM4_PID		0x0303	/* Evolution robotics RCM4 PID */
+
+/*
+ * MJS Gadgets HD Radio / XM Radio / Sirius Radio interfaces (using VID 0x0403)
+ */
+#define MJSG_GENERIC_PID	0x9378
+#define MJSG_SR_RADIO_PID	0x9379
+#define MJSG_XM_RADIO_PID	0x937A
+#define MJSG_HD_RADIO_PID	0x937C



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

* [patch 100/123] USB: serial: ftdi: add CONTEC vendor and product id
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (98 preceding siblings ...)
  2010-03-13  0:13 ` [patch 099/123] USB: add new ftdi_sio device ids Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 101/123] USB: cp210x: Add 81E8 (Zephyr Bioharness) Greg KH
                   ` (23 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Daniel Sangorrin, Andreas Mohr

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

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

From: Daniel Sangorrin <daniel.sangorrin@gmail.com>

commit 46b72d78cb022714c89a9ebc00b9581b550cfca7 upstream.

This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds
identifiers for CONTEC USB serial converter. I tested it
with the device COM-1(USB)H

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c     |    1 +
 drivers/usb/serial/ftdi_sio_ids.h |    7 +++++++
 2 files changed, 8 insertions(+)

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -614,6 +614,7 @@ static struct usb_device_id id_table_com
 	{ USB_DEVICE(FTDI_VID, FTDI_OCEANIC_PID) },
 	{ USB_DEVICE(TTI_VID, TTI_QL355P_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_RM_CANVIEW_PID) },
+	{ USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) },
 	{ USB_DEVICE(BANDB_VID, BANDB_USOTL4_PID) },
 	{ USB_DEVICE(BANDB_VID, BANDB_USTL4_PID) },
 	{ USB_DEVICE(BANDB_VID, BANDB_USO9ML2_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -494,6 +494,13 @@
 #define RATOC_PRODUCT_ID_USB60F	0xb020
 
 /*
+ * Contec products (http://www.contec.com)
+ * Submitted by Daniel Sangorrin
+ */
+#define CONTEC_VID		0x06CE	/* Vendor ID */
+#define CONTEC_COM1USBH_PID	0x8311	/* COM-1(USB)H */
+
+/*
  * Definitions for B&B Electronics products.
  */
 #define BANDB_VID		0x0856	/* B&B Electronics Vendor ID */



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

* [patch 101/123] USB: cp210x: Add 81E8 (Zephyr Bioharness)
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (99 preceding siblings ...)
  2010-03-13  0:13 ` [patch 100/123] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 102/123] USB: unusual_devs: Add support for multiple Option 3G sticks Greg KH
                   ` (22 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Cox

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

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

From: Alan Cox <alan@linux.intel.com>

commit bd07c551aae5d2200c7b195142e5ba63f26424da upstream.

As reported in
http://bugzilla.kernel.org/show_bug.cgi?id=10980

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/cp210x.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -91,11 +91,12 @@ static struct usb_device_id id_table []
 	{ USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
 	{ USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
 	{ USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
+	{ USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */
 	{ USB_DEVICE(0x10C4, 0x81F2) }, /* C1007 HF band RFID controller */
 	{ USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */
 	{ USB_DEVICE(0x10C4, 0x822B) }, /* Modem EDGE(GSM) Comander 2 */
 	{ USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demostration module */
-	{ USB_DEVICE(0x10c4, 0x8293) }, /* Telegesys ETRX2USB */
+	{ USB_DEVICE(0x10C4, 0x8293) }, /* Telegesys ETRX2USB */
 	{ USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
 	{ USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
 	{ USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */



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

* [patch 102/123] USB: unusual_devs: Add support for multiple Option 3G sticks
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (100 preceding siblings ...)
  2010-03-13  0:13 ` [patch 101/123] USB: cp210x: Add 81E8 (Zephyr Bioharness) Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 103/123] drm/i915: Use a dmi quirk to skip a broken SDVO TV output Greg KH
                   ` (21 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Jan Dumon, Phil Dibowitz

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

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

From: Jan Dumon <j.dumon@option.com>

commit 46216e4fbe8c62059b5440dec0b236f386248a41 upstream.

Enable the SD-Card interface on multiple Option 3G sticks.
The unusual_devs.h entry is necessary because the device descriptor is
vendor-specific. That prevents usb-storage from binding to it as an interface
driver.

Signed-off-by: Jan Dumon <j.dumon@option.com>
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/storage/unusual_devs.h |   88 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 86 insertions(+), 2 deletions(-)

--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1147,8 +1147,8 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0
 		0 ),
 
 /* Reported by Jan Dumon <j.dumon@option.com>
- * This device (wrongly) has a vendor-specific device descriptor.
- * The entry is needed so usb-storage can bind to it's mass-storage
+ * These devices (wrongly) have a vendor-specific device descriptor.
+ * These entries are needed so usb-storage can bind to their mass-storage
  * interface as an interface driver */
 UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000,
 		"Option",
@@ -1156,6 +1156,90 @@ UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		0 ),
 
+UNUSUAL_DEV( 0x0af0, 0x7701, 0x0000, 0x0000,
+		"Option",
+		"GI 0451 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x7706, 0x0000, 0x0000,
+		"Option",
+		"GI 0451 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x7901, 0x0000, 0x0000,
+		"Option",
+		"GI 0452 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x7A01, 0x0000, 0x0000,
+		"Option",
+		"GI 0461 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x7A05, 0x0000, 0x0000,
+		"Option",
+		"GI 0461 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x8300, 0x0000, 0x0000,
+		"Option",
+		"GI 033x SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x8302, 0x0000, 0x0000,
+		"Option",
+		"GI 033x SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0x8304, 0x0000, 0x0000,
+		"Option",
+		"GI 033x SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xc100, 0x0000, 0x0000,
+		"Option",
+		"GI 070x SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xd057, 0x0000, 0x0000,
+		"Option",
+		"GI 1505 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xd058, 0x0000, 0x0000,
+		"Option",
+		"GI 1509 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xd157, 0x0000, 0x0000,
+		"Option",
+		"GI 1515 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xd257, 0x0000, 0x0000,
+		"Option",
+		"GI 1215 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
+UNUSUAL_DEV( 0x0af0, 0xd357, 0x0000, 0x0000,
+		"Option",
+		"GI 1505 SD-Card",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		0 ),
+
 /* Reported by Ben Efros <ben@pc-doctor.com> */
 UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
 		"Seagate",



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

* [patch 103/123] drm/i915: Use a dmi quirk to skip a broken SDVO TV output.
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (101 preceding siblings ...)
  2010-03-13  0:13 ` [patch 102/123] USB: unusual_devs: Add support for multiple Option 3G sticks Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 104/123] drm/ttm: handle OOM in ttm_tt_swapout Greg KH
                   ` (20 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Zhao Yakui, Eric Anholt

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

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

From: Zhao Yakui <yakui.zhao@intel.com>

commit 6070a4a928f8c92b9fae7d6717ebbb05f425d6b2 upstream.

This IBM system has a multi-function SDVO card that reports both VGA
and TV, but the system has no TV connector.  The TV connector always
reported as connected, which would lead to poor modesetting choices.

https://bugs.freedesktop.org/show_bug.cgi?id=25787

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Vance <liangghv@sg.ibm.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/i915/intel_sdvo.c |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -35,6 +35,7 @@
 #include "i915_drm.h"
 #include "i915_drv.h"
 #include "intel_sdvo_regs.h"
+#include <linux/dmi.h>
 
 static char *tv_format_names[] = {
 	"NTSC_M"   , "NTSC_J"  , "NTSC_443",
@@ -2283,6 +2284,25 @@ intel_sdvo_get_slave_addr(struct drm_dev
 		return 0x72;
 }
 
+static int intel_sdvo_bad_tv_callback(const struct dmi_system_id *id)
+{
+	DRM_DEBUG_KMS("Ignoring bad SDVO TV connector for %s\n", id->ident);
+	return 1;
+}
+
+static struct dmi_system_id intel_sdvo_bad_tv[] = {
+	{
+		.callback = intel_sdvo_bad_tv_callback,
+		.ident = "IntelG45/ICH10R/DME1737",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "IBM CORPORATION"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "4800784"),
+		},
+	},
+
+	{ }	/* terminating entry */
+};
+
 static bool
 intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
 {
@@ -2323,7 +2343,8 @@ intel_sdvo_output_setup(struct intel_out
 					(1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
 					(1 << INTEL_ANALOG_CLONE_BIT);
 		}
-	} else if (flags & SDVO_OUTPUT_SVID0) {
+	} else if ((flags & SDVO_OUTPUT_SVID0) &&
+		   !dmi_check_system(intel_sdvo_bad_tv)) {
 
 		sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
 		encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;



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

* [patch 104/123] drm/ttm: handle OOM in ttm_tt_swapout
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (102 preceding siblings ...)
  2010-03-13  0:13 ` [patch 103/123] drm/i915: Use a dmi quirk to skip a broken SDVO TV output Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 105/123] drm/radeon/kms/atom: fix shr/shl ops Greg KH
                   ` (19 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Maarten Maathuis,
	Thomas Hellstrom, Dave Airlie

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

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

From: Maarten Maathuis <madman2003@gmail.com>

commit 290e55056ec3d25c72088628245d8cae037b30db upstream.

- Without this change I get a general protection fault.
- Also use PTR_ERR where applicable.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/ttm/ttm_tt.c |   18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -480,7 +480,7 @@ static int ttm_tt_swapin(struct ttm_tt *
 	void *from_virtual;
 	void *to_virtual;
 	int i;
-	int ret;
+	int ret = -ENOMEM;
 
 	if (ttm->page_flags & TTM_PAGE_FLAG_USER) {
 		ret = ttm_tt_set_user(ttm, ttm->tsk, ttm->start,
@@ -499,8 +499,10 @@ static int ttm_tt_swapin(struct ttm_tt *
 
 	for (i = 0; i < ttm->num_pages; ++i) {
 		from_page = read_mapping_page(swap_space, i, NULL);
-		if (IS_ERR(from_page))
+		if (IS_ERR(from_page)) {
+			ret = PTR_ERR(from_page);
 			goto out_err;
+		}
 		to_page = __ttm_tt_get_page(ttm, i);
 		if (unlikely(to_page == NULL))
 			goto out_err;
@@ -523,7 +525,7 @@ static int ttm_tt_swapin(struct ttm_tt *
 	return 0;
 out_err:
 	ttm_tt_free_alloced_pages(ttm);
-	return -ENOMEM;
+	return ret;
 }
 
 int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
@@ -535,6 +537,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
 	void *from_virtual;
 	void *to_virtual;
 	int i;
+	int ret = -ENOMEM;
 
 	BUG_ON(ttm->state != tt_unbound && ttm->state != tt_unpopulated);
 	BUG_ON(ttm->caching_state != tt_cached);
@@ -557,7 +560,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
 						0);
 		if (unlikely(IS_ERR(swap_storage))) {
 			printk(KERN_ERR "Failed allocating swap storage.\n");
-			return -ENOMEM;
+			return PTR_ERR(swap_storage);
 		}
 	} else
 		swap_storage = persistant_swap_storage;
@@ -569,9 +572,10 @@ int ttm_tt_swapout(struct ttm_tt *ttm, s
 		if (unlikely(from_page == NULL))
 			continue;
 		to_page = read_mapping_page(swap_space, i, NULL);
-		if (unlikely(to_page == NULL))
+		if (unlikely(IS_ERR(to_page))) {
+			ret = PTR_ERR(to_page);
 			goto out_err;
-
+		}
 		preempt_disable();
 		from_virtual = kmap_atomic(from_page, KM_USER0);
 		to_virtual = kmap_atomic(to_page, KM_USER1);
@@ -595,5 +599,5 @@ out_err:
 	if (!persistant_swap_storage)
 		fput(swap_storage);
 
-	return -ENOMEM;
+	return ret;
 }



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

* [patch 105/123] drm/radeon/kms/atom: fix shr/shl ops
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (103 preceding siblings ...)
  2010-03-13  0:13 ` [patch 104/123] drm/ttm: handle OOM in ttm_tt_swapout Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 106/123] sunrpc: remove unnecessary svc_xprt_put Greg KH
                   ` (18 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie

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

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

From: Alex Deucher <alexdeucher@gmail.com>

commit 6a8a2d702b33c6ed5c789f21b4e89fdf221f01ca upstream.

The whole attribute table is valid for
shr/shl ops.

Fixes fdo bug 26668

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/gpu/drm/radeon/atom.c |    4 ----
 1 file changed, 4 deletions(-)

--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -881,8 +881,6 @@ static void atom_op_shl(atom_exec_contex
 	uint8_t attr = U8((*ptr)++), shift;
 	uint32_t saved, dst;
 	int dptr = *ptr;
-	attr &= 0x38;
-	attr |= atom_def_dst[attr >> 3] << 6;
 	SDEBUG("   dst: ");
 	dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
 	shift = atom_get_src(ctx, attr, ptr);
@@ -897,8 +895,6 @@ static void atom_op_shr(atom_exec_contex
 	uint8_t attr = U8((*ptr)++), shift;
 	uint32_t saved, dst;
 	int dptr = *ptr;
-	attr &= 0x38;
-	attr |= atom_def_dst[attr >> 3] << 6;
 	SDEBUG("   dst: ");
 	dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
 	shift = atom_get_src(ctx, attr, ptr);



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

* [patch 106/123] sunrpc: remove unnecessary svc_xprt_put
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (104 preceding siblings ...)
  2010-03-13  0:13 ` [patch 105/123] drm/radeon/kms/atom: fix shr/shl ops Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 107/123] SUNRPC: Handle EINVAL error returns from the TCP connect operation Greg KH
                   ` (17 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Tom Tucker, NeilBrown,
	J. Bruce Fields

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

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

From: Neil Brown <neilb@suse.de>

commit ab1b18f70a007ea6caeb007d269abb75b131a410 upstream.

The 'struct svc_deferred_req's on the xpt_deferred queue do not
own a reference to the owning xprt.  This is seen in svc_revisit
which is where things are added to this queue.  dr->xprt is set to
NULL and the reference to the xprt it put.

So when this list is cleaned up in svc_delete_xprt, we mustn't
put the reference.

Also, replace the 'for' with a 'while' which is arguably
simpler and more likely to compile efficiently.

Cc: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/sunrpc/svc_xprt.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -889,11 +889,8 @@ void svc_delete_xprt(struct svc_xprt *xp
 	if (test_bit(XPT_TEMP, &xprt->xpt_flags))
 		serv->sv_tmpcnt--;
 
-	for (dr = svc_deferred_dequeue(xprt); dr;
-	     dr = svc_deferred_dequeue(xprt)) {
-		svc_xprt_put(xprt);
+	while ((dr = svc_deferred_dequeue(xprt)) != NULL)
 		kfree(dr);
-	}
 
 	svc_xprt_put(xprt);
 	spin_unlock_bh(&serv->sv_lock);



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

* [patch 107/123] SUNRPC: Handle EINVAL error returns from the TCP connect operation
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (105 preceding siblings ...)
  2010-03-13  0:13 ` [patch 106/123] sunrpc: remove unnecessary svc_xprt_put Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13   ` Greg KH
                   ` (16 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Trond Myklebust

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

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

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit 9fcfe0c83c3b04a759cde6b8c5f961237f17808b upstream.

This can, for instance, happen if the user specifies a link local IPv6
address.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 net/sunrpc/xprtsock.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1912,6 +1912,11 @@ static void xs_tcp_setup_socket(struct r
 	case -EALREADY:
 		xprt_clear_connecting(xprt);
 		return;
+	case -EINVAL:
+		/* Happens, for instance, if the user specified a link
+		 * local IPv6 address without a scope-id.
+		 */
+		goto out;
 	}
 out_eagain:
 	status = -EAGAIN;



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

* [patch 108/123] s3cmci: s3cmci_card_present: Use no_detect to decide whether there is a card detect pin
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
@ 2010-03-13  0:13   ` Greg KH
  2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
                     ` (122 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Lars-Peter Clausen,
	Ben Dooks, linux-mmc

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

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit dc2ed552804f3a2ae41c0ffe4bc09879ec8f7396 upstream.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
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>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1179,7 +1179,7 @@ static int s3cmci_card_present(struct mm
 	struct s3c24xx_mci_pdata *pdata = host->pdata;
 	int ret;
 
-	if (pdata->gpio_detect == 0)
+	if (pdata->no_detect)
 		return -ENOSYS;
 
 	ret = gpio_get_value(pdata->gpio_detect) ? 0 : 1;



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

* [patch 108/123] s3cmci: s3cmci_card_present: Use no_detect to decide whether there is a card detect pin
@ 2010-03-13  0:13   ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Lars-Peter Clausen,
	Ben Dooks, linux-mmc

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

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit dc2ed552804f3a2ae41c0ffe4bc09879ec8f7396 upstream.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
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>

---
 drivers/mmc/host/s3cmci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1179,7 +1179,7 @@ static int s3cmci_card_present(struct mm
 	struct s3c24xx_mci_pdata *pdata = host->pdata;
 	int ret;
 
-	if (pdata->gpio_detect == 0)
+	if (pdata->no_detect)
 		return -ENOSYS;
 
 	ret = gpio_get_value(pdata->gpio_detect) ? 0 : 1;

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

* [patch 109/123] s3cmci: initialize default platform data no_wprotect and no_detect with 1
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
@ 2010-03-13  0:13   ` Greg KH
  2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
                     ` (122 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Lars-Peter Clausen,
	Ben Dooks, linux-mmc

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

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit c212808a1ba6bfba489006399b8152a047305acf upstream.

If no platform_data was givin to the device it's going to use it's default
platform data struct which has all fields initialized to zero.  As a
result the driver is going to try to request gpio0 both as write protect
and card detect pin.  Which of course will fail and makes the driver
unusable

Previously to the introduction of no_wprotect and no_detect the behavior
was to assume that if no platform data was given there is no write protect
or card detect pin.  This patch restores that behavior.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
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>

---
 drivers/mmc/host/s3cmci.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1360,6 +1360,8 @@ static struct mmc_host_ops s3cmci_ops =
 static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
 	/* This is currently here to avoid a number of if (host->pdata)
 	 * checks. Any zero fields to ensure reasonable defaults are picked. */
+	 .no_wprotect = 1,
+	 .no_detect = 1,
 };
 
 #ifdef CONFIG_CPU_FREQ



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

* [patch 109/123] s3cmci: initialize default platform data no_wprotect and no_detect with 1
@ 2010-03-13  0:13   ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Lars-Peter Clausen,
	Ben Dooks, linux-mmc

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

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit c212808a1ba6bfba489006399b8152a047305acf upstream.

If no platform_data was givin to the device it's going to use it's default
platform data struct which has all fields initialized to zero.  As a
result the driver is going to try to request gpio0 both as write protect
and card detect pin.  Which of course will fail and makes the driver
unusable

Previously to the introduction of no_wprotect and no_detect the behavior
was to assume that if no platform data was given there is no write protect
or card detect pin.  This patch restores that behavior.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
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>

---
 drivers/mmc/host/s3cmci.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1360,6 +1360,8 @@ static struct mmc_host_ops s3cmci_ops =
 static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
 	/* This is currently here to avoid a number of if (host->pdata)
 	 * checks. Any zero fields to ensure reasonable defaults are picked. */
+	 .no_wprotect = 1,
+	 .no_detect = 1,
 };
 
 #ifdef CONFIG_CPU_FREQ

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

* [patch 110/123] scripts/get_maintainer.pl: fix possible infinite loop
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (108 preceding siblings ...)
  2010-03-13  0:13   ` Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 111/123] rtc-coh901331: fix braces in resume code Greg KH
                   ` (13 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Joe Perches

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

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

From: Joe Perches <joe@perches.com>

commit 3c840c18bcd8efb37f1a565e83a9509e1ea5d105 upstream.

If MAINTAINERS section entries are misformatted, it was possible to have
an infinite loop.

Correct the defect by always moving the index to the end of section + 1

Also, exit check for exclude as soon as possible.

Signed-off-by: Joe Perches <joe@perches.com>
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>

---
 scripts/get_maintainer.pl |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -314,6 +314,7 @@ foreach my $file (@files) {
 		if ($type eq 'X') {
 		    if (file_match_pattern($file, $value)) {
 			$exclude = 1;
+			last;
 		    }
 		}
 	    }
@@ -340,8 +341,7 @@ foreach my $file (@files) {
 	    }
 	}
 
-	$tvi += ($end - $start);
-
+	$tvi = $end + 1;
     }
 
     foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) {



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

* [patch 111/123] rtc-coh901331: fix braces in resume code
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (109 preceding siblings ...)
  2010-03-13  0:13 ` [patch 110/123] scripts/get_maintainer.pl: fix possible infinite loop Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 112/123] NFS: Fix an allocation-under-spinlock bug Greg KH
                   ` (12 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, James Hogan, Linus Walleij,
	Alessandro Zummo

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

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

From: James Hogan <james@albanarts.com>

commit 5a98c04d78c896d52baef20ffc11f6d1ba6eb786 upstream.

The else part of the if statement is indented but does not have braces
around it. It clearly should since it uses clk_enable and clk_disable
which are supposed to balance.

Signed-off-by: James Hogan <james@albanarts.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
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>

---
 drivers/rtc/rtc-coh901331.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/rtc/rtc-coh901331.c
+++ b/drivers/rtc/rtc-coh901331.c
@@ -271,12 +271,13 @@ static int coh901331_resume(struct platf
 {
 	struct coh901331_port *rtap = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(&pdev->dev))
+	if (device_may_wakeup(&pdev->dev)) {
 		disable_irq_wake(rtap->irq);
-	else
+	} else {
 		clk_enable(rtap->clk);
 		writel(rtap->irqmaskstore, rtap->virtbase + COH901331_IRQ_MASK);
 		clk_disable(rtap->clk);
+	}
 	return 0;
 }
 #else



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

* [patch 112/123] NFS: Fix an allocation-under-spinlock bug
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (110 preceding siblings ...)
  2010-03-13  0:13 ` [patch 111/123] rtc-coh901331: fix braces in resume code Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 113/123] dm: free dm_io before bio_endio not after Greg KH
                   ` (11 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Trond Myklebust

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

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

From: Trond Myklebust <Trond.Myklebust@netapp.com>

commit ebed9203b68a4f333ce5d17e874b26c3afcfeff1 upstream.

sunrpc_cache_update() will always call detail->update() from inside the
detail->hash_lock, so it cannot allocate memory.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/nfs/dns_resolve.c |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -36,6 +36,19 @@ struct nfs_dns_ent {
 };
 
 
+static void nfs_dns_ent_update(struct cache_head *cnew,
+		struct cache_head *ckey)
+{
+	struct nfs_dns_ent *new;
+	struct nfs_dns_ent *key;
+
+	new = container_of(cnew, struct nfs_dns_ent, h);
+	key = container_of(ckey, struct nfs_dns_ent, h);
+
+	memcpy(&new->addr, &key->addr, key->addrlen);
+	new->addrlen = key->addrlen;
+}
+
 static void nfs_dns_ent_init(struct cache_head *cnew,
 		struct cache_head *ckey)
 {
@@ -49,8 +62,7 @@ static void nfs_dns_ent_init(struct cach
 	new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL);
 	if (new->hostname) {
 		new->namelen = key->namelen;
-		memcpy(&new->addr, &key->addr, key->addrlen);
-		new->addrlen = key->addrlen;
+		nfs_dns_ent_update(cnew, ckey);
 	} else {
 		new->namelen = 0;
 		new->addrlen = 0;
@@ -234,7 +246,7 @@ static struct cache_detail nfs_dns_resol
 	.cache_show = nfs_dns_show,
 	.match = nfs_dns_match,
 	.init = nfs_dns_ent_init,
-	.update = nfs_dns_ent_init,
+	.update = nfs_dns_ent_update,
 	.alloc = nfs_dns_ent_alloc,
 };
 



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

* [patch 113/123] dm: free dm_io before bio_endio not after
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (111 preceding siblings ...)
  2010-03-13  0:13 ` [patch 112/123] NFS: Fix an allocation-under-spinlock bug Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 114/123] dm ioctl: only issue uevent on resume if state changed Greg KH
                   ` (10 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Mikulas Patocka, Alasdair G Kergon

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

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

From: Mikulas Patocka <mpatocka@redhat.com>

commit a97f925a32aad2a37971d7bfb657006acf04e42d upstream.

Free the dm_io structure before calling bio_endio() instead of after it,
to ensure that the io_pool containing it is not referenced after it is
freed.

This partially fixes a problem described here
  https://www.redhat.com/archives/dm-devel/2010-February/msg00109.html

thread 1:
bio_endio(bio, io_error);
/* scheduling happens */
					thread 2:
					close the device
					remove the device
thread 1:
free_io(md, io);

Thread 2, when removing the device, sees non-empty md->io_pool (because the
io hasn't been freed by thread 1 yet) and may crash with BUG in mempool_free.
Thread 1 may also crash, when freeing into a nonexisting mempool.

To fix this we must make sure that bio_endio() is the last call and
the md structure is not accessed afterwards.

There is another bio_endio in process_barrier, but it is called from the thread
and the thread is destroyed prior to freeing the mempools, so this call is
not affected by the bug.

A similar bug exists with module unloads - the module may be unloaded
immediately after bio_endio - but that is more difficult to fix.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

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

--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -635,8 +635,10 @@ static void dec_pending(struct dm_io *io
 			if (!md->barrier_error && io_error != -EOPNOTSUPP)
 				md->barrier_error = io_error;
 			end_io_acct(io);
+			free_io(md, io);
 		} else {
 			end_io_acct(io);
+			free_io(md, io);
 
 			if (io_error != DM_ENDIO_REQUEUE) {
 				trace_block_bio_complete(md->queue, bio);
@@ -644,8 +646,6 @@ static void dec_pending(struct dm_io *io
 				bio_endio(bio, io_error);
 			}
 		}
-
-		free_io(md, io);
 	}
 }
 



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

* [patch 114/123] dm ioctl: only issue uevent on resume if state changed
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (112 preceding siblings ...)
  2010-03-13  0:13 ` [patch 113/123] dm: free dm_io before bio_endio not after Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-22 18:43   ` Mike Snitzer
  2010-03-13  0:13 ` [patch 115/123] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction Greg KH
                   ` (9 subsequent siblings)
  123 siblings, 1 reply; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Dave Wysochanski,
	Mike Snitzer, Alasdair G Kergon

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

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

From: Mike Snitzer <snitzer@redhat.com>

commit 0f3649a9e305ea22eb196a84a2d7520afcaa6060 upstream.

Only issue a uevent on a resume if the state of the device changed,
i.e. if it was suspended and/or its table was replaced.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/md/dm-ioctl.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -897,16 +897,17 @@ static int do_resume(struct dm_ioctl *pa
 			set_disk_ro(dm_disk(md), 1);
 	}
 
-	if (dm_suspended_md(md))
+	if (dm_suspended_md(md)) {
 		r = dm_resume(md);
+		if (!r)
+			dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
+	}
 
 	if (old_map)
 		dm_table_destroy(old_map);
 
-	if (!r) {
-		dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
+	if (!r)
 		r = __dev_status(md, param);
-	}
 
 	dm_put(md);
 	return r;



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

* [patch 115/123] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (113 preceding siblings ...)
  2010-03-13  0:13 ` [patch 114/123] dm ioctl: only issue uevent on resume if state changed Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 116/123] KVM: x86 emulator: Add group8 instruction decoding Greg KH
                   ` (8 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Sheng Yang, Avi Kivity

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

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

From: Sheng Yang <sheng@linux.intel.com>

commit 59708670b639bff00f92e519df1ae14da240e919 upstream.

We don't support these instructions, but guest can execute them even if the
feature('monitor') haven't been exposed in CPUID. So we would trap and inject
a #UD if guest try this way.

Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/include/asm/vmx.h |    1 +
 arch/x86/kvm/vmx.c         |   10 ++++++++++
 2 files changed, 11 insertions(+)

--- a/arch/x86/include/asm/vmx.h
+++ b/arch/x86/include/asm/vmx.h
@@ -251,6 +251,7 @@ enum vmcs_field {
 #define EXIT_REASON_MSR_READ            31
 #define EXIT_REASON_MSR_WRITE           32
 #define EXIT_REASON_MWAIT_INSTRUCTION   36
+#define EXIT_REASON_MONITOR_INSTRUCTION 39
 #define EXIT_REASON_PAUSE_INSTRUCTION   40
 #define EXIT_REASON_MCE_DURING_VMENTRY	 41
 #define EXIT_REASON_TPR_BELOW_THRESHOLD 43
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1224,6 +1224,8 @@ static __init int setup_vmcs_config(stru
 	      CPU_BASED_USE_IO_BITMAPS |
 	      CPU_BASED_MOV_DR_EXITING |
 	      CPU_BASED_USE_TSC_OFFSETING |
+	      CPU_BASED_MWAIT_EXITING |
+	      CPU_BASED_MONITOR_EXITING |
 	      CPU_BASED_INVLPG_EXITING;
 	opt = CPU_BASED_TPR_SHADOW |
 	      CPU_BASED_USE_MSR_BITMAPS |
@@ -3416,6 +3418,12 @@ static int handle_pause(struct kvm_vcpu
 	return 1;
 }
 
+static int handle_invalid_op(struct kvm_vcpu *vcpu)
+{
+	kvm_queue_exception(vcpu, UD_VECTOR);
+	return 1;
+}
+
 /*
  * The exit handlers return 1 if the exit was handled fully and guest execution
  * may resume.  Otherwise they set the kvm_run parameter to indicate what needs
@@ -3453,6 +3461,8 @@ static int (*kvm_vmx_exit_handlers[])(st
 	[EXIT_REASON_EPT_VIOLATION]	      = handle_ept_violation,
 	[EXIT_REASON_EPT_MISCONFIG]           = handle_ept_misconfig,
 	[EXIT_REASON_PAUSE_INSTRUCTION]       = handle_pause,
+	[EXIT_REASON_MWAIT_INSTRUCTION]	      = handle_invalid_op,
+	[EXIT_REASON_MONITOR_INSTRUCTION]     = handle_invalid_op,
 };
 
 static const int kvm_vmx_max_exit_handlers =



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

* [patch 116/123] KVM: x86 emulator: Add group8 instruction decoding
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (114 preceding siblings ...)
  2010-03-13  0:13 ` [patch 115/123] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 117/123] KVM: x86 emulator: Forbid modifying CS segment register by mov instruction Greg KH
                   ` (7 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Gleb Natapov, Avi Kivity

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

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

From: Gleb Natapov <gleb@redhat.com>

commit 2db2c2eb6226e30f8059b82512a1364db98da8e3 upstream.

Use groups mechanism to decode 0F BA instructions.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/emulate.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -88,6 +88,7 @@
 enum {
 	Group1_80, Group1_81, Group1_82, Group1_83,
 	Group1A, Group3_Byte, Group3, Group4, Group5, Group7,
+	Group8,
 };
 
 static u32 opcode_table[256] = {
@@ -267,7 +268,7 @@ static u32 twobyte_table[256] = {
 	0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
 	    DstReg | SrcMem16 | ModRM | Mov,
 	/* 0xB8 - 0xBF */
-	0, 0, DstMem | SrcImmByte | ModRM, DstMem | SrcReg | ModRM | BitOp,
+	0, 0, Group | Group8, DstMem | SrcReg | ModRM | BitOp,
 	0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
 	    DstReg | SrcMem16 | ModRM | Mov,
 	/* 0xC0 - 0xCF */
@@ -323,6 +324,10 @@ static u32 group_table[] = {
 	0, 0, ModRM | SrcMem, ModRM | SrcMem,
 	SrcNone | ModRM | DstMem | Mov, 0,
 	SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp,
+	[Group8*8] =
+	0, 0, 0, 0,
+	DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
+	DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
 };
 
 static u32 group2_table[] = {



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

* [patch 117/123] KVM: x86 emulator: Forbid modifying CS segment register by mov instruction
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (115 preceding siblings ...)
  2010-03-13  0:13 ` [patch 116/123] KVM: x86 emulator: Add group8 instruction decoding Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 118/123] KVM: x86 emulator: Add group9 instruction decoding Greg KH
                   ` (6 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Gleb Natapov, Avi Kivity

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

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

From: Gleb Natapov <gleb@redhat.com>

commit 8b9f44140bc4afd2698413cd9960c3912168ee91 upstream.

Inject #UD if guest attempts to do so. This is in accordance to Intel
SDM.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/emulate.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -1987,6 +1987,12 @@ special_insn:
 		int err;
 
 		sel = c->src.val;
+
+		if (c->modrm_reg == VCPU_SREG_CS) {
+			kvm_queue_exception(ctxt->vcpu, UD_VECTOR);
+			goto done;
+		}
+
 		if (c->modrm_reg == VCPU_SREG_SS)
 			toggle_interruptibility(ctxt, X86_SHADOW_INT_MOV_SS);
 



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

* [patch 118/123] KVM: x86 emulator: Add group9 instruction decoding
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (116 preceding siblings ...)
  2010-03-13  0:13 ` [patch 117/123] KVM: x86 emulator: Forbid modifying CS segment register by mov instruction Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 119/123] KVM: x86 emulator: Check CPL level during privilege instruction emulation Greg KH
                   ` (5 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Gleb Natapov, Avi Kivity

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

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

From: Gleb Natapov <gleb@redhat.com>

commit 60a29d4ea4e7b6b95d9391ebc8625b0426f3a363 upstream.

Use groups mechanism to decode 0F C7 instructions.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/emulate.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -88,7 +88,7 @@
 enum {
 	Group1_80, Group1_81, Group1_82, Group1_83,
 	Group1A, Group3_Byte, Group3, Group4, Group5, Group7,
-	Group8,
+	Group8, Group9,
 };
 
 static u32 opcode_table[256] = {
@@ -272,7 +272,8 @@ static u32 twobyte_table[256] = {
 	0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov,
 	    DstReg | SrcMem16 | ModRM | Mov,
 	/* 0xC0 - 0xCF */
-	0, 0, 0, DstMem | SrcReg | ModRM | Mov, 0, 0, 0, ImplicitOps | ModRM,
+	0, 0, 0, DstMem | SrcReg | ModRM | Mov,
+	0, 0, 0, Group | GroupDual | Group9,
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0xD0 - 0xDF */
 	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -328,6 +329,8 @@ static u32 group_table[] = {
 	0, 0, 0, 0,
 	DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
 	DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
+	[Group9*8] =
+	0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0,
 };
 
 static u32 group2_table[] = {
@@ -335,6 +338,8 @@ static u32 group2_table[] = {
 	SrcNone | ModRM, 0, 0, SrcNone | ModRM,
 	SrcNone | ModRM | DstMem | Mov, 0,
 	SrcMem16 | ModRM | Mov, 0,
+	[Group9*8] =
+	0, 0, 0, 0, 0, 0, 0, 0,
 };
 
 /* EFLAGS bit definitions. */



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

* [patch 119/123] KVM: x86 emulator: Check CPL level during privilege instruction emulation
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (117 preceding siblings ...)
  2010-03-13  0:13 ` [patch 118/123] KVM: x86 emulator: Add group9 instruction decoding Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 120/123] sched: Fix sched_mv_power_savings for !SMT Greg KH
                   ` (4 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Gleb Natapov, Avi Kivity

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

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

From: Gleb Natapov <gleb@redhat.com>

commit e92805ac1228626c59c865f2f4e9059b9fb8c97b upstream.

Add CPL checking in case emulator is tricked into emulating
privilege instruction from userspace.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 arch/x86/kvm/emulate.c |   35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)

--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -76,6 +76,7 @@
 #define GroupDual   (1<<15)     /* Alternate decoding of mod == 3 */
 #define GroupMask   0xff        /* Group number stored in bits 0:7 */
 /* Misc flags */
+#define Priv        (1<<27) /* instruction generates #GP if current CPL != 0 */
 #define No64	    (1<<28)
 /* Source 2 operand type */
 #define Src2None    (0<<29)
@@ -211,7 +212,7 @@ static u32 opcode_table[256] = {
 	SrcNone | ByteOp | ImplicitOps, SrcNone | ImplicitOps,
 	/* 0xF0 - 0xF7 */
 	0, 0, 0, 0,
-	ImplicitOps, ImplicitOps, Group | Group3_Byte, Group | Group3,
+	ImplicitOps | Priv, ImplicitOps, Group | Group3_Byte, Group | Group3,
 	/* 0xF8 - 0xFF */
 	ImplicitOps, 0, ImplicitOps, ImplicitOps,
 	ImplicitOps, ImplicitOps, Group | Group4, Group | Group5,
@@ -219,16 +220,20 @@ static u32 opcode_table[256] = {
 
 static u32 twobyte_table[256] = {
 	/* 0x00 - 0x0F */
-	0, Group | GroupDual | Group7, 0, 0, 0, ImplicitOps, ImplicitOps, 0,
-	ImplicitOps, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0,
+	0, Group | GroupDual | Group7, 0, 0,
+	0, ImplicitOps, ImplicitOps | Priv, 0,
+	ImplicitOps | Priv, ImplicitOps | Priv, 0, 0,
+	0, ImplicitOps | ModRM, 0, 0,
 	/* 0x10 - 0x1F */
 	0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x20 - 0x2F */
-	ModRM | ImplicitOps, ModRM, ModRM | ImplicitOps, ModRM, 0, 0, 0, 0,
+	ModRM | ImplicitOps | Priv, ModRM | Priv,
+	ModRM | ImplicitOps | Priv, ModRM | Priv,
+	0, 0, 0, 0,
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x30 - 0x3F */
-	ImplicitOps, 0, ImplicitOps, 0,
-	ImplicitOps, ImplicitOps, 0, 0,
+	ImplicitOps | Priv, 0, ImplicitOps | Priv, 0,
+	ImplicitOps, ImplicitOps | Priv, 0, 0,
 	0, 0, 0, 0, 0, 0, 0, 0,
 	/* 0x40 - 0x47 */
 	DstReg | SrcMem | ModRM | Mov, DstReg | SrcMem | ModRM | Mov,
@@ -322,9 +327,9 @@ static u32 group_table[] = {
 	SrcMem | ModRM | Stack, 0,
 	SrcMem | ModRM | Stack, 0, SrcMem | ModRM | Stack, 0,
 	[Group7*8] =
-	0, 0, ModRM | SrcMem, ModRM | SrcMem,
+	0, 0, ModRM | SrcMem | Priv, ModRM | SrcMem | Priv,
 	SrcNone | ModRM | DstMem | Mov, 0,
-	SrcMem16 | ModRM | Mov, SrcMem | ModRM | ByteOp,
+	SrcMem16 | ModRM | Mov | Priv, SrcMem | ModRM | ByteOp | Priv,
 	[Group8*8] =
 	0, 0, 0, 0,
 	DstMem | SrcImmByte | ModRM, DstMem | SrcImmByte | ModRM,
@@ -335,7 +340,7 @@ static u32 group_table[] = {
 
 static u32 group2_table[] = {
 	[Group7*8] =
-	SrcNone | ModRM, 0, 0, SrcNone | ModRM,
+	SrcNone | ModRM | Priv, 0, 0, SrcNone | ModRM,
 	SrcNone | ModRM | DstMem | Mov, 0,
 	SrcMem16 | ModRM | Mov, 0,
 	[Group9*8] =
@@ -1650,12 +1655,6 @@ emulate_sysexit(struct x86_emulate_ctxt
 		return -1;
 	}
 
-	/* sysexit must be called from CPL 0 */
-	if (kvm_x86_ops->get_cpl(ctxt->vcpu) != 0) {
-		kvm_inject_gp(ctxt->vcpu, 0);
-		return -1;
-	}
-
 	setup_syscalls_segments(ctxt, &cs, &ss);
 
 	if ((c->rex_prefix & 0x8) != 0x0)
@@ -1719,6 +1718,12 @@ x86_emulate_insn(struct x86_emulate_ctxt
 	memcpy(c->regs, ctxt->vcpu->arch.regs, sizeof c->regs);
 	saved_eip = c->eip;
 
+	/* Privileged instruction can be executed only in CPL=0 */
+	if ((c->d & Priv) && kvm_x86_ops->get_cpl(ctxt->vcpu)) {
+		kvm_inject_gp(ctxt->vcpu, 0);
+		goto done;
+	}
+
 	if (((c->d & ModRM) && (c->modrm_mod != 3)) || (c->d & MemAbs))
 		memop = c->modrm_ea;
 



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

* [patch 120/123] sched: Fix sched_mv_power_savings for !SMT
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (118 preceding siblings ...)
  2010-03-13  0:13 ` [patch 119/123] KVM: x86 emulator: Check CPL level during privilege instruction emulation Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-15  5:51   ` Vaidyanathan Srinivasan
  2010-03-13  0:13 ` [patch 121/123] sched: Fix SMT scheduler regression in find_busiest_queue() Greg KH
                   ` (3 subsequent siblings)
  123 siblings, 1 reply; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Vaidyanathan Srinivasan,
	Peter Zijlstra, Thomas Gleixner

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

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

From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>

commit 28f5318167adf23b16c844b9c2253f355cb21796 upstream.

Fix for sched_mc_powersavigs for pre-Nehalem platforms.
Child sched domain should clear SD_PREFER_SIBLING if parent will have
SD_POWERSAVINGS_BALANCE because they are contradicting.

Sets the flags correctly based on sched_mc_power_savings.

Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100208100555.GD2931@dirshya.in.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/sched.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -878,7 +878,10 @@ static inline int sd_balance_for_mc_powe
 	if (sched_smt_power_savings)
 		return SD_POWERSAVINGS_BALANCE;
 
-	return SD_PREFER_SIBLING;
+	if (!sched_mc_power_savings)
+		return SD_PREFER_SIBLING;
+
+	return 0;
 }
 
 static inline int sd_balance_for_package_power(void)



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

* [patch 121/123] sched: Fix SMT scheduler regression in find_busiest_queue()
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (119 preceding siblings ...)
  2010-03-13  0:13 ` [patch 120/123] sched: Fix sched_mv_power_savings for !SMT Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 122/123] sched: Dont use possibly stale sched_class Greg KH
                   ` (2 subsequent siblings)
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Suresh Siddha,
	Peter Zijlstra, Thomas Gleixner

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

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

From: Suresh Siddha <suresh.b.siddha@intel.com>

commit 9000f05c6d1607f79c0deacf42b09693be673f4c upstream.

Fix a SMT scheduler performance regression that is leading to a scenario
where SMT threads in one core are completely idle while both the SMT threads
in another core (on the same socket) are busy.

This is caused by this commit (with the problematic code highlighted)

   commit bdb94aa5dbd8b55e75f5a50b61312fe589e2c2d1
   Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
   Date:   Tue Sep 1 10:34:38 2009 +0200

   sched: Try to deal with low capacity

   @@ -4203,15 +4223,18 @@ find_busiest_queue()
   ...
	for_each_cpu(i, sched_group_cpus(group)) {
   +	unsigned long power = power_of(i);

   ...

   -	wl = weighted_cpuload(i);
   +	wl = weighted_cpuload(i) * SCHED_LOAD_SCALE;
   +	wl /= power;

   -	if (rq->nr_running == 1 && wl > imbalance)
   +	if (capacity && rq->nr_running == 1 && wl > imbalance)
		continue;

On a SMT system, power of the HT logical cpu will be 589 and
the scheduler load imbalance (for scenarios like the one mentioned above)
can be approximately 1024 (SCHED_LOAD_SCALE). The above change of scaling
the weighted load with the power will result in "wl > imbalance" and
ultimately resulting in find_busiest_queue() return NULL, causing
load_balance() to think that the load is well balanced. But infact
one of the tasks can be moved to the idle core for optimal performance.

We don't need to use the weighted load (wl) scaled by the cpu power to
compare with  imabalance. In that condition, we already know there is only a
single task "rq->nr_running == 1" and the comparison between imbalance,
wl is to make sure that we select the correct priority thread which matches
imbalance. So we really need to compare the imabalnce with the original
weighted load of the cpu and not the scaled load.

But in other conditions where we want the most hammered(busiest) cpu, we can
use scaled load to ensure that we consider the cpu power in addition to the
actual load on that cpu, so that we can move the load away from the
guy that is getting most hammered with respect to the actual capacity,
as compared with the rest of the cpu's in that busiest group.

Fix it.

Reported-by: Ma Ling <ling.ma@intel.com>
Initial-Analysis-by: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1266023662.2808.118.camel@sbs-t61.sc.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/sched.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4119,12 +4119,23 @@ find_busiest_queue(struct sched_group *g
 			continue;
 
 		rq = cpu_rq(i);
-		wl = weighted_cpuload(i) * SCHED_LOAD_SCALE;
-		wl /= power;
+		wl = weighted_cpuload(i);
 
+		/*
+		 * When comparing with imbalance, use weighted_cpuload()
+		 * which is not scaled with the cpu power.
+		 */
 		if (capacity && rq->nr_running == 1 && wl > imbalance)
 			continue;
 
+		/*
+		 * For the load comparisons with the other cpu's, consider
+		 * the weighted_cpuload() scaled with the cpu power, so that
+		 * the load can be moved away from the cpu that is potentially
+		 * running at a lower capacity.
+		 */
+		wl = (wl * SCHED_LOAD_SCALE) / power;
+
 		if (wl > max_load) {
 			max_load = wl;
 			busiest = rq;



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

* [patch 122/123] sched: Dont use possibly stale sched_class
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (120 preceding siblings ...)
  2010-03-13  0:13 ` [patch 121/123] sched: Fix SMT scheduler regression in find_busiest_queue() Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  0:13 ` [patch 123/123] x86, mm: Allow highmem user page tables to be disabled at boot time Greg KH
  2010-03-13  2:58 ` [patch 000/123] 2.6.33.1-stable review Grant Coady
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Peter Zijlstra

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit 83ab0aa0d5623d823444db82c3b3c34d7ec364ae upstream.

setscheduler() saves task->sched_class outside of the rq->lock held
region for a check after the setscheduler changes have become
effective. That might result in checking a stale value.

rtmutex_setprio() has the same problem, though it is protected by
p->pi_lock against setscheduler(), but for correctness sake (and to
avoid bad examples) it needs to be fixed as well.

Retrieve task->sched_class inside of the rq->lock held region.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 kernel/sched.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6065,7 +6065,7 @@ void rt_mutex_setprio(struct task_struct
 	unsigned long flags;
 	int oldprio, on_rq, running;
 	struct rq *rq;
-	const struct sched_class *prev_class = p->sched_class;
+	const struct sched_class *prev_class;
 
 	BUG_ON(prio < 0 || prio > MAX_PRIO);
 
@@ -6073,6 +6073,7 @@ void rt_mutex_setprio(struct task_struct
 	update_rq_clock(rq);
 
 	oldprio = p->prio;
+	prev_class = p->sched_class;
 	on_rq = p->se.on_rq;
 	running = task_current(rq, p);
 	if (on_rq)
@@ -6292,7 +6293,7 @@ static int __sched_setscheduler(struct t
 {
 	int retval, oldprio, oldpolicy = -1, on_rq, running;
 	unsigned long flags;
-	const struct sched_class *prev_class = p->sched_class;
+	const struct sched_class *prev_class;
 	struct rq *rq;
 	int reset_on_fork;
 
@@ -6406,6 +6407,7 @@ recheck:
 	p->sched_reset_on_fork = reset_on_fork;
 
 	oldprio = p->prio;
+	prev_class = p->sched_class;
 	__setscheduler(rq, p, policy, param->sched_priority);
 
 	if (running)



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

* [patch 123/123] x86, mm: Allow highmem user page tables to be disabled at boot time
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (121 preceding siblings ...)
  2010-03-13  0:13 ` [patch 122/123] sched: Dont use possibly stale sched_class Greg KH
@ 2010-03-13  0:13 ` Greg KH
  2010-03-13  2:58 ` [patch 000/123] 2.6.33.1-stable review Grant Coady
  123 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:13 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: stable-review, torvalds, akpm, alan, Ian Campbell, H. Peter Anvin

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

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

From: Ian Campbell <ian.campbell@citrix.com>

commit 14315592009c17035cac81f4954d5a1f4d71e489 upstream.

Distros generally (I looked at Debian, RHEL5 and SLES11) seem to
enable CONFIG_HIGHPTE for any x86 configuration which has highmem
enabled. This means that the overhead applies even to machines which
have a fairly modest amount of high memory and which therefore do not
really benefit from allocating PTEs in high memory but still pay the
price of the additional mapping operations.

Running kernbench on a 4G box I found that with CONFIG_HIGHPTE=y but
no actual highptes being allocated there was a reduction in system
time used from 59.737s to 55.9s.

With CONFIG_HIGHPTE=y and highmem PTEs being allocated:
  Average Optimal load -j 4 Run (std deviation):
  Elapsed Time 175.396 (0.238914)
  User Time 515.983 (5.85019)
  System Time 59.737 (1.26727)
  Percent CPU 263.8 (71.6796)
  Context Switches 39989.7 (4672.64)
  Sleeps 42617.7 (246.307)

With CONFIG_HIGHPTE=y but with no highmem PTEs being allocated:
  Average Optimal load -j 4 Run (std deviation):
  Elapsed Time 174.278 (0.831968)
  User Time 515.659 (6.07012)
  System Time 55.9 (1.07799)
  Percent CPU 263.8 (71.266)
  Context Switches 39929.6 (4485.13)
  Sleeps 42583.7 (373.039)

This patch allows the user to control the allocation of PTEs in
highmem from the command line ("userpte=nohigh") but retains the
status-quo as the default.

It is possible that some simple heuristic could be developed which
allows auto-tuning of this option however I don't have a sufficiently
large machine available to me to perform any particularly meaningful
experiments. We could probably handwave up an argument for a threshold
at 16G of total RAM.

Assuming 768M of lowmem we have 196608 potential lowmem PTE
pages. Each page can map 2M of RAM in a PAE-enabled configuration,
meaning a maximum of 384G of RAM could potentially be mapped using
lowmem PTEs.

Even allowing generous factor of 10 to account for other required
lowmem allocations, generous slop to account for page sharing (which
reduces the total amount of RAM mappable by a given number of PT
pages) and other innacuracies in the estimations it would seem that
even a 32G machine would not have a particularly pressing need for
highmem PTEs. I think 32G could be considered to be at the upper bound
of what might be sensible on a 32 bit machine (although I think in
practice 64G is still supported).

It's seems questionable if HIGHPTE is even a win for any amount of RAM
you would sensibly run a 32 bit kernel on rather than going 64 bit.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
LKML-Reference: <1266403090-20162-1-git-send-email-ian.campbell@citrix.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/kernel-parameters.txt |    7 +++++++
 arch/x86/include/asm/pgalloc.h      |    5 +++++
 arch/x86/mm/pgtable.c               |   31 ++++++++++++++++++++++++++-----
 3 files changed, 38 insertions(+), 5 deletions(-)

--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2703,6 +2703,13 @@ and is between 256 and 4096 characters.
 					medium is write-protected).
 			Example: quirks=0419:aaf5:rl,0421:0433:rc
 
+	userpte=
+			[X86] Flags controlling user PTE allocations.
+
+				nohigh = do not allocate PTE pages in
+					HIGHMEM regardless of setting
+					of CONFIG_HIGHPTE.
+
 	vdso=		[X86,SH]
 			vdso=2: enable compat VDSO (default with COMPAT_VDSO)
 			vdso=1: enable VDSO (default)
--- a/arch/x86/include/asm/pgalloc.h
+++ b/arch/x86/include/asm/pgalloc.h
@@ -23,6 +23,11 @@ static inline void paravirt_release_pud(
 #endif
 
 /*
+ * Flags to use when allocating a user page table page.
+ */
+extern gfp_t __userpte_alloc_gfp;
+
+/*
  * Allocate and free page tables.
  */
 extern pgd_t *pgd_alloc(struct mm_struct *);
--- a/arch/x86/mm/pgtable.c
+++ b/arch/x86/mm/pgtable.c
@@ -6,6 +6,14 @@
 
 #define PGALLOC_GFP GFP_KERNEL | __GFP_NOTRACK | __GFP_REPEAT | __GFP_ZERO
 
+#ifdef CONFIG_HIGHPTE
+#define PGALLOC_USER_GFP __GFP_HIGHMEM
+#else
+#define PGALLOC_USER_GFP 0
+#endif
+
+gfp_t __userpte_alloc_gfp = PGALLOC_GFP | PGALLOC_USER_GFP;
+
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
 	return (pte_t *)__get_free_page(PGALLOC_GFP);
@@ -15,16 +23,29 @@ pgtable_t pte_alloc_one(struct mm_struct
 {
 	struct page *pte;
 
-#ifdef CONFIG_HIGHPTE
-	pte = alloc_pages(PGALLOC_GFP | __GFP_HIGHMEM, 0);
-#else
-	pte = alloc_pages(PGALLOC_GFP, 0);
-#endif
+	pte = alloc_pages(__userpte_alloc_gfp, 0);
 	if (pte)
 		pgtable_page_ctor(pte);
 	return pte;
 }
 
+static int __init setup_userpte(char *arg)
+{
+	if (!arg)
+		return -EINVAL;
+
+	/*
+	 * "userpte=nohigh" disables allocation of user pagetables in
+	 * high memory.
+	 */
+	if (strcmp(arg, "nohigh") == 0)
+		__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
+	else
+		return -EINVAL;
+	return 0;
+}
+early_param("userpte", setup_userpte);
+
 void ___pte_free_tlb(struct mmu_gather *tlb, struct page *pte)
 {
 	pgtable_page_dtor(pte);



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

* [patch 000/123] 2.6.33.1-stable review
@ 2010-03-13  0:16 Greg KH
  2010-03-13  0:11 ` [patch 001/123] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Greg KH
                   ` (123 more replies)
  0 siblings, 124 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  0:16 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan

This is the start of the stable review cycle for the 2.6.31.1 release.
There are 123 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.

Note, I still have a number of outstanding patches that have been
submitted for this release.  But due to the size, I figured it was best
to get this release out as soon as possible and then catch up next week
with the next batch of patches.  So don't worry if you don't see a patch
you have asked to be included that is not in here.

Responses should be made by Monday, March 15, 00:00:00 UTC.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.33.1-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

 Documentation/kernel-parameters.txt     |    7 +
 Documentation/laptops/thinkpad-acpi.txt |    4 +
 Makefile                                |    2 +-
 arch/Kconfig                            |    2 -
 arch/x86/ia32/ia32_aout.c               |    1 -
 arch/x86/include/asm/io_apic.h          |    1 +
 arch/x86/include/asm/pgalloc.h          |    5 +
 arch/x86/include/asm/uv/uv_hub.h        |    3 +-
 arch/x86/include/asm/vmx.h              |    1 +
 arch/x86/kernel/acpi/boot.c             |    9 +-
 arch/x86/kernel/apic/io_apic.c          |   68 ++-
 arch/x86/kernel/reboot.c                |    8 +
 arch/x86/kvm/emulate.c                  |   55 ++-
 arch/x86/kvm/vmx.c                      |   10 +
 arch/x86/mm/pgtable.c                   |   31 +-
 arch/x86/oprofile/nmi_int.c             |   17 +-
 arch/x86/oprofile/op_model_amd.c        |   42 +--
 arch/x86/oprofile/op_model_p4.c         |    6 -
 arch/x86/oprofile/op_model_ppro.c       |    6 +-
 arch/x86/pci/mmconfig-shared.c          |   17 +-
 arch/x86/xen/enlighten.c                |    7 +
 arch/x86/xen/mmu.c                      |   11 +-
 drivers/ata/ahci.c                      |   12 +-
 drivers/ata/pata_hpt3x2n.c              |   20 +-
 drivers/base/core.c                     |   13 +-
 drivers/base/devtmpfs.c                 |   13 +
 drivers/char/tty_ldisc.c                |   50 +-
 drivers/clocksource/sh_cmt.c            |   32 +-
 drivers/clocksource/sh_mtu2.c           |    6 +-
 drivers/clocksource/sh_tmu.c            |    6 +-
 drivers/gpio/cs5535-gpio.c              |    4 +-
 drivers/gpio/wm831x-gpio.c              |   22 +-
 drivers/gpu/drm/i915/intel_lvds.c       |    7 +
 drivers/gpu/drm/i915/intel_sdvo.c       |   23 +-
 drivers/gpu/drm/radeon/atom.c           |    4 -
 drivers/gpu/drm/ttm/ttm_tt.c            |   18 +-
 drivers/hid/hid-core.c                  |    2 -
 drivers/hid/hid-ids.h                   |    4 -
 drivers/hid/usbhid/hid-core.c           |   28 +-
 drivers/hid/usbhid/usbhid.h             |    2 +
 drivers/hwmon/ams/ams-core.c            |   11 +-
 drivers/hwmon/ams/ams-i2c.c             |    2 +
 drivers/hwmon/ams/ams-pmu.c             |    2 +
 drivers/hwmon/ams/ams.h                 |    1 +
 drivers/hwmon/fschmd.c                  |   15 +-
 drivers/hwmon/tmp401.c                  |    7 +-
 drivers/hwmon/tmp421.c                  |   24 +-
 drivers/macintosh/therm_adt746x.c       |   34 +-
 drivers/md/dm-ioctl.c                   |    9 +-
 drivers/md/dm.c                         |    4 +-
 drivers/media/dvb/dvb-core/dvb_net.c    |    1 +
 drivers/media/video/gspca/mr97310a.c    |    6 +
 drivers/media/video/soc_mediabus.c      |    3 +-
 drivers/mmc/host/s3cmci.c               |    4 +-
 drivers/net/wireless/airo.c             |   34 +-
 drivers/net/wireless/ath/ath5k/ath5k.h  |    1 -
 drivers/net/wireless/ath/ath5k/base.c   |   26 +-
 drivers/net/wireless/ath/ath9k/beacon.c |    9 +-
 drivers/net/wireless/ath/ath9k/hw.c     |   10 +
 drivers/net/wireless/ath/ath9k/main.c   |    6 +-
 drivers/net/wireless/ath/ath9k/phy.h    |    3 +
 drivers/net/wireless/ath/ath9k/rc.c     |   15 +-
 drivers/net/wireless/b43/main.c         |    3 +-
 drivers/net/wireless/b43legacy/main.c   |    2 +
 drivers/net/wireless/p54/p54pci.c       |   18 +-
 drivers/net/wireless/p54/p54usb.c       |    1 +
 drivers/pci/hotplug/ibmphp_ebda.c       |   13 +-
 drivers/platform/x86/Kconfig            |   10 +-
 drivers/platform/x86/eeepc-laptop.c     |    3 +-
 drivers/platform/x86/thinkpad_acpi.c    |  116 +++--
 drivers/rtc/class.c                     |    1 +
 drivers/rtc/rtc-coh901331.c             |    5 +-
 drivers/scsi/mpt2sas/mpt2sas_scsih.c    |   17 +
 drivers/scsi/qla1280.c                  |    4 +
 drivers/serial/imx.c                    |    6 +-
 drivers/staging/Kconfig                 |    2 -
 drivers/staging/Makefile                |    1 -
 drivers/staging/hv/vmbus_drv.c          |   30 +
 drivers/staging/mimio/Kconfig           |   10 -
 drivers/staging/mimio/Makefile          |    1 -
 drivers/staging/mimio/mimio.c           |  914 -------------------------------
 drivers/staging/pohmelfs/inode.c        |   20 +-
 drivers/staging/pohmelfs/netfs.h        |    3 +
 drivers/staging/wlan-ng/Kconfig         |    1 +
 drivers/usb/core/driver.c               |    4 +-
 drivers/usb/core/hcd.c                  |    2 +-
 drivers/usb/core/hcd.h                  |    2 +-
 drivers/usb/core/hub.c                  |   12 +
 drivers/usb/core/usb.c                  |    3 -
 drivers/usb/gadget/f_mass_storage.c     |    1 -
 drivers/usb/host/ohci-pnx4008.c         |    6 +-
 drivers/usb/host/uhci-hcd.c             |    1 +
 drivers/usb/host/xhci-ext-caps.h        |    7 +-
 drivers/usb/serial/cp210x.c             |    3 +-
 drivers/usb/serial/ftdi_sio.c           |    5 +
 drivers/usb/serial/ftdi_sio_ids.h       |   15 +
 drivers/usb/serial/sierra.c             |   19 +-
 drivers/usb/storage/unusual_devs.h      |   88 +++-
 drivers/video/sunxvr500.c               |    1 +
 fs/file_table.c                         |    2 +
 fs/nfs/dns_resolve.c                    |   18 +-
 fs/nfsd/nfs4state.c                     |    2 +
 fs/ocfs2/aops.c                         |    5 +-
 fs/sysfs/dir.c                          |   82 ++-
 include/linux/fs.h                      |    3 +
 include/linux/irq.h                     |    2 +
 include/linux/netdevice.h               |    2 +-
 include/linux/perf_event.h              |    5 +-
 include/linux/sched.h                   |    5 +-
 include/linux/skbuff.h                  |   13 +-
 include/linux/syscalls.h                |    6 +-
 include/trace/ftrace.h                  |    3 +-
 kernel/irq/chip.c                       |   52 ++-
 kernel/perf_event.c                     |  134 ++++--
 kernel/power/snapshot.c                 |    2 +-
 kernel/sched.c                          |   21 +-
 kernel/trace/trace.h                    |    3 +-
 mm/fadvise.c                            |   10 +-
 mm/readahead.c                          |    6 +
 mm/slab.c                               |    6 +-
 net/core/scm.c                          |    2 +
 net/mac80211/agg-tx.c                   |    3 +-
 net/mac80211/rx.c                       |    8 +
 net/mac80211/tx.c                       |    5 +-
 net/netfilter/xt_recent.c               |    4 +-
 net/sunrpc/svc_xprt.c                   |    5 +-
 net/sunrpc/xprtsock.c                   |    5 +
 scripts/get_maintainer.pl               |    4 +-
 security/integrity/ima/ima_iint.c       |    3 +-
 security/selinux/ss/ebitmap.c           |    2 +-
 sound/core/pcm_native.c                 |    8 +-
 sound/pci/hda/hda_intel.c               |    3 +
 sound/pci/hda/patch_analog.c            |    2 +-
 sound/pci/via82xx.c                     |    6 +
 sound/soc/codecs/ak4104.c               |    6 +-
 sound/usb/usbaudio.c                    |   32 ++
 sound/usb/usbmidi.c                     |   24 +-
 sound/usb/usbquirks.h                   |   27 +
 tools/perf/util/symbol.c                |    2 +-
 139 files changed, 1281 insertions(+), 1408 deletions(-)

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

* Re: [patch 000/123] 2.6.33.1-stable review
  2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
                   ` (122 preceding siblings ...)
  2010-03-13  0:13 ` [patch 123/123] x86, mm: Allow highmem user page tables to be disabled at boot time Greg KH
@ 2010-03-13  2:58 ` Grant Coady
  2010-03-13  3:27   ` Greg KH
  123 siblings, 1 reply; 140+ messages in thread
From: Grant Coady @ 2010-03-13  2:58 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan

On Fri, 12 Mar 2010 16:16:18 -0800, you wrote:

>This is the start of the stable review cycle for the 2.6.31.1 release.
>There are 123 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.
>
>Note, I still have a number of outstanding patches that have been
>submitted for this release.  But due to the size, I figured it was best
>to get this release out as soon as possible and then catch up next week
>with the next batch of patches.  So don't worry if you don't see a patch
>you have asked to be included that is not in here.
>
>Responses should be made by Monday, March 15, 00:00:00 UTC.
>Anything received after that time might be too late.
>
>The whole patch series can be found in one patch at:
>	kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.33.1-rc1.gz
>and the diffstat can be found below.

Hi Greg,

Boots okay here :)

Grant.
-- 
http://bugs.id.au/

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

* Re: [patch 000/123] 2.6.33.1-stable review
  2010-03-13  2:58 ` [patch 000/123] 2.6.33.1-stable review Grant Coady
@ 2010-03-13  3:27   ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-13  3:27 UTC (permalink / raw)
  To: Grant Coady; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan

On Sat, Mar 13, 2010 at 01:58:42PM +1100, Grant Coady wrote:
> On Fri, 12 Mar 2010 16:16:18 -0800, you wrote:
> 
> >This is the start of the stable review cycle for the 2.6.31.1 release.
> >There are 123 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.
> >
> >Note, I still have a number of outstanding patches that have been
> >submitted for this release.  But due to the size, I figured it was best
> >to get this release out as soon as possible and then catch up next week
> >with the next batch of patches.  So don't worry if you don't see a patch
> >you have asked to be included that is not in here.
> >
> >Responses should be made by Monday, March 15, 00:00:00 UTC.
> >Anything received after that time might be too late.
> >
> >The whole patch series can be found in one patch at:
> >	kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.33.1-rc1.gz
> >and the diffstat can be found below.
> 
> Hi Greg,
> 
> Boots okay here :)

Wonderful, thanks for testing.

greg k-h

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

* Re: [patch 120/123] sched: Fix sched_mv_power_savings for !SMT
  2010-03-13  0:13 ` [patch 120/123] sched: Fix sched_mv_power_savings for !SMT Greg KH
@ 2010-03-15  5:51   ` Vaidyanathan Srinivasan
  2010-03-15 14:27     ` Greg KH
  0 siblings, 1 reply; 140+ messages in thread
From: Vaidyanathan Srinivasan @ 2010-03-15  5:51 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Peter Zijlstra, Thomas Gleixner

* Greg KH <gregkh@suse.de> [2010-03-12 16:13:38]:

> 2.6.33-stable review patch.  If anyone has any objections, please let me know.

Hi Greg,

Thanks to pulling this into .32 and .33-stable.  Please correct the
subject and commit message to sched_mc_power_savings when you apply.
The term sched_mv_power_savings is a typo.

"sched: Fix sched_mc_power_savings for !SMT"

Thanks,
Vaidy

Ref: http://lkml.org/lkml/2010/2/16/230

> -----------------
> 
> From: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> 
> commit 28f5318167adf23b16c844b9c2253f355cb21796 upstream.
> 
> Fix for sched_mc_powersavigs for pre-Nehalem platforms.
> Child sched domain should clear SD_PREFER_SIBLING if parent will have
> SD_POWERSAVINGS_BALANCE because they are contradicting.
> 
> Sets the flags correctly based on sched_mc_power_savings.
> 
> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> LKML-Reference: <20100208100555.GD2931@dirshya.in.ibm.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  include/linux/sched.h |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -878,7 +878,10 @@ static inline int sd_balance_for_mc_powe
>  	if (sched_smt_power_savings)
>  		return SD_POWERSAVINGS_BALANCE;
> 
> -	return SD_PREFER_SIBLING;
> +	if (!sched_mc_power_savings)
> +		return SD_PREFER_SIBLING;
> +
> +	return 0;
>  }
> 
>  static inline int sd_balance_for_package_power(void)
> 
> 

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

* Re: [patch 120/123] sched: Fix sched_mv_power_savings for !SMT
  2010-03-15  5:51   ` Vaidyanathan Srinivasan
@ 2010-03-15 14:27     ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-15 14:27 UTC (permalink / raw)
  To: Vaidyanathan Srinivasan
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Peter Zijlstra, Thomas Gleixner

On Mon, Mar 15, 2010 at 11:21:18AM +0530, Vaidyanathan Srinivasan wrote:
> * Greg KH <gregkh@suse.de> [2010-03-12 16:13:38]:
> 
> > 2.6.33-stable review patch.  If anyone has any objections, please let me know.
> 
> Hi Greg,
> 
> Thanks to pulling this into .32 and .33-stable.  Please correct the
> subject and commit message to sched_mc_power_savings when you apply.
> The term sched_mv_power_savings is a typo.
> 
> "sched: Fix sched_mc_power_savings for !SMT"

I'd prefer to leave it as-is as that is what the subject is in Linus's
tree.

thanks,

greg k-h

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

* Re: [Stable-review] [patch 109/123] s3cmci: initialize default platform data no_wprotect and no_detect with 1
  2010-03-13  0:13   ` Greg KH
  (?)
@ 2010-03-15 16:16   ` Stefan Bader
  2010-03-30 21:17     ` Greg KH
  -1 siblings, 1 reply; 140+ messages in thread
From: Stefan Bader @ 2010-03-15 16:16 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, Lars-Peter Clausen, linux-mmc, Ben Dooks,
	akpm, torvalds, stable-review, alan

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

This patch does not seem to be applied to 2.6.32.y while the one

[patch 108/123] s3cmci: s3cmci_card_present: Use no_detect to decide whether
there is a card detect pin

is. I checked and the only problem that makes it fail is the uncorrected comment
above (revised patch attached)

Stefan

[-- Attachment #2: 0001-s3cmci-initialize-default-platform-data-no_wprotect-.patch --]
[-- Type: text/x-diff, Size: 1685 bytes --]

>From e1dcbab5755d0ffa32f8f6cbeb562c769872bd7c Mon Sep 17 00:00:00 2001
From: Lars-Peter Clausen <lars@metafoo.de>
Date: Fri, 5 Mar 2010 13:43:35 -0800
Subject: [PATCH] s3cmci: initialize default platform data no_wprotect and no_detect with 1

commit c212808a1ba6bfba489006399b8152a047305acf upstream.

If no platform_data was givin to the device it's going to use it's default
platform data struct which has all fields initialized to zero.  As a
result the driver is going to try to request gpio0 both as write protect
and card detect pin.  Which of course will fail and makes the driver
unusable

Previously to the introduction of no_wprotect and no_detect the behavior
was to assume that if no platform data was given there is no write protect
or card detect pin.  This patch restores that behavior.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.org>
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>
---
 drivers/mmc/host/s3cmci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c
index f31f05a..fba147c 100644
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1361,6 +1361,8 @@ static struct mmc_host_ops s3cmci_ops = {
 static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
 	/* This is currently here to avoid a number of if (host->pdata)
 	 * checks. Any zero fields to ensure reaonable defaults are picked. */
+	.no_wprotect = 1,
+	.no_detect = 1,
 };
 
 #ifdef CONFIG_CPU_FREQ
-- 
1.6.3.3


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

* Re: [Stable-review] [patch 070/123] ath9k: re-enable ps by default  for new single chip families
  2010-03-13  0:12 ` [patch 070/123] ath9k: re-enable ps by default for new single chip families Greg KH
@ 2010-03-16  1:04   ` Luis R. Rodriguez
  2010-03-19  0:04     ` [stable] " Greg KH
  0 siblings, 1 reply; 140+ messages in thread
From: Luis R. Rodriguez @ 2010-03-16  1:04 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, torvalds, John W. Linville,
	Kristoffer Ericson, Justin P. Mattock, akpm, Peter Stuge,
	stable-review, alan

On Fri, Mar 12, 2010 at 5:12 PM, Greg KH <gregkh@suse.de> wrote:
> 2.6.33-stable review patch.  If anyone has any objections, please let me know.

This was intended for 2.6.32 as well. Thanks

  Luis
> -----------------
>
> From: Luis R. Rodriguez <lrodriguez@atheros.com>
>
> commit 14acdde6e527950f66c084dbf19bad6fbfcaeedc upstream.
>
> The newer single chip hardware family of chipsets have not been
> experiencing issues with power saving set by default with recent
> fixes merged (even into stable). The remaining issues are only
> reported with AR5416 and since enabling PS by default can increase
> power savings considerably best to take advantage of that feature
> as this has been tested properly.
>
> For more details on this issue see the bug report:
>
> http://bugzilla.kernel.org/show_bug.cgi?id=14267
>
> We leave AR5416 with PS disabled by default, that seems to require
> some more work.
>
> Cc: Peter Stuge <peter@stuge.se>
> Cc: Justin P. Mattock  <justinmattock@gmail.com>
> Cc: Kristoffer Ericson <kristoffer.ericson@gmail.com>
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
>  drivers/net/wireless/ath/ath9k/main.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -1849,6 +1849,8 @@ bad_free_hw:
>
>  void ath_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
>  {
> +       struct ath_hw *ah = sc->sc_ah;
> +
>        hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
>                IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
>                IEEE80211_HW_SIGNAL_DBM |
> @@ -1866,7 +1868,8 @@ void ath_set_hw_capab(struct ath_softc *
>                BIT(NL80211_IFTYPE_ADHOC) |
>                BIT(NL80211_IFTYPE_MESH_POINT);
>
> -       hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
> +       if (AR_SREV_5416(ah))
> +               hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
>
>        hw->queues = 4;
>        hw->max_rates = 4;
>
>
> _______________________________________________
> Stable-review mailing list
> Stable-review@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable-review
>

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

* Re: [stable] [Stable-review] [patch 070/123] ath9k: re-enable ps by default for new single chip families
  2010-03-16  1:04   ` [Stable-review] " Luis R. Rodriguez
@ 2010-03-19  0:04     ` Greg KH
  2010-03-23 19:26       ` [Stable-review] [stable] " Luis R. Rodriguez
  2010-04-02 17:37       ` [stable] [Stable-review] " Luis R. Rodriguez
  0 siblings, 2 replies; 140+ messages in thread
From: Greg KH @ 2010-03-19  0:04 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: Greg KH, Peter Stuge, linux-kernel, John W. Linville,
	Kristoffer Ericson, stable-review, Justin P. Mattock, akpm,
	torvalds, stable, alan

On Mon, Mar 15, 2010 at 06:04:15PM -0700, Luis R. Rodriguez wrote:
> On Fri, Mar 12, 2010 at 5:12 PM, Greg KH <gregkh@suse.de> wrote:
> > 2.6.33-stable review patch.  If anyone has any objections, please let me know.
> 
> This was intended for 2.6.32 as well. Thanks

Great, but it didn't apply there, so I didn't try to force it :)

Care to provide a backport?

thanks,

greg k-h

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

* Re: [patch 114/123] dm ioctl: only issue uevent on resume if state changed
  2010-03-13  0:13 ` [patch 114/123] dm ioctl: only issue uevent on resume if state changed Greg KH
@ 2010-03-22 18:43   ` Mike Snitzer
  2010-03-22 18:54     ` Alasdair G Kergon
  0 siblings, 1 reply; 140+ messages in thread
From: Mike Snitzer @ 2010-03-22 18:43 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
	Dave Wysochanski, Alasdair G Kergon, Peter Rajnoha

On Fri, Mar 12 2010 at  7:13pm -0500,
Greg KH <gregkh@suse.de> wrote:

> 2.6.33-stable review patch.  If anyone has any objections, please let me know.
> 
> -----------------
> 
> From: Mike Snitzer <snitzer@redhat.com>
> 
> commit 0f3649a9e305ea22eb196a84a2d7520afcaa6060 upstream.
> 
> Only issue a uevent on a resume if the state of the device changed,
> i.e. if it was suspended and/or its table was replaced.
> 
> Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/md/dm-ioctl.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> --- a/drivers/md/dm-ioctl.c
> +++ b/drivers/md/dm-ioctl.c
> @@ -897,16 +897,17 @@ static int do_resume(struct dm_ioctl *pa
>  			set_disk_ro(dm_disk(md), 1);
>  	}
>  
> -	if (dm_suspended_md(md))
> +	if (dm_suspended_md(md)) {
>  		r = dm_resume(md);
> +		if (!r)
> +			dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
> +	}
>  
>  	if (old_map)
>  		dm_table_destroy(old_map);
>  
> -	if (!r) {
> -		dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
> +	if (!r)
>  		r = __dev_status(md, param);
> -	}
>  
>  	dm_put(md);
>  	return r;
> 
> 


Hi Greg,

The following upstream dm-ioctl patch also needs to go to stable now
that the above patch was included in 2.6.33.y.

Regards,
Mike

---
commit 3abf85b5b5851b5f28d3d8a920ebb844edd08352
Author: Peter Rajnoha <prajnoha@redhat.com>
Date:   Sat Mar 6 02:32:31 2010 +0000

    dm ioctl: introduce flag indicating uevent was generated
    
    Set a new DM_UEVENT_GENERATED_FLAG when returning from ioctls to
    indicate that a uevent was actually generated.  This tells the userspace
    caller that it may need to wait for the event to be processed.
    
    Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
    Signed-off-by: Alasdair G Kergon <agk@redhat.com>

diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index e3cf568..d7500e1 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -285,7 +285,8 @@ retry:
 	up_write(&_hash_lock);
 }
 
-static int dm_hash_rename(uint32_t cookie, const char *old, const char *new)
+static int dm_hash_rename(uint32_t cookie, uint32_t *flags, const char *old,
+			  const char *new)
 {
 	char *new_name, *old_name;
 	struct hash_cell *hc;
@@ -344,7 +345,8 @@ static int dm_hash_rename(uint32_t cookie, const char *old, const char *new)
 		dm_table_put(table);
 	}
 
-	dm_kobject_uevent(hc->md, KOBJ_CHANGE, cookie);
+	if (!dm_kobject_uevent(hc->md, KOBJ_CHANGE, cookie))
+		*flags |= DM_UEVENT_GENERATED_FLAG;
 
 	dm_put(hc->md);
 	up_write(&_hash_lock);
@@ -736,10 +738,10 @@ static int dev_remove(struct dm_ioctl *param, size_t param_size)
 	__hash_remove(hc);
 	up_write(&_hash_lock);
 
-	dm_kobject_uevent(md, KOBJ_REMOVE, param->event_nr);
+	if (!dm_kobject_uevent(md, KOBJ_REMOVE, param->event_nr))
+		param->flags |= DM_UEVENT_GENERATED_FLAG;
 
 	dm_put(md);
-	param->data_size = 0;
 	return 0;
 }
 
@@ -773,7 +775,9 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size)
 		return r;
 
 	param->data_size = 0;
-	return dm_hash_rename(param->event_nr, param->name, new_name);
+
+	return dm_hash_rename(param->event_nr, &param->flags, param->name,
+			      new_name);
 }
 
 static int dev_set_geometry(struct dm_ioctl *param, size_t param_size)
@@ -899,8 +903,8 @@ static int do_resume(struct dm_ioctl *param)
 
 	if (dm_suspended_md(md)) {
 		r = dm_resume(md);
-		if (!r)
-			dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
+		if (!r && !dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr))
+			param->flags |= DM_UEVENT_GENERATED_FLAG;
 	}
 
 	if (old_map)
@@ -1477,6 +1481,7 @@ static int validate_params(uint cmd, struct dm_ioctl *param)
 {
 	/* Always clear this flag */
 	param->flags &= ~DM_BUFFER_FULL_FLAG;
+	param->flags &= ~DM_UEVENT_GENERATED_FLAG;
 
 	/* Ignores parameters */
 	if (cmd == DM_REMOVE_ALL_CMD ||
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 7199846..d21e128 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2618,18 +2618,19 @@ out:
 /*-----------------------------------------------------------------
  * Event notification.
  *---------------------------------------------------------------*/
-void dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
+int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
 		       unsigned cookie)
 {
 	char udev_cookie[DM_COOKIE_LENGTH];
 	char *envp[] = { udev_cookie, NULL };
 
 	if (!cookie)
-		kobject_uevent(&disk_to_dev(md->disk)->kobj, action);
+		return kobject_uevent(&disk_to_dev(md->disk)->kobj, action);
 	else {
 		snprintf(udev_cookie, DM_COOKIE_LENGTH, "%s=%u",
 			 DM_COOKIE_ENV_VAR_NAME, cookie);
-		kobject_uevent_env(&disk_to_dev(md->disk)->kobj, action, envp);
+		return kobject_uevent_env(&disk_to_dev(md->disk)->kobj,
+					  action, envp);
 	}
 }
 
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 8dadaa5..bad1724 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -125,8 +125,8 @@ void dm_stripe_exit(void);
 int dm_open_count(struct mapped_device *md);
 int dm_lock_for_deletion(struct mapped_device *md);
 
-void dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
-		       unsigned cookie);
+int dm_kobject_uevent(struct mapped_device *md, enum kobject_action action,
+		      unsigned cookie);
 
 int dm_io_init(void);
 void dm_io_exit(void);
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index aa95508..2c445e1 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -266,9 +266,9 @@ enum {
 #define DM_DEV_SET_GEOMETRY	_IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
 
 #define DM_VERSION_MAJOR	4
-#define DM_VERSION_MINOR	16
+#define DM_VERSION_MINOR	17
 #define DM_VERSION_PATCHLEVEL	0
-#define DM_VERSION_EXTRA	"-ioctl (2009-11-05)"
+#define DM_VERSION_EXTRA	"-ioctl (2010-03-05)"
 
 /* Status bits */
 #define DM_READONLY_FLAG	(1 << 0) /* In/Out */
@@ -316,4 +316,9 @@ enum {
  */
 #define DM_QUERY_INACTIVE_TABLE_FLAG	(1 << 12) /* In */
 
+/*
+ * If set, a uevent was generated for which the caller may need to wait.
+ */
+#define DM_UEVENT_GENERATED_FLAG	(1 << 13) /* Out */
+
 #endif				/* _LINUX_DM_IOCTL_H */

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

* Re: [patch 114/123] dm ioctl: only issue uevent on resume if state changed
  2010-03-22 18:43   ` Mike Snitzer
@ 2010-03-22 18:54     ` Alasdair G Kergon
  2010-04-19 17:44       ` [stable] " Greg KH
  0 siblings, 1 reply; 140+ messages in thread
From: Alasdair G Kergon @ 2010-03-22 18:54 UTC (permalink / raw)
  To: Greg KH
  Cc: Mike Snitzer, linux-kernel, stable, stable-review, torvalds,
	akpm, alan, Dave Wysochanski, Peter Rajnoha

On Mon, Mar 22, 2010 at 02:43:17PM -0400, Mike Snitzer wrote:
> The following upstream dm-ioctl patch also needs to go to stable now
 
Ack.

This is for the benefit of systems that have switched over to using udev
rules to manage dm devices (instead of dm/lvm2 code).  The userspace
code that issued the ioctl needs to be told whether or not a uevent was
issued so that it knows whether or not there is udev processing to wait
for.

Alasdair


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

* Re: [Stable-review] [stable] [patch 070/123] ath9k: re-enable ps by  default for new single chip families
  2010-03-19  0:04     ` [stable] " Greg KH
@ 2010-03-23 19:26       ` Luis R. Rodriguez
  2010-04-02 17:37       ` [stable] [Stable-review] " Luis R. Rodriguez
  1 sibling, 0 replies; 140+ messages in thread
From: Luis R. Rodriguez @ 2010-03-23 19:26 UTC (permalink / raw)
  To: Greg KH, Senthil Balasubramanian
  Cc: torvalds, Greg KH, linux-kernel, John W. Linville, stable,
	Kristoffer Ericson, Justin P. Mattock, akpm, Peter Stuge,
	stable-review, alan

On Thu, Mar 18, 2010 at 5:04 PM, Greg KH <greg@kroah.com> wrote:
> On Mon, Mar 15, 2010 at 06:04:15PM -0700, Luis R. Rodriguez wrote:
>> On Fri, Mar 12, 2010 at 5:12 PM, Greg KH <gregkh@suse.de> wrote:
>> > 2.6.33-stable review patch.  If anyone has any objections, please let me know.
>>
>> This was intended for 2.6.32 as well. Thanks
>
> Great, but it didn't apply there, so I didn't try to force it :)
>
> Care to provide a backport?

Senthil, if you get a chance, can you send this backport? Sorry I
haven't had a chance yet.

  Luis

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

* Re: [Stable-review] [patch 109/123] s3cmci: initialize default platform data no_wprotect and no_detect with 1
  2010-03-15 16:16   ` [Stable-review] " Stefan Bader
@ 2010-03-30 21:17     ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-03-30 21:17 UTC (permalink / raw)
  To: Stefan Bader
  Cc: Greg KH, linux-kernel, stable, Lars-Peter Clausen, linux-mmc,
	Ben Dooks, akpm, torvalds, stable-review, alan

On Mon, Mar 15, 2010 at 05:16:57PM +0100, Stefan Bader wrote:
> This patch does not seem to be applied to 2.6.32.y while the one
> 
> [patch 108/123] s3cmci: s3cmci_card_present: Use no_detect to decide whether
> there is a card detect pin
> 
> is. I checked and the only problem that makes it fail is the uncorrected comment
> above (revised patch attached)

Thanks, now applied.

greg k-h

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

* Re: [stable] [Stable-review] [patch 070/123] ath9k: re-enable ps by default for new single chip families
  2010-03-19  0:04     ` [stable] " Greg KH
  2010-03-23 19:26       ` [Stable-review] [stable] " Luis R. Rodriguez
@ 2010-04-02 17:37       ` Luis R. Rodriguez
  1 sibling, 0 replies; 140+ messages in thread
From: Luis R. Rodriguez @ 2010-04-02 17:37 UTC (permalink / raw)
  To: Greg KH
  Cc: Luis Rodriguez, Greg KH, Peter Stuge, linux-kernel,
	John W. Linville, Kristoffer Ericson, stable-review,
	Justin P. Mattock, akpm, torvalds, stable, alan,
	Senthil Balasubramanian

On Thu, Mar 18, 2010 at 05:04:38PM -0700, Greg KH wrote:
> On Mon, Mar 15, 2010 at 06:04:15PM -0700, Luis R. Rodriguez wrote:
> > On Fri, Mar 12, 2010 at 5:12 PM, Greg KH <gregkh@suse.de> wrote:
> > > 2.6.33-stable review patch.  If anyone has any objections, please let me know.
> > 
> > This was intended for 2.6.32 as well. Thanks
> 
> Great, but it didn't apply there, so I didn't try to force it :)
> 
> Care to provide a backport?

Sorry, been, busy, I've put together a page to keep track of these sort of things:

http://wireless.kernel.org/en/developers/stable-pending

  Luis

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

* Re: [stable] [patch 114/123] dm ioctl: only issue uevent on resume if state changed
  2010-03-22 18:54     ` Alasdair G Kergon
@ 2010-04-19 17:44       ` Greg KH
  0 siblings, 0 replies; 140+ messages in thread
From: Greg KH @ 2010-04-19 17:44 UTC (permalink / raw)
  To: Greg KH, Mike Snitzer, linux-kernel, stable, stable-review,
	torvalds, akpm, alan, Dave Wysochanski, Peter Rajnoha

On Mon, Mar 22, 2010 at 06:54:09PM +0000, Alasdair G Kergon wrote:
> On Mon, Mar 22, 2010 at 02:43:17PM -0400, Mike Snitzer wrote:
> > The following upstream dm-ioctl patch also needs to go to stable now
>  
> Ack.
> 
> This is for the benefit of systems that have switched over to using udev
> rules to manage dm devices (instead of dm/lvm2 code).  The userspace
> code that issued the ioctl needs to be told whether or not a uevent was
> issued so that it knows whether or not there is udev processing to wait
> for.

Ok, it's now queued up, thanks for letting me know.

greg k-h

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

end of thread, other threads:[~2010-04-19 17:49 UTC | newest]

Thread overview: 140+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-13  0:16 [patch 000/123] 2.6.33.1-stable review Greg KH
2010-03-13  0:11 ` [patch 001/123] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Greg KH
2010-03-13  0:11 ` [patch 002/123] netlabel: fix export of SELinux categories > 127 Greg KH
2010-03-13  0:11 ` [patch 003/123] PCI hotplug: ibmphp: read the length of ebda and map entire ebda region Greg KH
2010-03-13  0:11 ` [patch 004/123] PCI hotplug: check ioremap() return value in ibmphp_ebda.c Greg KH
2010-03-13  0:11 ` [patch 005/123] security: fix error return path in ima_inode_alloc Greg KH
2010-03-13  0:11 ` [patch 006/123] airo: fix setting zero length WEP key Greg KH
2010-03-13  0:11 ` [patch 007/123] HID: remove TENX iBuddy from blacklist Greg KH
2010-03-13  0:11 ` [patch 008/123] HID: usbhid: introduce timeout for stuck ctrl/out URBs Greg KH
2010-03-13  0:11 ` [patch 009/123] mac80211: quit addba_resp_timer if Tx BA session is torn down Greg KH
2010-03-13  0:11 ` [patch 010/123] mac80211: Reset dynamic ps timer in Rx path Greg KH
2010-03-13  0:11 ` [patch 011/123] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
2010-03-13  0:11 ` [patch 012/123] readahead: introduce FMODE_RANDOM for POSIX_FADV_RANDOM Greg KH
2010-03-13  0:11 ` [patch 013/123] slab: initialize unused alien cache entry as NULL at alloc_alien_cache() Greg KH
2010-03-13  0:11 ` [patch 014/123] V4L/DVB (13991): gspca_mr973010a: Fix cif type 1 cameras not streaming on UHCI controllers Greg KH
2010-03-13  0:11 ` [patch 015/123] vfs: take f_lock on modifying f_mode after open time Greg KH
2010-03-13  0:11 ` [patch 016/123] x86, uv: uv_global_gru_mmr_address() macro fix Greg KH
2010-03-13  0:11 ` [patch 017/123] drm/i915: give up on 8xx lid status Greg KH
2010-03-13  0:11 ` [patch 018/123] ath9k: fix keycache leak in split tkip case Greg KH
2010-03-13  0:11 ` [patch 019/123] rtc-core: fix memory leak Greg KH
2010-03-13  0:11 ` [patch 020/123] x86/PCI: Prevent mmconfig memory corruption Greg KH
2010-03-13  0:11 ` [patch 021/123] clocksource: Fix up a registration/IRQ race in the sh drivers Greg KH
2010-03-13  0:12 ` [patch 022/123] SCSI: qla1280: Drop host_lock while requesting firmware Greg KH
2010-03-13  0:12 ` [patch 023/123] Staging: hv: add a pci device table Greg KH
2010-03-13  0:12 ` [patch 024/123] Staging: hv: match on DMI values to know if we should run Greg KH
2010-03-13  0:12 ` [patch 025/123] Staging: Fixed pohmelfs regression because of per-bdi writeback Greg KH
2010-03-13  0:12 ` [patch 026/123] Staging: wlan-ng: Add select WEXT_PRIV to Kconfig to prevent build failure Greg KH
2010-03-13  0:12 ` [patch 027/123] Staging: mimio: remove the mimio driver Greg KH
2010-03-13  0:12 ` [patch 028/123] dvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid Payload Pointer Greg KH
2010-03-13  0:12 ` [patch 029/123] V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index Greg KH
2010-03-13  0:12 ` [patch 030/123] PM / Hibernate: Fix preallocating of memory Greg KH
2010-03-13  0:12 ` [patch 031/123] macintosh/therm_adt746x: Fix sysfs attributes lifetime Greg KH
2010-03-13  0:12 ` [patch 032/123] macintosh/hwmon/ams: Fix device removal sequence Greg KH
2010-03-13  0:12 ` [patch 033/123] oprofile/x86: fix perfctr nmi reservation for mulitplexing Greg KH
2010-03-13  0:12 ` [patch 034/123] perf symbols: Check the right return variable Greg KH
2010-03-13  0:12 ` [patch 035/123] perf_event: Fix preempt warning in perf_clock() Greg KH
2010-03-13  0:12 ` [patch 036/123] oprofile: remove tracing build dependency Greg KH
2010-03-13  0:12 ` [patch 037/123] oprofile/x86: remove node check in AMD IBS initialization Greg KH
2010-03-13  0:12 ` [patch 038/123] oprofile/x86: use kzalloc() instead of kmalloc() Greg KH
2010-03-13  0:12 ` [patch 039/123] oprofile/x86: fix msr access to reserved counters Greg KH
2010-03-13  0:12 ` [patch 040/123] perf: Reimplement frequency driven sampling Greg KH
2010-03-13  0:12 ` [patch 041/123] tracing: Fix ftrace_event_call alignment for use with gcc 4.5 Greg KH
2010-03-13  0:12 ` [patch 042/123] ALSA: hda: Use 3stack quirk for Toshiba Satellite L40-10Q Greg KH
2010-03-13  0:12 ` [patch 043/123] ALSA: via82xx: add quirk for D1289 motherboard Greg KH
2010-03-13  0:12 ` [patch 044/123] ALSA: pcm core - fix fifo_size channels interval check Greg KH
2010-03-13  0:12 ` [patch 045/123] ALSA: usb-audio: reduce MIDI packet size to work around broken firmware Greg KH
2010-03-13  0:12 ` [patch 046/123] ALSA: USB MIDI support for Access Music VirusTI Greg KH
2010-03-13  0:12 ` [patch 047/123] thinkpad-acpi: fix ALSA callback return status Greg KH
2010-03-13  0:12 ` [patch 048/123] ALSA: hda: Use LPIB for Dell Latitude 131L Greg KH
2010-03-13  0:12 ` [patch 049/123] ALSA: hda: Use LPIB for a Biostar Microtech board Greg KH
2010-03-13  0:12 ` [patch 050/123] ALSA: hda-intel: Add position_fix quirk for ASUS M2V-MX SE Greg KH
2010-03-13  0:12 ` [patch 051/123] ASoC: fix ak4104 register array access Greg KH
2010-03-13  0:12 ` [patch 052/123] driver-core: fix race condition in get_device_parent() Greg KH
2010-03-13  0:12 ` [patch 053/123] Driver-Core: devtmpfs - reset inode permissions before unlinking Greg KH
2010-03-13  0:12 ` [patch 054/123] sysfs: Cache the last sysfs_dirent to improve readdir scalability v2 Greg KH
2010-03-13  0:12 ` [patch 055/123] tty: Fix the ldisc hangup race Greg KH
2010-03-13  0:12 ` [patch 056/123] serial: imx: fix NULL dereference Oops when pdata == NULL Greg KH
2010-03-13  0:12 ` [patch 057/123] USB: serial: sierra driver indat_callback fix Greg KH
2010-03-13  0:12 ` [patch 058/123] USB: fix I2C API usage in ohci-pnx4008 Greg KH
2010-03-13  0:12 ` [patch 059/123] p54usb: Add the USB ID for Belkin (Accton) FD7050E ver 1010ec Greg KH
2010-03-13  0:12 ` [patch 060/123] p54pci: handle dma mapping errors Greg KH
2010-03-13  0:12 ` [patch 061/123] gpiolib: Actually set output state in wm831x_gpio_direction_output() Greg KH
2010-03-13  0:12 ` [patch 062/123] gpio: cs5535-gpio: fix input direction Greg KH
2010-03-13  0:12 ` [patch 063/123] hwmon: (tmp421) Fix temperature conversions Greg KH
2010-03-13  0:12 ` [patch 064/123] hwmon: (tmp421) Restore missing inputs Greg KH
2010-03-13  0:12 ` [patch 065/123] hwmon: Fix off-by-one kind values Greg KH
2010-03-13  0:12 ` [patch 066/123] pata_hpt3x2n: always stretch UltraDMA timing Greg KH
2010-03-13  0:12 ` [patch 067/123] scm: Only support SCM_RIGHTS on unix domain sockets Greg KH
2010-03-13  0:12 ` [patch 068/123] skbuff: align sk_buff::cb to 64 bit and close some potential holes Greg KH
2010-03-13  0:12 ` [patch 069/123] netdevice.h: check for CONFIG_WLAN instead of CONFIG_WLAN_80211 Greg KH
2010-03-13  0:12 ` [patch 070/123] ath9k: re-enable ps by default for new single chip families Greg KH
2010-03-16  1:04   ` [Stable-review] " Luis R. Rodriguez
2010-03-19  0:04     ` [stable] " Greg KH
2010-03-23 19:26       ` [Stable-review] [stable] " Luis R. Rodriguez
2010-04-02 17:37       ` [stable] [Stable-review] " Luis R. Rodriguez
2010-03-13  0:12 ` [patch 071/123] ath9k: fix beacon timer restart after a card reset Greg KH
2010-03-13  0:12 ` [patch 072/123] ath9k: fix rate control fallback rate selection Greg KH
2010-03-13  0:12 ` [patch 073/123] ath9k: disable RIFS search for AR91xx based chips Greg KH
2010-03-13  0:12 ` [patch 074/123] ath5k: use correct packet type when transmitting Greg KH
2010-03-13  0:12 ` [patch 075/123] b43/b43legacy: Wake queues in wireless_core_start Greg KH
2010-03-13  0:12 ` [patch 076/123] netfilter: xt_recent: fix buffer overflow Greg KH
2010-03-13  0:12 ` [patch 077/123] netfilter: xt_recent: fix false match Greg KH
2010-03-13  0:12 ` [patch 078/123] sunxvr500: Additional PCI id for sunxvr500 driver Greg KH
2010-03-13  0:12 ` [patch 079/123] mac80211: do not transmit frames on unconfigured 4-addr vlan interfaces Greg KH
2010-03-13  0:12 ` [patch 080/123] eeepc-laptop: disable wireless hotplug for 1005PE Greg KH
2010-03-13  0:12 ` [patch 081/123] thinkpad-acpi: fix poll thread auto-start Greg KH
2010-03-13  0:13 ` [patch 082/123] thinkpad-acpi: R52 brightness_mode has been confirmed Greg KH
2010-03-13  0:13 ` [patch 083/123] thinkpad-acpi: document HKEY event 3006 Greg KH
2010-03-13  0:13 ` [patch 084/123] thinkpad-acpi: make driver events work in NVRAM poll mode Greg KH
2010-03-13  0:13 ` [patch 085/123] thinkpad-acpi: fix bluetooth/wwan resume Greg KH
2010-03-13  0:13 ` [patch 086/123] thinkpad-acpi: lock down video output state access Greg KH
2010-03-13  0:13 ` [patch 087/123] ocfs2: Only bug out in direct io write for reflinked extent Greg KH
2010-03-13  0:13 ` [patch 088/123] x86, ia32_aout: do not kill argument mapping Greg KH
2010-03-13  0:13 ` [patch 089/123] x86: Add iMac9,1 to pci_reboot_dmi_table Greg KH
2010-03-13  0:13 ` [patch 090/123] x86, xen: Disable highmem PTE allocation even when CONFIG_HIGHPTE=y Greg KH
2010-03-13  0:13   ` Greg KH
2010-03-13  0:13 ` [patch 091/123] x86: Avoid race condition in pci_enable_msix() Greg KH
2010-03-13  0:13 ` [patch 092/123] x86: Fix SCI on IOAPIC != 0 Greg KH
2010-03-13  0:13 ` [patch 093/123] USB: xhci: Fix finding extended capabilities registers Greg KH
2010-03-13  0:13 ` [patch 094/123] USB: fix the idProduct value for USB-3.0 root hubs Greg KH
2010-03-13  0:13 ` [patch 095/123] USB: fix crash in uhci_scan_schedule Greg KH
2010-03-13  0:13 ` [patch 096/123] USB: remove debugging message for uevent constructions Greg KH
2010-03-13  0:13 ` [patch 097/123] USB: Move hcd free_dev call into usb_disconnect to fix oops Greg KH
2010-03-13  0:13 ` [patch 098/123] USB: f_mass_storage: fix crash on bind() error Greg KH
2010-03-13  0:13 ` [patch 099/123] USB: add new ftdi_sio device ids Greg KH
2010-03-13  0:13 ` [patch 100/123] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
2010-03-13  0:13 ` [patch 101/123] USB: cp210x: Add 81E8 (Zephyr Bioharness) Greg KH
2010-03-13  0:13 ` [patch 102/123] USB: unusual_devs: Add support for multiple Option 3G sticks Greg KH
2010-03-13  0:13 ` [patch 103/123] drm/i915: Use a dmi quirk to skip a broken SDVO TV output Greg KH
2010-03-13  0:13 ` [patch 104/123] drm/ttm: handle OOM in ttm_tt_swapout Greg KH
2010-03-13  0:13 ` [patch 105/123] drm/radeon/kms/atom: fix shr/shl ops Greg KH
2010-03-13  0:13 ` [patch 106/123] sunrpc: remove unnecessary svc_xprt_put Greg KH
2010-03-13  0:13 ` [patch 107/123] SUNRPC: Handle EINVAL error returns from the TCP connect operation Greg KH
2010-03-13  0:13 ` [patch 108/123] s3cmci: s3cmci_card_present: Use no_detect to decide whether there is a card detect pin Greg KH
2010-03-13  0:13   ` Greg KH
2010-03-13  0:13 ` [patch 109/123] s3cmci: initialize default platform data no_wprotect and no_detect with 1 Greg KH
2010-03-13  0:13   ` Greg KH
2010-03-15 16:16   ` [Stable-review] " Stefan Bader
2010-03-30 21:17     ` Greg KH
2010-03-13  0:13 ` [patch 110/123] scripts/get_maintainer.pl: fix possible infinite loop Greg KH
2010-03-13  0:13 ` [patch 111/123] rtc-coh901331: fix braces in resume code Greg KH
2010-03-13  0:13 ` [patch 112/123] NFS: Fix an allocation-under-spinlock bug Greg KH
2010-03-13  0:13 ` [patch 113/123] dm: free dm_io before bio_endio not after Greg KH
2010-03-13  0:13 ` [patch 114/123] dm ioctl: only issue uevent on resume if state changed Greg KH
2010-03-22 18:43   ` Mike Snitzer
2010-03-22 18:54     ` Alasdair G Kergon
2010-04-19 17:44       ` [stable] " Greg KH
2010-03-13  0:13 ` [patch 115/123] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction Greg KH
2010-03-13  0:13 ` [patch 116/123] KVM: x86 emulator: Add group8 instruction decoding Greg KH
2010-03-13  0:13 ` [patch 117/123] KVM: x86 emulator: Forbid modifying CS segment register by mov instruction Greg KH
2010-03-13  0:13 ` [patch 118/123] KVM: x86 emulator: Add group9 instruction decoding Greg KH
2010-03-13  0:13 ` [patch 119/123] KVM: x86 emulator: Check CPL level during privilege instruction emulation Greg KH
2010-03-13  0:13 ` [patch 120/123] sched: Fix sched_mv_power_savings for !SMT Greg KH
2010-03-15  5:51   ` Vaidyanathan Srinivasan
2010-03-15 14:27     ` Greg KH
2010-03-13  0:13 ` [patch 121/123] sched: Fix SMT scheduler regression in find_busiest_queue() Greg KH
2010-03-13  0:13 ` [patch 122/123] sched: Dont use possibly stale sched_class Greg KH
2010-03-13  0:13 ` [patch 123/123] x86, mm: Allow highmem user page tables to be disabled at boot time Greg KH
2010-03-13  2:58 ` [patch 000/123] 2.6.33.1-stable review Grant Coady
2010-03-13  3:27   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.