summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-05-12 11:50:41 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-12 11:50:41 -0700
commitb5ed7ae292167043555417fa8c7ccb1366f56c84 (patch)
tree8b12455cab3e3ab575b92b1092f910bb70d4d5d9
parent9efd1ee7c973f2137ef653bcc58d0ee623f34d9e (diff)
downloadstable-queue-b5ed7ae292167043555417fa8c7ccb1366f56c84.tar.gz
.38 patches
-rw-r--r--queue-2.6.38/arm-zimage-make-sure-the-stack-is-64-bit-aligned.patch46
-rw-r--r--queue-2.6.38/can-fix-sja1000-dlc-for-rtr-packets.patch35
-rw-r--r--queue-2.6.38/drivers-rtc-rtc-s3c.c-fixup-wake-support-for-rtc.patch65
-rw-r--r--queue-2.6.38/ehea-fix-wrongly-reported-speed-and-port.patch55
-rw-r--r--queue-2.6.38/ipheth-properly-distinguish-length-and-alignment-in-urbs-and-skbs.patch64
-rw-r--r--queue-2.6.38/mm-use-alloc_bootmem_node_nopanic-on-really-needed-path.patch110
-rw-r--r--queue-2.6.38/net-dev_close-should-check-iff_up.patch54
-rw-r--r--queue-2.6.38/net-ip_expire-must-revalidate-route.patch81
-rw-r--r--queue-2.6.38/net-slip-fix-ldisc-open-retval.patch34
-rw-r--r--queue-2.6.38/pch_gbe-fixed-the-issue-of-checksum-judgment.patch42
-rw-r--r--queue-2.6.38/pch_gbe-fixed-the-issue-of-collision-detection.patch35
-rw-r--r--queue-2.6.38/pch_gbe-support-ml7223-ioh.patch74
-rw-r--r--queue-2.6.38/pm-fix-warning-in-pm_restrict_gfp_mask-during-snapshot_s2ram-ioctl.patch56
-rw-r--r--queue-2.6.38/pm-hibernate-fix-ioctl-snapshot_s2ram.patch36
-rw-r--r--queue-2.6.38/pm-hibernate-make-snapshot_release-restore-gfp-mask.patch37
-rw-r--r--queue-2.6.38/series18
-rw-r--r--queue-2.6.38/slcan-fix-ldisc-open-retval.patch33
-rw-r--r--queue-2.6.38/tmpfs-fix-race-between-umount-and-swapoff.patch201
-rw-r--r--queue-2.6.38/vmxnet3-consistently-disable-irqs-when-taking-adapter-cmd_lock.patch398
19 files changed, 1474 insertions, 0 deletions
diff --git a/queue-2.6.38/arm-zimage-make-sure-the-stack-is-64-bit-aligned.patch b/queue-2.6.38/arm-zimage-make-sure-the-stack-is-64-bit-aligned.patch
new file mode 100644
index 0000000000..d28b3a0631
--- /dev/null
+++ b/queue-2.6.38/arm-zimage-make-sure-the-stack-is-64-bit-aligned.patch
@@ -0,0 +1,46 @@
+From 3bd2cbb95543acf44fe123eb9f038de54e655eb4 Mon Sep 17 00:00:00 2001
+From: Nicolas Pitre <nicolas.pitre@linaro.org>
+Date: Thu, 21 Apr 2011 21:45:08 -0400
+Subject: ARM: zImage: make sure the stack is 64-bit aligned
+
+From: Nicolas Pitre <nicolas.pitre@linaro.org>
+
+commit 3bd2cbb95543acf44fe123eb9f038de54e655eb4 upstream.
+
+With ARMv5+ and EABI, the compiler expects a 64-bit aligned stack so
+instructions like STRD and LDRD can be used. Without this, mysterious
+boot failures were seen semi randomly with the LZMA decompressor.
+
+While at it, let's align .bss as well.
+
+Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
+Tested-by: Shawn Guo <shawn.guo@linaro.org>
+Acked-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/boot/compressed/Makefile | 2 +-
+ arch/arm/boot/compressed/vmlinux.lds.in | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -59,7 +59,7 @@ ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
+ ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
+ else
+ ZTEXTADDR := 0
+-ZBSSADDR := ALIGN(4)
++ZBSSADDR := ALIGN(8)
+ endif
+
+ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
+--- a/arch/arm/boot/compressed/vmlinux.lds.in
++++ b/arch/arm/boot/compressed/vmlinux.lds.in
+@@ -57,6 +57,7 @@ SECTIONS
+ .bss : { *(.bss) }
+ _end = .;
+
++ . = ALIGN(8); /* the stack must be 64-bit aligned */
+ .stack : { *(.stack) }
+
+ .stab 0 : { *(.stab) }
diff --git a/queue-2.6.38/can-fix-sja1000-dlc-for-rtr-packets.patch b/queue-2.6.38/can-fix-sja1000-dlc-for-rtr-packets.patch
new file mode 100644
index 0000000000..dc78938bd3
--- /dev/null
+++ b/queue-2.6.38/can-fix-sja1000-dlc-for-rtr-packets.patch
@@ -0,0 +1,35 @@
+From 87e9af6cc67d842cd92b52b81f3f14e665e7ab05 Mon Sep 17 00:00:00 2001
+From: Kurt Van Dijck <kurt.van.dijck@eia.be>
+Date: Mon, 2 May 2011 04:50:48 +0000
+Subject: can: fix SJA1000 dlc for RTR packets
+
+From: Kurt Van Dijck <kurt.van.dijck@eia.be>
+
+commit 87e9af6cc67d842cd92b52b81f3f14e665e7ab05 upstream.
+
+RTR frames do have a valid data length code on CAN.
+The driver for SJA1000 did not handle that situation properly.
+
+Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
+Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/can/sja1000/sja1000.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/can/sja1000/sja1000.c
++++ b/drivers/net/can/sja1000/sja1000.c
+@@ -346,10 +346,10 @@ static void sja1000_rx(struct net_device
+ | (priv->read_reg(priv, REG_ID2) >> 5);
+ }
+
++ cf->can_dlc = get_can_dlc(fi & 0x0F);
+ if (fi & FI_RTR) {
+ id |= CAN_RTR_FLAG;
+ } else {
+- cf->can_dlc = get_can_dlc(fi & 0x0F);
+ for (i = 0; i < cf->can_dlc; i++)
+ cf->data[i] = priv->read_reg(priv, dreg++);
+ }
diff --git a/queue-2.6.38/drivers-rtc-rtc-s3c.c-fixup-wake-support-for-rtc.patch b/queue-2.6.38/drivers-rtc-rtc-s3c.c-fixup-wake-support-for-rtc.patch
new file mode 100644
index 0000000000..f985ac8994
--- /dev/null
+++ b/queue-2.6.38/drivers-rtc-rtc-s3c.c-fixup-wake-support-for-rtc.patch
@@ -0,0 +1,65 @@
+From 52cd4e5c620af9e21b5298bf01844b98573505a7 Mon Sep 17 00:00:00 2001
+From: Ben Dooks <ben-linux@fluff.org>
+Date: Wed, 11 May 2011 15:13:28 -0700
+Subject: drivers/rtc/rtc-s3c.c: fixup wake support for rtc
+
+From: Ben Dooks <ben-linux@fluff.org>
+
+commit 52cd4e5c620af9e21b5298bf01844b98573505a7 upstream.
+
+The driver is not balancing set_irq and disable_irq_wake() calls, so
+ensure that it keeps track of whether the wake is enabled.
+
+The fixes the following error on S3C6410 devices:
+
+ WARNING: at kernel/irq/manage.c:382 set_irq_wake+0x84/0xec()
+ Unbalanced IRQ 92 wake disable
+
+Signed-off-by: Ben Dooks <ben-linux@fluff.org>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.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/rtc-s3c.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/drivers/rtc/rtc-s3c.c
++++ b/drivers/rtc/rtc-s3c.c
+@@ -46,6 +46,7 @@ static struct clk *rtc_clk;
+ static void __iomem *s3c_rtc_base;
+ static int s3c_rtc_alarmno = NO_IRQ;
+ static int s3c_rtc_tickno = NO_IRQ;
++static bool wake_en;
+ static enum s3c_cpu_type s3c_rtc_cpu_type;
+
+ static DEFINE_SPINLOCK(s3c_rtc_pie_lock);
+@@ -597,8 +598,12 @@ static int s3c_rtc_suspend(struct platfo
+ }
+ s3c_rtc_enable(pdev, 0);
+
+- if (device_may_wakeup(&pdev->dev))
+- enable_irq_wake(s3c_rtc_alarmno);
++ if (device_may_wakeup(&pdev->dev) && !wake_en) {
++ if (enable_irq_wake(s3c_rtc_alarmno) == 0)
++ wake_en = true;
++ else
++ dev_err(&pdev->dev, "enable_irq_wake failed\n");
++ }
+
+ return 0;
+ }
+@@ -614,8 +619,10 @@ static int s3c_rtc_resume(struct platfor
+ writew(tmp | ticnt_en_save, s3c_rtc_base + S3C2410_RTCCON);
+ }
+
+- if (device_may_wakeup(&pdev->dev))
++ if (device_may_wakeup(&pdev->dev) && wake_en) {
+ disable_irq_wake(s3c_rtc_alarmno);
++ wake_en = false;
++ }
+
+ return 0;
+ }
diff --git a/queue-2.6.38/ehea-fix-wrongly-reported-speed-and-port.patch b/queue-2.6.38/ehea-fix-wrongly-reported-speed-and-port.patch
new file mode 100644
index 0000000000..f32c81cf4c
--- /dev/null
+++ b/queue-2.6.38/ehea-fix-wrongly-reported-speed-and-port.patch
@@ -0,0 +1,55 @@
+From dcbe14b91a920657ff3a9ba0efb7c5b5562f956a Mon Sep 17 00:00:00 2001
+From: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
+Date: Wed, 4 May 2011 13:05:11 +0000
+Subject: ehea: fix wrongly reported speed and port
+
+From: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
+
+commit dcbe14b91a920657ff3a9ba0efb7c5b5562f956a upstream.
+
+Currently EHEA reports to ethtool as supporting 10M, 100M, 1G and
+10G and connected to FIBRE independent of the hardware configuration.
+However, when connected to FIBRE the only supported speed is 10G
+full-duplex, and the other speeds and modes are only supported
+when connected to twisted pair.
+
+Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
+Acked-by: Breno Leitao <leitao@linux.vnet.ibm.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/ehea/ehea_ethtool.c | 21 +++++++++++++--------
+ 1 file changed, 13 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ehea/ehea_ethtool.c
++++ b/drivers/net/ehea/ehea_ethtool.c
+@@ -55,15 +55,20 @@ static int ehea_get_settings(struct net_
+ cmd->duplex = -1;
+ }
+
+- cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_1000baseT_Full
+- | SUPPORTED_100baseT_Full | SUPPORTED_100baseT_Half
+- | SUPPORTED_10baseT_Full | SUPPORTED_10baseT_Half
+- | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
+-
+- cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_Autoneg
+- | ADVERTISED_FIBRE);
++ if (cmd->speed == SPEED_10000) {
++ cmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
++ cmd->advertising = (ADVERTISED_10000baseT_Full | ADVERTISED_FIBRE);
++ cmd->port = PORT_FIBRE;
++ } else {
++ cmd->supported = (SUPPORTED_1000baseT_Full | SUPPORTED_100baseT_Full
++ | SUPPORTED_100baseT_Half | SUPPORTED_10baseT_Full
++ | SUPPORTED_10baseT_Half | SUPPORTED_Autoneg
++ | SUPPORTED_TP);
++ cmd->advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg
++ | ADVERTISED_TP);
++ cmd->port = PORT_TP;
++ }
+
+- cmd->port = PORT_FIBRE;
+ cmd->autoneg = port->autoneg == 1 ? AUTONEG_ENABLE : AUTONEG_DISABLE;
+
+ return 0;
diff --git a/queue-2.6.38/ipheth-properly-distinguish-length-and-alignment-in-urbs-and-skbs.patch b/queue-2.6.38/ipheth-properly-distinguish-length-and-alignment-in-urbs-and-skbs.patch
new file mode 100644
index 0000000000..f9648b42d8
--- /dev/null
+++ b/queue-2.6.38/ipheth-properly-distinguish-length-and-alignment-in-urbs-and-skbs.patch
@@ -0,0 +1,64 @@
+From 9c412942a0bb19ba18f7bd939d42eff1e132a901 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <bhutchings@solarflare.com>
+Date: Tue, 3 May 2011 07:49:25 +0000
+Subject: ipheth: Properly distinguish length and alignment in URBs and skbs
+
+From: Ben Hutchings <bhutchings@solarflare.com>
+
+commit 9c412942a0bb19ba18f7bd939d42eff1e132a901 upstream.
+
+The USB protocol this driver implements appears to require 2 bytes of
+padding in front of each received packet. This used to be equal to
+the value of NET_IP_ALIGN on x86, so the driver abused that constant
+and mostly worked, but this is no longer the case. The driver also
+mixed up the URB and packet lengths, resulting in 2 bytes of junk at
+the end of the skb.
+
+Introduce a private constant for the 2 bytes of padding; fix this
+confusion and check for the under-length case.
+
+Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/usb/ipheth.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -65,6 +65,7 @@
+ #define IPHETH_USBINTF_PROTO 1
+
+ #define IPHETH_BUF_SIZE 1516
++#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
+ #define IPHETH_TX_TIMEOUT (5 * HZ)
+
+ #define IPHETH_INTFNUM 2
+@@ -202,18 +203,21 @@ static void ipheth_rcvbulk_callback(stru
+ return;
+ }
+
+- len = urb->actual_length;
+- buf = urb->transfer_buffer;
++ if (urb->actual_length <= IPHETH_IP_ALIGN) {
++ dev->net->stats.rx_length_errors++;
++ return;
++ }
++ len = urb->actual_length - IPHETH_IP_ALIGN;
++ buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
+
+- skb = dev_alloc_skb(NET_IP_ALIGN + len);
++ skb = dev_alloc_skb(len);
+ if (!skb) {
+ err("%s: dev_alloc_skb: -ENOMEM", __func__);
+ dev->net->stats.rx_dropped++;
+ return;
+ }
+
+- skb_reserve(skb, NET_IP_ALIGN);
+- memcpy(skb_put(skb, len), buf + NET_IP_ALIGN, len - NET_IP_ALIGN);
++ memcpy(skb_put(skb, len), buf, len);
+ skb->dev = dev->net;
+ skb->protocol = eth_type_trans(skb, dev->net);
+
diff --git a/queue-2.6.38/mm-use-alloc_bootmem_node_nopanic-on-really-needed-path.patch b/queue-2.6.38/mm-use-alloc_bootmem_node_nopanic-on-really-needed-path.patch
new file mode 100644
index 0000000000..8af1fb65bb
--- /dev/null
+++ b/queue-2.6.38/mm-use-alloc_bootmem_node_nopanic-on-really-needed-path.patch
@@ -0,0 +1,110 @@
+From 8f389a99b652aab5b42297280bd94d95933ad12f Mon Sep 17 00:00:00 2001
+From: Yinghai Lu <yinghai@kernel.org>
+Date: Wed, 11 May 2011 15:13:32 -0700
+Subject: mm: use alloc_bootmem_node_nopanic() on really needed path
+
+From: Yinghai Lu <yinghai@kernel.org>
+
+commit 8f389a99b652aab5b42297280bd94d95933ad12f upstream.
+
+Stefan found nobootmem does not work on his system that has only 8M of
+RAM. This causes an early panic:
+
+ BIOS-provided physical RAM map:
+ BIOS-88: 0000000000000000 - 000000000009f000 (usable)
+ BIOS-88: 0000000000100000 - 0000000000840000 (usable)
+ bootconsole [earlyser0] enabled
+ Notice: NX (Execute Disable) protection missing in CPU or disabled in BIOS!
+ DMI not present or invalid.
+ last_pfn = 0x840 max_arch_pfn = 0x100000
+ init_memory_mapping: 0000000000000000-0000000000840000
+ 8MB LOWMEM available.
+ mapped low ram: 0 - 00840000
+ low ram: 0 - 00840000
+ Zone PFN ranges:
+ DMA 0x00000001 -> 0x00001000
+ Normal empty
+ Movable zone start PFN for each node
+ early_node_map[2] active PFN ranges
+ 0: 0x00000001 -> 0x0000009f
+ 0: 0x00000100 -> 0x00000840
+ BUG: Int 6: CR2 (null)
+ EDI c034663c ESI (null) EBP c0329f38 ESP c0329ef4
+ EBX c0346380 EDX 00000006 ECX ffffffff EAX fffffff4
+ err (null) EIP c0353191 CS c0320060 flg 00010082
+ Stack: (null) c030c533 000007cd (null) c030c533 00000001 (null) (null)
+ 00000003 0000083f 00000018 00000002 00000002 c0329f6c c03534d6 (null)
+ (null) 00000100 00000840 (null) c0329f64 00000001 00001000 (null)
+ Pid: 0, comm: swapper Not tainted 2.6.36 #5
+ Call Trace:
+ [<c02e3707>] ? 0xc02e3707
+ [<c035e6e5>] 0xc035e6e5
+ [<c0353191>] ? 0xc0353191
+ [<c03534d6>] 0xc03534d6
+ [<c034f1cd>] 0xc034f1cd
+ [<c034a824>] 0xc034a824
+ [<c03513cb>] ? 0xc03513cb
+ [<c0349432>] 0xc0349432
+ [<c0349066>] 0xc0349066
+
+It turns out that we should ignore the low limit of 16M.
+
+Use alloc_bootmem_node_nopanic() in this case.
+
+[akpm@linux-foundation.org: less mess]
+Signed-off-by: Yinghai LU <yinghai@kernel.org>
+Reported-by: Stefan Hellermann <stefan@the2masters.de>
+Tested-by: Stefan Hellermann <stefan@the2masters.de>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: "H. Peter Anvin" <hpa@linux.intel.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/bootmem.h | 2 ++
+ mm/page_alloc.c | 7 ++++---
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/include/linux/bootmem.h
++++ b/include/linux/bootmem.h
+@@ -115,6 +115,8 @@ extern void *__alloc_bootmem_low_node(pg
+ __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+ #define alloc_bootmem_node(pgdat, x) \
+ __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
++#define alloc_bootmem_node_nopanic(pgdat, x) \
++ __alloc_bootmem_node_nopanic(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
+ #define alloc_bootmem_pages_node(pgdat, x) \
+ __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
+ #define alloc_bootmem_pages_node_nopanic(pgdat, x) \
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -3498,7 +3498,7 @@ int zone_wait_table_init(struct zone *zo
+
+ if (!slab_is_available()) {
+ zone->wait_table = (wait_queue_head_t *)
+- alloc_bootmem_node(pgdat, alloc_size);
++ alloc_bootmem_node_nopanic(pgdat, alloc_size);
+ } else {
+ /*
+ * This case means that a zone whose size was 0 gets new memory
+@@ -4071,7 +4071,8 @@ static void __init setup_usemap(struct p
+ unsigned long usemapsize = usemap_size(zonesize);
+ zone->pageblock_flags = NULL;
+ if (usemapsize)
+- zone->pageblock_flags = alloc_bootmem_node(pgdat, usemapsize);
++ zone->pageblock_flags = alloc_bootmem_node_nopanic(pgdat,
++ usemapsize);
+ }
+ #else
+ static inline void setup_usemap(struct pglist_data *pgdat,
+@@ -4237,7 +4238,7 @@ static void __init_refok alloc_node_mem_
+ size = (end - start) * sizeof(struct page);
+ map = alloc_remap(pgdat->node_id, size);
+ if (!map)
+- map = alloc_bootmem_node(pgdat, size);
++ map = alloc_bootmem_node_nopanic(pgdat, size);
+ pgdat->node_mem_map = map + (pgdat->node_start_pfn - start);
+ }
+ #ifndef CONFIG_NEED_MULTIPLE_NODES
diff --git a/queue-2.6.38/net-dev_close-should-check-iff_up.patch b/queue-2.6.38/net-dev_close-should-check-iff_up.patch
new file mode 100644
index 0000000000..f9917915a5
--- /dev/null
+++ b/queue-2.6.38/net-dev_close-should-check-iff_up.patch
@@ -0,0 +1,54 @@
+From e14a599335427f81bbb0008963e59aa9c6449dce Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Tue, 10 May 2011 12:26:06 -0700
+Subject: net: dev_close() should check IFF_UP
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+commit e14a599335427f81bbb0008963e59aa9c6449dce upstream.
+
+Commit 443457242beb (factorize sync-rcu call in
+unregister_netdevice_many) mistakenly removed one test from dev_close()
+
+Following actions trigger a BUG :
+
+modprobe bonding
+modprobe dummy
+ifconfig bond0 up
+ifenslave bond0 dummy0
+rmmod dummy
+
+dev_close() must not close a non IFF_UP device.
+
+With help from Frank Blaschka and Einar EL Lueck
+
+Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
+Reported-by: Einar EL Lueck <ELELUECK@de.ibm.com>
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/core/dev.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -1332,11 +1332,13 @@ int dev_close_many(struct list_head *hea
+ */
+ int dev_close(struct net_device *dev)
+ {
+- LIST_HEAD(single);
++ if (dev->flags & IFF_UP) {
++ LIST_HEAD(single);
+
+- list_add(&dev->unreg_list, &single);
+- dev_close_many(&single);
+- list_del(&single);
++ list_add(&dev->unreg_list, &single);
++ dev_close_many(&single);
++ list_del(&single);
++ }
+ return 0;
+ }
+ EXPORT_SYMBOL(dev_close);
diff --git a/queue-2.6.38/net-ip_expire-must-revalidate-route.patch b/queue-2.6.38/net-ip_expire-must-revalidate-route.patch
new file mode 100644
index 0000000000..c3f5c60d6c
--- /dev/null
+++ b/queue-2.6.38/net-ip_expire-must-revalidate-route.patch
@@ -0,0 +1,81 @@
+From 64f3b9e203bd06855072e295557dca1485a2ecba Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Wed, 4 May 2011 10:02:26 +0000
+Subject: net: ip_expire() must revalidate route
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+commit 64f3b9e203bd06855072e295557dca1485a2ecba upstream.
+
+Commit 4a94445c9a5c (net: Use ip_route_input_noref() in input path)
+added a bug in IP defragmentation handling, in case timeout is fired.
+
+When a frame is defragmented, we use last skb dst field when building
+final skb. Its dst is valid, since we are in rcu read section.
+
+But if a timeout occurs, we take first queued fragment to build one ICMP
+TIME EXCEEDED message. Problem is all queued skb have weak dst pointers,
+since we escaped RCU critical section after their queueing. icmp_send()
+might dereference a now freed (and possibly reused) part of memory.
+
+Calling skb_dst_drop() and ip_route_input_noref() to revalidate route is
+the only possible choice.
+
+Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/ipv4/ip_fragment.c | 31 +++++++++++++++----------------
+ 1 file changed, 15 insertions(+), 16 deletions(-)
+
+--- a/net/ipv4/ip_fragment.c
++++ b/net/ipv4/ip_fragment.c
+@@ -223,31 +223,30 @@ static void ip_expire(unsigned long arg)
+
+ if ((qp->q.last_in & INET_FRAG_FIRST_IN) && qp->q.fragments != NULL) {
+ struct sk_buff *head = qp->q.fragments;
++ const struct iphdr *iph;
++ int err;
+
+ rcu_read_lock();
+ head->dev = dev_get_by_index_rcu(net, qp->iif);
+ if (!head->dev)
+ goto out_rcu_unlock;
+
++ /* skb dst is stale, drop it, and perform route lookup again */
++ skb_dst_drop(head);
++ iph = ip_hdr(head);
++ err = ip_route_input_noref(head, iph->daddr, iph->saddr,
++ iph->tos, head->dev);
++ if (err)
++ goto out_rcu_unlock;
++
+ /*
+- * Only search router table for the head fragment,
+- * when defraging timeout at PRE_ROUTING HOOK.
++ * Only an end host needs to send an ICMP
++ * "Fragment Reassembly Timeout" message, per RFC792.
+ */
+- if (qp->user == IP_DEFRAG_CONNTRACK_IN && !skb_dst(head)) {
+- const struct iphdr *iph = ip_hdr(head);
+- int err = ip_route_input(head, iph->daddr, iph->saddr,
+- iph->tos, head->dev);
+- if (unlikely(err))
+- goto out_rcu_unlock;
+-
+- /*
+- * Only an end host needs to send an ICMP
+- * "Fragment Reassembly Timeout" message, per RFC792.
+- */
+- if (skb_rtable(head)->rt_type != RTN_LOCAL)
+- goto out_rcu_unlock;
++ if (qp->user == IP_DEFRAG_CONNTRACK_IN &&
++ skb_rtable(head)->rt_type != RTN_LOCAL)
++ goto out_rcu_unlock;
+
+- }
+
+ /* Send an ICMP "Fragment Reassembly Timeout" message. */
+ icmp_send(head, ICMP_TIME_EXCEEDED, ICMP_EXC_FRAGTIME, 0);
diff --git a/queue-2.6.38/net-slip-fix-ldisc-open-retval.patch b/queue-2.6.38/net-slip-fix-ldisc-open-retval.patch
new file mode 100644
index 0000000000..29e56f23ad
--- /dev/null
+++ b/queue-2.6.38/net-slip-fix-ldisc-open-retval.patch
@@ -0,0 +1,34 @@
+From 057bef938896e6266ae24ec4266d24792d27c29a Mon Sep 17 00:00:00 2001
+From: Matvejchikov Ilya <matvejchikov@gmail.com>
+Date: Fri, 6 May 2011 06:23:09 +0000
+Subject: NET: slip, fix ldisc->open retval
+
+From: Matvejchikov Ilya <matvejchikov@gmail.com>
+
+commit 057bef938896e6266ae24ec4266d24792d27c29a upstream.
+
+TTY layer expects 0 if the ldisc->open operation succeeded.
+
+Signed-off-by : Matvejchikov Ilya <matvejchikov@gmail.com>
+Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
+Acked-by: Alan Cox <alan@linux.intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/slip.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/slip.c
++++ b/drivers/net/slip.c
+@@ -853,7 +853,9 @@ static int slip_open(struct tty_struct *
+ /* Done. We have linked the TTY line to a channel. */
+ rtnl_unlock();
+ tty->receive_room = 65536; /* We don't flow control */
+- return sl->dev->base_addr;
++
++ /* TTY layer expects 0 on success */
++ return 0;
+
+ err_free_bufs:
+ sl_free_bufs(sl);
diff --git a/queue-2.6.38/pch_gbe-fixed-the-issue-of-checksum-judgment.patch b/queue-2.6.38/pch_gbe-fixed-the-issue-of-checksum-judgment.patch
new file mode 100644
index 0000000000..1b3e944505
--- /dev/null
+++ b/queue-2.6.38/pch_gbe-fixed-the-issue-of-checksum-judgment.patch
@@ -0,0 +1,42 @@
+From 5d05a04d283061b586e8dc819cfa6f4b8cfd5948 Mon Sep 17 00:00:00 2001
+From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+Date: Fri, 6 May 2011 02:53:56 +0000
+Subject: PCH_GbE : Fixed the issue of checksum judgment
+
+From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+
+commit 5d05a04d283061b586e8dc819cfa6f4b8cfd5948 upstream.
+
+The checksum judgment was mistaken.
+ Judgment result
+ 0:Correct 1:Wrong
+
+This patch fixes the issue.
+
+Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/pch_gbe/pch_gbe_main.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/pch_gbe/pch_gbe_main.c
++++ b/drivers/net/pch_gbe/pch_gbe_main.c
+@@ -1493,12 +1493,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter
+ /* Write meta date of skb */
+ skb_put(skb, length);
+ skb->protocol = eth_type_trans(skb, netdev);
+- if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) ==
+- PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
+- skb->ip_summed = CHECKSUM_UNNECESSARY;
+- } else {
++ if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
+ skb->ip_summed = CHECKSUM_NONE;
+- }
++ else
++ skb->ip_summed = CHECKSUM_UNNECESSARY;
++
+ napi_gro_receive(&adapter->napi, skb);
+ (*work_done)++;
+ pr_debug("Receive skb->ip_summed: %d length: %d\n",
diff --git a/queue-2.6.38/pch_gbe-fixed-the-issue-of-collision-detection.patch b/queue-2.6.38/pch_gbe-fixed-the-issue-of-collision-detection.patch
new file mode 100644
index 0000000000..3c062ac388
--- /dev/null
+++ b/queue-2.6.38/pch_gbe-fixed-the-issue-of-collision-detection.patch
@@ -0,0 +1,35 @@
+From ce3dad0f74e6b240f0b1dedbd8ea268a3f298d82 Mon Sep 17 00:00:00 2001
+From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+Date: Fri, 6 May 2011 02:53:51 +0000
+Subject: PCH_GbE : Fixed the issue of collision detection
+
+From: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+
+commit ce3dad0f74e6b240f0b1dedbd8ea268a3f298d82 upstream.
+
+The collision detection setting was invalid.
+When collision occurred, because data was not resent,
+there was an issue to which a transmitting throughput falls.
+
+This patch enables the collision detection.
+
+Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/pch_gbe/pch_gbe_main.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/pch_gbe/pch_gbe_main.c
++++ b/drivers/net/pch_gbe/pch_gbe_main.c
+@@ -43,8 +43,7 @@ const char pch_driver_version[] = DRV_VE
+
+ #define PCH_GBE_MAC_RGMII_CTRL_SETTING ( \
+ PCH_GBE_CHIP_TYPE_INTERNAL | \
+- PCH_GBE_RGMII_MODE_RGMII | \
+- PCH_GBE_CRS_SEL \
++ PCH_GBE_RGMII_MODE_RGMII \
+ )
+
+ /* Ethertype field values */
diff --git a/queue-2.6.38/pch_gbe-support-ml7223-ioh.patch b/queue-2.6.38/pch_gbe-support-ml7223-ioh.patch
new file mode 100644
index 0000000000..84b442d454
--- /dev/null
+++ b/queue-2.6.38/pch_gbe-support-ml7223-ioh.patch
@@ -0,0 +1,74 @@
+From b0e6baf5619a6fa3eaf43b55fdb4daa362c3c916 Mon Sep 17 00:00:00 2001
+From: Tomoya <tomoya-linux@dsn.okisemi.com>
+Date: Mon, 9 May 2011 01:19:37 +0000
+Subject: pch_gbe: support ML7223 IOH
+
+From: Tomoya <tomoya-linux@dsn.okisemi.com>
+
+commit b0e6baf5619a6fa3eaf43b55fdb4daa362c3c916 upstream.
+
+Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub).
+The ML7223 IOH is for MP(Media Phone) use.
+The ML7223 is companion chip for Intel Atom E6xx series.
+The ML7223 is completely compatible for Intel EG20T PCH.
+
+Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/Kconfig | 8 +++++++-
+ drivers/net/pch_gbe/pch_gbe_main.c | 11 +++++++++++
+ 2 files changed, 18 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -2533,7 +2533,7 @@ config S6GMAC
+ source "drivers/net/stmmac/Kconfig"
+
+ config PCH_GBE
+- tristate "PCH Gigabit Ethernet"
++ tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GbE"
+ depends on PCI
+ select MII
+ ---help---
+@@ -2545,6 +2545,12 @@ config PCH_GBE
+ to Gigabit Ethernet.
+ This driver enables Gigabit Ethernet function.
+
++ This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
++ Output Hub), ML7223.
++ ML7223 IOH is for MP(Media Phone) use.
++ ML7223 is companion chip for Intel Atom E6xx series.
++ ML7223 is completely compatible for Intel EG20T PCH.
++
+ endif # NETDEV_1000
+
+ #
+--- a/drivers/net/pch_gbe/pch_gbe_main.c
++++ b/drivers/net/pch_gbe/pch_gbe_main.c
+@@ -34,6 +34,10 @@ const char pch_driver_version[] = DRV_VE
+ #define PCH_GBE_COPYBREAK_DEFAULT 256
+ #define PCH_GBE_PCI_BAR 1
+
++/* Macros for ML7223 */
++#define PCI_VENDOR_ID_ROHM 0x10db
++#define PCI_DEVICE_ID_ROHM_ML7223_GBE 0x8013
++
+ #define PCH_GBE_TX_WEIGHT 64
+ #define PCH_GBE_RX_WEIGHT 64
+ #define PCH_GBE_RX_BUFFER_WRITE 16
+@@ -2416,6 +2420,13 @@ static DEFINE_PCI_DEVICE_TABLE(pch_gbe_p
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
++ .class_mask = (0xFFFF00)
++ },
++ {.vendor = PCI_VENDOR_ID_ROHM,
++ .device = PCI_DEVICE_ID_ROHM_ML7223_GBE,
++ .subvendor = PCI_ANY_ID,
++ .subdevice = PCI_ANY_ID,
++ .class = (PCI_CLASS_NETWORK_ETHERNET << 8),
+ .class_mask = (0xFFFF00)
+ },
+ /* required last entry */
diff --git a/queue-2.6.38/pm-fix-warning-in-pm_restrict_gfp_mask-during-snapshot_s2ram-ioctl.patch b/queue-2.6.38/pm-fix-warning-in-pm_restrict_gfp_mask-during-snapshot_s2ram-ioctl.patch
new file mode 100644
index 0000000000..63b608d97b
--- /dev/null
+++ b/queue-2.6.38/pm-fix-warning-in-pm_restrict_gfp_mask-during-snapshot_s2ram-ioctl.patch
@@ -0,0 +1,56 @@
+From 87186475a402391a1ca7d42a675c9b35a18dc348 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Tue, 10 May 2011 21:09:53 +0200
+Subject: PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit 87186475a402391a1ca7d42a675c9b35a18dc348 upstream.
+
+A warning is printed by pm_restrict_gfp_mask() while the
+SNAPSHOT_S2RAM ioctl is being executed after creating a hibernation
+image, because pm_restrict_gfp_mask() has been called once already
+before the image creation and suspend_devices_and_enter() calls it
+once again. This happens after commit 452aa6999e6703ffbddd7f6ea124d3
+(mm/pm: force GFP_NOIO during suspend/hibernation and resume).
+
+To avoid this issue, move pm_restrict_gfp_mask() and
+pm_restore_gfp_mask() from suspend_devices_and_enter() to its caller
+in kernel/power/suspend.c.
+
+Reported-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/power/suspend.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/kernel/power/suspend.c
++++ b/kernel/power/suspend.c
+@@ -209,7 +209,6 @@ int suspend_devices_and_enter(suspend_st
+ goto Close;
+ }
+ suspend_console();
+- pm_restrict_gfp_mask();
+ suspend_test_start();
+ error = dpm_suspend_start(PMSG_SUSPEND);
+ if (error) {
+@@ -226,7 +225,6 @@ int suspend_devices_and_enter(suspend_st
+ suspend_test_start();
+ dpm_resume_end(PMSG_RESUME);
+ suspend_test_finish("resume devices");
+- pm_restore_gfp_mask();
+ resume_console();
+ Close:
+ if (suspend_ops->end)
+@@ -287,7 +285,9 @@ int enter_state(suspend_state_t state)
+ goto Finish;
+
+ pr_debug("PM: Entering %s sleep\n", pm_states[state]);
++ pm_restrict_gfp_mask();
+ error = suspend_devices_and_enter(state);
++ pm_restore_gfp_mask();
+
+ Finish:
+ pr_debug("PM: Finishing wakeup.\n");
diff --git a/queue-2.6.38/pm-hibernate-fix-ioctl-snapshot_s2ram.patch b/queue-2.6.38/pm-hibernate-fix-ioctl-snapshot_s2ram.patch
new file mode 100644
index 0000000000..6df3c43eb9
--- /dev/null
+++ b/queue-2.6.38/pm-hibernate-fix-ioctl-snapshot_s2ram.patch
@@ -0,0 +1,36 @@
+From 36cb7035ea0c11ef2c7fa2bbe0cd181b23569b29 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Tue, 10 May 2011 21:10:13 +0200
+Subject: PM / Hibernate: Fix ioctl SNAPSHOT_S2RAM
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit 36cb7035ea0c11ef2c7fa2bbe0cd181b23569b29 upstream.
+
+The SNAPSHOT_S2RAM ioctl used for implementing the feature allowing
+one to suspend to RAM after creating a hibernation image is currently
+broken, because it doesn't clear the "ready" flag in the struct
+snapshot_data object handled by it. As a result, the
+SNAPSHOT_UNFREEZE doesn't work correctly after SNAPSHOT_S2RAM has
+returned and the user space hibernate task cannot thaw the other
+processes as appropriate. Make SNAPSHOT_S2RAM clear data->ready
+to fix this problem.
+
+Tested-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/power/user.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/power/user.c
++++ b/kernel/power/user.c
+@@ -381,6 +381,7 @@ static long snapshot_ioctl(struct file *
+ * PM_HIBERNATION_PREPARE
+ */
+ error = suspend_devices_and_enter(PM_SUSPEND_MEM);
++ data->ready = 0;
+ break;
+
+ case SNAPSHOT_PLATFORM_SUPPORT:
diff --git a/queue-2.6.38/pm-hibernate-make-snapshot_release-restore-gfp-mask.patch b/queue-2.6.38/pm-hibernate-make-snapshot_release-restore-gfp-mask.patch
new file mode 100644
index 0000000000..5f1b06613a
--- /dev/null
+++ b/queue-2.6.38/pm-hibernate-make-snapshot_release-restore-gfp-mask.patch
@@ -0,0 +1,37 @@
+From 9744997a8a2280e67984d4bffd87221d24f3b6b1 Mon Sep 17 00:00:00 2001
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Tue, 10 May 2011 21:10:01 +0200
+Subject: PM / Hibernate: Make snapshot_release() restore GFP mask
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+commit 9744997a8a2280e67984d4bffd87221d24f3b6b1 upstream.
+
+If the process using the hibernate user space interface closes
+/dev/snapshot after creating a hibernation image without thawing
+tasks, snapshot_release() should call pm_restore_gfp_mask() to
+restore the GFP mask used before the creation of the image. Make
+that happen.
+
+Tested-by: Alexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ kernel/power/user.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/kernel/power/user.c
++++ b/kernel/power/user.c
+@@ -135,8 +135,10 @@ static int snapshot_release(struct inode
+ free_basic_memory_bitmaps();
+ data = filp->private_data;
+ free_all_swap_pages(data->swap);
+- if (data->frozen)
++ if (data->frozen) {
++ pm_restore_gfp_mask();
+ thaw_processes();
++ }
+ pm_notifier_call_chain(data->mode == O_RDONLY ?
+ PM_POST_HIBERNATION : PM_POST_RESTORE);
+ atomic_inc(&snapshot_device_available);
diff --git a/queue-2.6.38/series b/queue-2.6.38/series
index ce4c58b7a5..f8f2f218bb 100644
--- a/queue-2.6.38/series
+++ b/queue-2.6.38/series
@@ -18,3 +18,21 @@ drm-i915-lvds-only-act-on-lid-notify-when-the-device-is-on.patch
drm-i915-release-object-along-create-user-fb-error-path.patch
dccp-handle-invalid-feature-options-length.patch
cifs-fix-memory-over-bound-bug-in-cifs_parse_mount_options.patch
+drivers-rtc-rtc-s3c.c-fixup-wake-support-for-rtc.patch
+mm-use-alloc_bootmem_node_nopanic-on-really-needed-path.patch
+tmpfs-fix-race-between-umount-and-swapoff.patch
+arm-zimage-make-sure-the-stack-is-64-bit-aligned.patch
+pm-fix-warning-in-pm_restrict_gfp_mask-during-snapshot_s2ram-ioctl.patch
+pm-hibernate-make-snapshot_release-restore-gfp-mask.patch
+pm-hibernate-fix-ioctl-snapshot_s2ram.patch
+net-ip_expire-must-revalidate-route.patch
+can-fix-sja1000-dlc-for-rtr-packets.patch
+ipheth-properly-distinguish-length-and-alignment-in-urbs-and-skbs.patch
+vmxnet3-consistently-disable-irqs-when-taking-adapter-cmd_lock.patch
+ehea-fix-wrongly-reported-speed-and-port.patch
+net-slip-fix-ldisc-open-retval.patch
+pch_gbe-fixed-the-issue-of-collision-detection.patch
+pch_gbe-fixed-the-issue-of-checksum-judgment.patch
+pch_gbe-support-ml7223-ioh.patch
+net-dev_close-should-check-iff_up.patch
+slcan-fix-ldisc-open-retval.patch
diff --git a/queue-2.6.38/slcan-fix-ldisc-open-retval.patch b/queue-2.6.38/slcan-fix-ldisc-open-retval.patch
new file mode 100644
index 0000000000..bd95486f14
--- /dev/null
+++ b/queue-2.6.38/slcan-fix-ldisc-open-retval.patch
@@ -0,0 +1,33 @@
+From 0d4420a90b51abdea71585f571bad6d789ff8eb7 Mon Sep 17 00:00:00 2001
+From: Oliver Hartkopp <socketcan@hartkopp.net>
+Date: Tue, 10 May 2011 13:12:30 -0700
+Subject: slcan: fix ldisc->open retval
+
+From: Oliver Hartkopp <socketcan@hartkopp.net>
+
+commit 0d4420a90b51abdea71585f571bad6d789ff8eb7 upstream.
+
+TTY layer expects 0 if the ldisc->open operation succeeded.
+
+Reported-by: Matvejchikov Ilya <matvejchikov@gmail.com>
+Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/can/slcan.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/can/slcan.c
++++ b/drivers/net/can/slcan.c
+@@ -583,7 +583,9 @@ static int slcan_open(struct tty_struct
+ /* Done. We have linked the TTY line to a channel. */
+ rtnl_unlock();
+ tty->receive_room = 65536; /* We don't flow control */
+- return sl->dev->base_addr;
++
++ /* TTY layer expects 0 on success */
++ return 0;
+
+ err_free_chan:
+ sl->tty = NULL;
diff --git a/queue-2.6.38/tmpfs-fix-race-between-umount-and-swapoff.patch b/queue-2.6.38/tmpfs-fix-race-between-umount-and-swapoff.patch
new file mode 100644
index 0000000000..d9242ded1e
--- /dev/null
+++ b/queue-2.6.38/tmpfs-fix-race-between-umount-and-swapoff.patch
@@ -0,0 +1,201 @@
+From 778dd893ae785c5fd505dac30b5fc40aae188bf1 Mon Sep 17 00:00:00 2001
+From: Hugh Dickins <hughd@google.com>
+Date: Wed, 11 May 2011 15:13:37 -0700
+Subject: tmpfs: fix race between umount and swapoff
+
+From: Hugh Dickins <hughd@google.com>
+
+commit 778dd893ae785c5fd505dac30b5fc40aae188bf1 upstream.
+
+The use of igrab() in swapoff's shmem_unuse_inode() is just as vulnerable
+to umount as that in shmem_writepage().
+
+Fix this instance by extending the protection of shmem_swaplist_mutex
+right across shmem_unuse_inode(): while it's on the list, the inode cannot
+be evicted (and the filesystem cannot be unmounted) without
+shmem_evict_inode() taking that mutex to remove it from the list.
+
+But since shmem_writepage() might take that mutex, we should avoid making
+memory allocations or memcg charges while holding it: prepare them at the
+outer level in shmem_unuse(). When mem_cgroup_cache_charge() was
+originally placed, we didn't know until that point that the page from swap
+was actually a shmem page; but nowadays it's noted in the swap_map, so
+we're safe to charge upfront. For the radix_tree, do as is done in
+shmem_getpage(): preload upfront, but don't pin to the cpu; so we make a
+habit of refreshing the node pool, but might dip into GFP_NOWAIT reserves
+on occasion if subsequently preempted.
+
+With the allocation and charge moved out from shmem_unuse_inode(),
+we can also hold index map and info->lock over from finding the entry.
+
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Cc: Konstantin Khlebnikov <khlebnikov@openvz.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>
+
+---
+ mm/shmem.c | 88 +++++++++++++++++++++++++++++--------------------------------
+ 1 file changed, 43 insertions(+), 45 deletions(-)
+
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -852,7 +852,7 @@ static inline int shmem_find_swp(swp_ent
+
+ static int shmem_unuse_inode(struct shmem_inode_info *info, swp_entry_t entry, struct page *page)
+ {
+- struct inode *inode;
++ struct address_space *mapping;
+ unsigned long idx;
+ unsigned long size;
+ unsigned long limit;
+@@ -875,8 +875,10 @@ static int shmem_unuse_inode(struct shme
+ if (size > SHMEM_NR_DIRECT)
+ size = SHMEM_NR_DIRECT;
+ offset = shmem_find_swp(entry, ptr, ptr+size);
+- if (offset >= 0)
++ if (offset >= 0) {
++ shmem_swp_balance_unmap();
+ goto found;
++ }
+ if (!info->i_indirect)
+ goto lost2;
+
+@@ -914,11 +916,11 @@ static int shmem_unuse_inode(struct shme
+ if (size > ENTRIES_PER_PAGE)
+ size = ENTRIES_PER_PAGE;
+ offset = shmem_find_swp(entry, ptr, ptr+size);
+- shmem_swp_unmap(ptr);
+ if (offset >= 0) {
+ shmem_dir_unmap(dir);
+ goto found;
+ }
++ shmem_swp_unmap(ptr);
+ }
+ }
+ lost1:
+@@ -928,8 +930,7 @@ lost2:
+ return 0;
+ found:
+ idx += offset;
+- inode = igrab(&info->vfs_inode);
+- spin_unlock(&info->lock);
++ ptr += offset;
+
+ /*
+ * Move _head_ to start search for next from here.
+@@ -940,37 +941,18 @@ found:
+ */
+ if (shmem_swaplist.next != &info->swaplist)
+ list_move_tail(&shmem_swaplist, &info->swaplist);
+- mutex_unlock(&shmem_swaplist_mutex);
+
+- error = 1;
+- if (!inode)
+- goto out;
+ /*
+- * Charge page using GFP_KERNEL while we can wait.
+- * Charged back to the user(not to caller) when swap account is used.
+- * add_to_page_cache() will be called with GFP_NOWAIT.
++ * We rely on shmem_swaplist_mutex, not only to protect the swaplist,
++ * but also to hold up shmem_evict_inode(): so inode cannot be freed
++ * beneath us (pagelock doesn't help until the page is in pagecache).
+ */
+- error = mem_cgroup_cache_charge(page, current->mm, GFP_KERNEL);
+- if (error)
+- goto out;
+- error = radix_tree_preload(GFP_KERNEL);
+- if (error) {
+- mem_cgroup_uncharge_cache_page(page);
+- goto out;
+- }
+- error = 1;
+-
+- spin_lock(&info->lock);
+- ptr = shmem_swp_entry(info, idx, NULL);
+- if (ptr && ptr->val == entry.val) {
+- error = add_to_page_cache_locked(page, inode->i_mapping,
+- idx, GFP_NOWAIT);
+- /* does mem_cgroup_uncharge_cache_page on error */
+- } else /* we must compensate for our precharge above */
+- mem_cgroup_uncharge_cache_page(page);
++ mapping = info->vfs_inode.i_mapping;
++ error = add_to_page_cache_locked(page, mapping, idx, GFP_NOWAIT);
++ /* which does mem_cgroup_uncharge_cache_page on error */
+
+ if (error == -EEXIST) {
+- struct page *filepage = find_get_page(inode->i_mapping, idx);
++ struct page *filepage = find_get_page(mapping, idx);
+ error = 1;
+ if (filepage) {
+ /*
+@@ -990,14 +972,8 @@ found:
+ swap_free(entry);
+ error = 1; /* not an error, but entry was found */
+ }
+- if (ptr)
+- shmem_swp_unmap(ptr);
++ shmem_swp_unmap(ptr);
+ spin_unlock(&info->lock);
+- radix_tree_preload_end();
+-out:
+- unlock_page(page);
+- page_cache_release(page);
+- iput(inode); /* allows for NULL */
+ return error;
+ }
+
+@@ -1009,6 +985,26 @@ int shmem_unuse(swp_entry_t entry, struc
+ struct list_head *p, *next;
+ struct shmem_inode_info *info;
+ int found = 0;
++ int error;
++
++ /*
++ * Charge page using GFP_KERNEL while we can wait, before taking
++ * the shmem_swaplist_mutex which might hold up shmem_writepage().
++ * Charged back to the user (not to caller) when swap account is used.
++ * add_to_page_cache() will be called with GFP_NOWAIT.
++ */
++ error = mem_cgroup_cache_charge(page, current->mm, GFP_KERNEL);
++ if (error)
++ goto out;
++ /*
++ * Try to preload while we can wait, to not make a habit of
++ * draining atomic reserves; but don't latch on to this cpu,
++ * it's okay if sometimes we get rescheduled after this.
++ */
++ error = radix_tree_preload(GFP_KERNEL);
++ if (error)
++ goto uncharge;
++ radix_tree_preload_end();
+
+ mutex_lock(&shmem_swaplist_mutex);
+ list_for_each_safe(p, next, &shmem_swaplist) {
+@@ -1016,17 +1012,19 @@ int shmem_unuse(swp_entry_t entry, struc
+ found = shmem_unuse_inode(info, entry, page);
+ cond_resched();
+ if (found)
+- goto out;
++ break;
+ }
+ mutex_unlock(&shmem_swaplist_mutex);
+- /*
+- * Can some race bring us here? We've been holding page lock,
+- * so I think not; but would rather try again later than BUG()
+- */
++
++uncharge:
++ if (!found)
++ mem_cgroup_uncharge_cache_page(page);
++ if (found < 0)
++ error = found;
++out:
+ unlock_page(page);
+ page_cache_release(page);
+-out:
+- return (found < 0) ? found : 0;
++ return error;
+ }
+
+ /*
diff --git a/queue-2.6.38/vmxnet3-consistently-disable-irqs-when-taking-adapter-cmd_lock.patch b/queue-2.6.38/vmxnet3-consistently-disable-irqs-when-taking-adapter-cmd_lock.patch
new file mode 100644
index 0000000000..6a4f0c4d71
--- /dev/null
+++ b/queue-2.6.38/vmxnet3-consistently-disable-irqs-when-taking-adapter-cmd_lock.patch
@@ -0,0 +1,398 @@
+From e328d410826d52e9ee348aff9064c4a207f2adb1 Mon Sep 17 00:00:00 2001
+From: Roland Dreier <roland@purestorage.com>
+Date: Fri, 6 May 2011 08:32:53 +0000
+Subject: vmxnet3: Consistently disable irqs when taking adapter->cmd_lock
+
+From: Roland Dreier <roland@purestorage.com>
+
+commit e328d410826d52e9ee348aff9064c4a207f2adb1 upstream.
+
+Using the vmxnet3 driver produces a lockdep warning because
+vmxnet3_set_mc(), which is called with mc->mca_lock held, takes
+adapter->cmd_lock. However, there are a couple of places where
+adapter->cmd_lock is taken with softirqs enabled, lockdep warns that a
+softirq that tries to take mc->mca_lock could happen while
+adapter->cmd_lock is held, leading to an AB-BA deadlock.
+
+I'm not sure if this is a real potential deadlock or not, but the
+simplest and best fix seems to be simply to make sure we take cmd_lock
+with spin_lock_irqsave() everywhere -- the places with plain spin_lock
+just look like oversights.
+
+The full enormous lockdep warning is:
+
+ =========================================================
+ [ INFO: possible irq lock inversion dependency detected ]
+ 2.6.39-rc6+ #1
+ ---------------------------------------------------------
+ ifconfig/567 just changed the state of lock:
+ (&(&mc->mca_lock)->rlock){+.-...}, at: [<ffffffff81531e9f>] mld_ifc_timer_expire+0xff/0x280
+ but this lock took another, SOFTIRQ-unsafe lock in the past:
+ (&(&adapter->cmd_lock)->rlock){+.+...}
+
+ and interrupts could create inverse lock ordering between them.
+
+ other info that might help us debug this:
+ 4 locks held by ifconfig/567:
+ #0: (rtnl_mutex){+.+.+.}, at: [<ffffffff8147d547>] rtnl_lock+0x17/0x20
+ #1: ((inetaddr_chain).rwsem){.+.+.+}, at: [<ffffffff810896cf>] __blocking_notifier_call_chain+0x5f/0xb0
+ #2: (&idev->mc_ifc_timer){+.-...}, at: [<ffffffff8106f21b>] run_timer_softirq+0xeb/0x3f0
+ #3: (&ndev->lock){++.-..}, at: [<ffffffff81531dd2>] mld_ifc_timer_expire+0x32/0x280
+
+ the shortest dependencies between 2nd lock and 1st lock:
+ -> (&(&adapter->cmd_lock)->rlock){+.+...} ops: 11 {
+ HARDIRQ-ON-W at:
+ [<ffffffff8109ad86>] __lock_acquire+0x7f6/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff81571156>] _raw_spin_lock+0x36/0x70
+ [<ffffffffa000d212>] vmxnet3_alloc_intr_resources+0x22/0x230 [vmxnet3]
+ [<ffffffffa0014031>] vmxnet3_probe_device+0x5f6/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ SOFTIRQ-ON-W at:
+ [<ffffffff8109adb7>] __lock_acquire+0x827/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff81571156>] _raw_spin_lock+0x36/0x70
+ [<ffffffffa000d212>] vmxnet3_alloc_intr_resources+0x22/0x230 [vmxnet3]
+ [<ffffffffa0014031>] vmxnet3_probe_device+0x5f6/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ INITIAL USE at:
+ [<ffffffff8109a9e9>] __lock_acquire+0x459/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff81571156>] _raw_spin_lock+0x36/0x70
+ [<ffffffffa000d212>] vmxnet3_alloc_intr_resources+0x22/0x230 [vmxnet3]
+ [<ffffffffa0014031>] vmxnet3_probe_device+0x5f6/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ }
+ ... key at: [<ffffffffa0017590>] __key.42516+0x0/0xffffffffffffda70 [vmxnet3]
+ ... acquired at:
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff81571bb5>] _raw_spin_lock_irqsave+0x55/0xa0
+ [<ffffffffa000de27>] vmxnet3_set_mc+0x97/0x1a0 [vmxnet3]
+ [<ffffffff8146ffa0>] __dev_set_rx_mode+0x40/0xb0
+ [<ffffffff81470040>] dev_set_rx_mode+0x30/0x50
+ [<ffffffff81470127>] __dev_open+0xc7/0x100
+ [<ffffffff814703c1>] __dev_change_flags+0xa1/0x180
+ [<ffffffff81470568>] dev_change_flags+0x28/0x70
+ [<ffffffff814da960>] devinet_ioctl+0x730/0x800
+ [<ffffffff814db508>] inet_ioctl+0x88/0xa0
+ [<ffffffff814541f0>] sock_do_ioctl+0x30/0x70
+ [<ffffffff814542a9>] sock_ioctl+0x79/0x2f0
+ [<ffffffff81188798>] do_vfs_ioctl+0x98/0x570
+ [<ffffffff81188d01>] sys_ioctl+0x91/0xa0
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+
+ -> (_xmit_ETHER){+.....} ops: 6 {
+ HARDIRQ-ON-W at:
+ [<ffffffff8109ad86>] __lock_acquire+0x7f6/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81475618>] __dev_mc_add+0x38/0x90
+ [<ffffffff814756a0>] dev_mc_add+0x10/0x20
+ [<ffffffff81532c9e>] igmp6_group_added+0x10e/0x1b0
+ [<ffffffff81533f2d>] ipv6_dev_mc_inc+0x2cd/0x430
+ [<ffffffff81515e17>] ipv6_add_dev+0x357/0x450
+ [<ffffffff81519f27>] addrconf_notify+0x2f7/0xb10
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff81089586>] raw_notifier_call_chain+0x16/0x20
+ [<ffffffff814689b7>] call_netdevice_notifiers+0x37/0x70
+ [<ffffffff8146a944>] register_netdevice+0x244/0x2d0
+ [<ffffffff8146aa0f>] register_netdev+0x3f/0x60
+ [<ffffffffa001419b>] vmxnet3_probe_device+0x760/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ INITIAL USE at:
+ [<ffffffff8109a9e9>] __lock_acquire+0x459/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81475618>] __dev_mc_add+0x38/0x90
+ [<ffffffff814756a0>] dev_mc_add+0x10/0x20
+ [<ffffffff81532c9e>] igmp6_group_added+0x10e/0x1b0
+ [<ffffffff81533f2d>] ipv6_dev_mc_inc+0x2cd/0x430
+ [<ffffffff81515e17>] ipv6_add_dev+0x357/0x450
+ [<ffffffff81519f27>] addrconf_notify+0x2f7/0xb10
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff81089586>] raw_notifier_call_chain+0x16/0x20
+ [<ffffffff814689b7>] call_netdevice_notifiers+0x37/0x70
+ [<ffffffff8146a944>] register_netdevice+0x244/0x2d0
+ [<ffffffff8146aa0f>] register_netdev+0x3f/0x60
+ [<ffffffffa001419b>] vmxnet3_probe_device+0x760/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ }
+ ... key at: [<ffffffff827fd868>] netdev_addr_lock_key+0x8/0x1e0
+ ... acquired at:
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81475618>] __dev_mc_add+0x38/0x90
+ [<ffffffff814756a0>] dev_mc_add+0x10/0x20
+ [<ffffffff81532c9e>] igmp6_group_added+0x10e/0x1b0
+ [<ffffffff81533f2d>] ipv6_dev_mc_inc+0x2cd/0x430
+ [<ffffffff81515e17>] ipv6_add_dev+0x357/0x450
+ [<ffffffff81519f27>] addrconf_notify+0x2f7/0xb10
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff81089586>] raw_notifier_call_chain+0x16/0x20
+ [<ffffffff814689b7>] call_netdevice_notifiers+0x37/0x70
+ [<ffffffff8146a944>] register_netdevice+0x244/0x2d0
+ [<ffffffff8146aa0f>] register_netdev+0x3f/0x60
+ [<ffffffffa001419b>] vmxnet3_probe_device+0x760/0x15c5 [vmxnet3]
+ [<ffffffff812df67f>] local_pci_probe+0x5f/0xd0
+ [<ffffffff812dfde9>] pci_device_probe+0x119/0x120
+ [<ffffffff81373df6>] driver_probe_device+0x96/0x1c0
+ [<ffffffff81373fcb>] __driver_attach+0xab/0xb0
+ [<ffffffff81372a1e>] bus_for_each_dev+0x5e/0x90
+ [<ffffffff81373a2e>] driver_attach+0x1e/0x20
+ [<ffffffff813735b8>] bus_add_driver+0xc8/0x290
+ [<ffffffff813745b6>] driver_register+0x76/0x140
+ [<ffffffff812e0046>] __pci_register_driver+0x66/0xe0
+ [<ffffffffa001b03a>] serio_raw_poll+0x3a/0x60 [serio_raw]
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff810aa76b>] sys_init_module+0xfb/0x250
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+
+ -> (&(&mc->mca_lock)->rlock){+.-...} ops: 6 {
+ HARDIRQ-ON-W at:
+ [<ffffffff8109ad86>] __lock_acquire+0x7f6/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81532bd5>] igmp6_group_added+0x45/0x1b0
+ [<ffffffff81533f2d>] ipv6_dev_mc_inc+0x2cd/0x430
+ [<ffffffff81515e17>] ipv6_add_dev+0x357/0x450
+ [<ffffffff81ce0d16>] addrconf_init+0x4e/0x183
+ [<ffffffff81ce0ba1>] inet6_init+0x191/0x2a6
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff81ca4d3f>] kernel_init+0xe3/0x168
+ [<ffffffff8157b2e4>] kernel_thread_helper+0x4/0x10
+ IN-SOFTIRQ-W at:
+ [<ffffffff8109ad5e>] __lock_acquire+0x7ce/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81531e9f>] mld_ifc_timer_expire+0xff/0x280
+ [<ffffffff8106f2a9>] run_timer_softirq+0x179/0x3f0
+ [<ffffffff810666d0>] __do_softirq+0xc0/0x210
+ [<ffffffff8157b3dc>] call_softirq+0x1c/0x30
+ [<ffffffff8100d42d>] do_softirq+0xad/0xe0
+ [<ffffffff81066afe>] irq_exit+0x9e/0xb0
+ [<ffffffff8157bd40>] smp_apic_timer_interrupt+0x70/0x9b
+ [<ffffffff8157ab93>] apic_timer_interrupt+0x13/0x20
+ [<ffffffff8149d857>] rt_do_flush+0x87/0x2a0
+ [<ffffffff814a16b6>] rt_cache_flush+0x46/0x60
+ [<ffffffff814e36e0>] fib_disable_ip+0x40/0x60
+ [<ffffffff814e5447>] fib_inetaddr_event+0xd7/0xe0
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff810896e8>] __blocking_notifier_call_chain+0x78/0xb0
+ [<ffffffff81089736>] blocking_notifier_call_chain+0x16/0x20
+ [<ffffffff814d8021>] __inet_del_ifa+0xf1/0x2e0
+ [<ffffffff814d8223>] inet_del_ifa+0x13/0x20
+ [<ffffffff814da731>] devinet_ioctl+0x501/0x800
+ [<ffffffff814db508>] inet_ioctl+0x88/0xa0
+ [<ffffffff814541f0>] sock_do_ioctl+0x30/0x70
+ [<ffffffff814542a9>] sock_ioctl+0x79/0x2f0
+ [<ffffffff81188798>] do_vfs_ioctl+0x98/0x570
+ [<ffffffff81188d01>] sys_ioctl+0x91/0xa0
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+ INITIAL USE at:
+ [<ffffffff8109a9e9>] __lock_acquire+0x459/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81532bd5>] igmp6_group_added+0x45/0x1b0
+ [<ffffffff81533f2d>] ipv6_dev_mc_inc+0x2cd/0x430
+ [<ffffffff81515e17>] ipv6_add_dev+0x357/0x450
+ [<ffffffff81ce0d16>] addrconf_init+0x4e/0x183
+ [<ffffffff81ce0ba1>] inet6_init+0x191/0x2a6
+ [<ffffffff81002165>] do_one_initcall+0x45/0x190
+ [<ffffffff81ca4d3f>] kernel_init+0xe3/0x168
+ [<ffffffff8157b2e4>] kernel_thread_helper+0x4/0x10
+ }
+ ... key at: [<ffffffff82801be2>] __key.40877+0x0/0x8
+ ... acquired at:
+ [<ffffffff810997bc>] check_usage_forwards+0x9c/0x110
+ [<ffffffff8109a32c>] mark_lock+0x19c/0x400
+ [<ffffffff8109ad5e>] __lock_acquire+0x7ce/0x1e10
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81531e9f>] mld_ifc_timer_expire+0xff/0x280
+ [<ffffffff8106f2a9>] run_timer_softirq+0x179/0x3f0
+ [<ffffffff810666d0>] __do_softirq+0xc0/0x210
+ [<ffffffff8157b3dc>] call_softirq+0x1c/0x30
+ [<ffffffff8100d42d>] do_softirq+0xad/0xe0
+ [<ffffffff81066afe>] irq_exit+0x9e/0xb0
+ [<ffffffff8157bd40>] smp_apic_timer_interrupt+0x70/0x9b
+ [<ffffffff8157ab93>] apic_timer_interrupt+0x13/0x20
+ [<ffffffff8149d857>] rt_do_flush+0x87/0x2a0
+ [<ffffffff814a16b6>] rt_cache_flush+0x46/0x60
+ [<ffffffff814e36e0>] fib_disable_ip+0x40/0x60
+ [<ffffffff814e5447>] fib_inetaddr_event+0xd7/0xe0
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff810896e8>] __blocking_notifier_call_chain+0x78/0xb0
+ [<ffffffff81089736>] blocking_notifier_call_chain+0x16/0x20
+ [<ffffffff814d8021>] __inet_del_ifa+0xf1/0x2e0
+ [<ffffffff814d8223>] inet_del_ifa+0x13/0x20
+ [<ffffffff814da731>] devinet_ioctl+0x501/0x800
+ [<ffffffff814db508>] inet_ioctl+0x88/0xa0
+ [<ffffffff814541f0>] sock_do_ioctl+0x30/0x70
+ [<ffffffff814542a9>] sock_ioctl+0x79/0x2f0
+ [<ffffffff81188798>] do_vfs_ioctl+0x98/0x570
+ [<ffffffff81188d01>] sys_ioctl+0x91/0xa0
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+
+ stack backtrace:
+ Pid: 567, comm: ifconfig Not tainted 2.6.39-rc6+ #1
+ Call Trace:
+ <IRQ> [<ffffffff810996f6>] print_irq_inversion_bug+0x146/0x170
+ [<ffffffff81099720>] ? print_irq_inversion_bug+0x170/0x170
+ [<ffffffff810997bc>] check_usage_forwards+0x9c/0x110
+ [<ffffffff8109a32c>] mark_lock+0x19c/0x400
+ [<ffffffff8109ad5e>] __lock_acquire+0x7ce/0x1e10
+ [<ffffffff8109a383>] ? mark_lock+0x1f3/0x400
+ [<ffffffff8109b497>] ? __lock_acquire+0xf07/0x1e10
+ [<ffffffff81012255>] ? native_sched_clock+0x15/0x70
+ [<ffffffff8109ca4d>] lock_acquire+0x9d/0x130
+ [<ffffffff81531e9f>] ? mld_ifc_timer_expire+0xff/0x280
+ [<ffffffff8109759d>] ? lock_release_holdtime+0x3d/0x1a0
+ [<ffffffff8157124b>] _raw_spin_lock_bh+0x3b/0x70
+ [<ffffffff81531e9f>] ? mld_ifc_timer_expire+0xff/0x280
+ [<ffffffff8157170b>] ? _raw_spin_unlock+0x2b/0x40
+ [<ffffffff81531e9f>] mld_ifc_timer_expire+0xff/0x280
+ [<ffffffff8106f2a9>] run_timer_softirq+0x179/0x3f0
+ [<ffffffff8106f21b>] ? run_timer_softirq+0xeb/0x3f0
+ [<ffffffff810122b9>] ? sched_clock+0x9/0x10
+ [<ffffffff81531da0>] ? mld_gq_timer_expire+0x30/0x30
+ [<ffffffff810666d0>] __do_softirq+0xc0/0x210
+ [<ffffffff8109455f>] ? tick_program_event+0x1f/0x30
+ [<ffffffff8157b3dc>] call_softirq+0x1c/0x30
+ [<ffffffff8100d42d>] do_softirq+0xad/0xe0
+ [<ffffffff81066afe>] irq_exit+0x9e/0xb0
+ [<ffffffff8157bd40>] smp_apic_timer_interrupt+0x70/0x9b
+ [<ffffffff8157ab93>] apic_timer_interrupt+0x13/0x20
+ <EOI> [<ffffffff81571f14>] ? retint_restore_args+0x13/0x13
+ [<ffffffff810974a7>] ? lock_is_held+0x17/0xd0
+ [<ffffffff8149d857>] rt_do_flush+0x87/0x2a0
+ [<ffffffff814a16b6>] rt_cache_flush+0x46/0x60
+ [<ffffffff814e36e0>] fib_disable_ip+0x40/0x60
+ [<ffffffff814e5447>] fib_inetaddr_event+0xd7/0xe0
+ [<ffffffff81575c1c>] notifier_call_chain+0x8c/0xc0
+ [<ffffffff810896e8>] __blocking_notifier_call_chain+0x78/0xb0
+ [<ffffffff81089736>] blocking_notifier_call_chain+0x16/0x20
+ [<ffffffff814d8021>] __inet_del_ifa+0xf1/0x2e0
+ [<ffffffff814d8223>] inet_del_ifa+0x13/0x20
+ [<ffffffff814da731>] devinet_ioctl+0x501/0x800
+ [<ffffffff8108a3af>] ? local_clock+0x6f/0x80
+ [<ffffffff81575898>] ? do_page_fault+0x268/0x560
+ [<ffffffff814db508>] inet_ioctl+0x88/0xa0
+ [<ffffffff814541f0>] sock_do_ioctl+0x30/0x70
+ [<ffffffff814542a9>] sock_ioctl+0x79/0x2f0
+ [<ffffffff810dfe87>] ? __call_rcu+0xa7/0x190
+ [<ffffffff81188798>] do_vfs_ioctl+0x98/0x570
+ [<ffffffff8117737e>] ? fget_light+0x33e/0x430
+ [<ffffffff81571ef9>] ? retint_swapgs+0x13/0x1b
+ [<ffffffff81188d01>] sys_ioctl+0x91/0xa0
+ [<ffffffff8157a142>] system_call_fastpath+0x16/0x1b
+
+Signed-off-by: Roland Dreier <roland@purestorage.com>
+Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
+Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/vmxnet3/vmxnet3_drv.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/vmxnet3/vmxnet3_drv.c
++++ b/drivers/net/vmxnet3/vmxnet3_drv.c
+@@ -178,6 +178,7 @@ static void
+ vmxnet3_process_events(struct vmxnet3_adapter *adapter)
+ {
+ int i;
++ unsigned long flags;
+ u32 events = le32_to_cpu(adapter->shared->ecr);
+ if (!events)
+ return;
+@@ -190,10 +191,10 @@ vmxnet3_process_events(struct vmxnet3_ad
+
+ /* Check if there is an error on xmit/recv queues */
+ if (events & (VMXNET3_ECR_TQERR | VMXNET3_ECR_RQERR)) {
+- spin_lock(&adapter->cmd_lock);
++ spin_lock_irqsave(&adapter->cmd_lock, flags);
+ VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
+ VMXNET3_CMD_GET_QUEUE_STATUS);
+- spin_unlock(&adapter->cmd_lock);
++ spin_unlock_irqrestore(&adapter->cmd_lock, flags);
+
+ for (i = 0; i < adapter->num_tx_queues; i++)
+ if (adapter->tqd_start[i].status.stopped)
+@@ -2733,13 +2734,14 @@ static void
+ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
+ {
+ u32 cfg;
++ unsigned long flags;
+
+ /* intr settings */
+- spin_lock(&adapter->cmd_lock);
++ spin_lock_irqsave(&adapter->cmd_lock, flags);
+ VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD,
+ VMXNET3_CMD_GET_CONF_INTR);
+ cfg = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD);
+- spin_unlock(&adapter->cmd_lock);
++ spin_unlock_irqrestore(&adapter->cmd_lock, flags);
+ adapter->intr.type = cfg & 0x3;
+ adapter->intr.mask_mode = (cfg >> 2) & 0x3;
+