]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.8-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 May 2013 18:22:40 +0000 (11:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 May 2013 18:22:40 +0000 (11:22 -0700)
added patches:
give-the-oid-registry-file-module-info-to-avoid-kernel-tainting.patch
kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch
mfd-adp5520-restore-mode-bits-on-resume.patch
mmc-atmel-mci-pio-hang-on-block-errors.patch
mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch
rcutrace-single_open-leaks.patch
x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch

queue-3.8/give-the-oid-registry-file-module-info-to-avoid-kernel-tainting.patch [new file with mode: 0644]
queue-3.8/kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch [new file with mode: 0644]
queue-3.8/mfd-adp5520-restore-mode-bits-on-resume.patch [new file with mode: 0644]
queue-3.8/mmc-atmel-mci-pio-hang-on-block-errors.patch [new file with mode: 0644]
queue-3.8/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch [new file with mode: 0644]
queue-3.8/rcutrace-single_open-leaks.patch [new file with mode: 0644]
queue-3.8/series
queue-3.8/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch [new file with mode: 0644]

diff --git a/queue-3.8/give-the-oid-registry-file-module-info-to-avoid-kernel-tainting.patch b/queue-3.8/give-the-oid-registry-file-module-info-to-avoid-kernel-tainting.patch
new file mode 100644 (file)
index 0000000..b0c16c7
--- /dev/null
@@ -0,0 +1,43 @@
+From 9e6879460c8edb0cd3c24c09b83d06541b5af0dc Mon Sep 17 00:00:00 2001
+From: David Howells <dhowells@redhat.com>
+Date: Sat, 4 May 2013 08:48:27 +0100
+Subject: Give the OID registry file module info to avoid kernel tainting
+
+From: David Howells <dhowells@redhat.com>
+
+commit 9e6879460c8edb0cd3c24c09b83d06541b5af0dc upstream.
+
+Give the OID registry file module information so that it doesn't taint the
+kernel when compiled as a module and loaded.
+
+Reported-by: Dros Adamson <Weston.Adamson@netapp.com>
+Signed-off-by: David Howells <dhowells@redhat.com>
+cc: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ lib/oid_registry.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/lib/oid_registry.c
++++ b/lib/oid_registry.c
+@@ -9,6 +9,7 @@
+  * 2 of the Licence, or (at your option) any later version.
+  */
++#include <linux/module.h>
+ #include <linux/export.h>
+ #include <linux/oid_registry.h>
+ #include <linux/kernel.h>
+@@ -16,6 +17,10 @@
+ #include <linux/bug.h>
+ #include "oid_registry_data.c"
++MODULE_DESCRIPTION("OID Registry");
++MODULE_AUTHOR("Red Hat, Inc.");
++MODULE_LICENSE("GPL");
++
+ /**
+  * look_up_OID - Find an OID registration for the specified data
+  * @data: Binary representation of the OID
diff --git a/queue-3.8/kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch b/queue-3.8/kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch
new file mode 100644 (file)
index 0000000..8d90cc6
--- /dev/null
@@ -0,0 +1,32 @@
+From 660696d1d16a71e15549ce1bf74953be1592bcd3 Mon Sep 17 00:00:00 2001
+From: Gleb Natapov <gleb@redhat.com>
+Date: Wed, 24 Apr 2013 13:38:36 +0300
+Subject: KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions
+
+From: Gleb Natapov <gleb@redhat.com>
+
+commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream.
+
+Source operand for one byte mov[zs]x is decoded incorrectly if it is in
+high byte register. Fix that.
+
+Signed-off-by: Gleb Natapov <gleb@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/emulate.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/x86/kvm/emulate.c
++++ b/arch/x86/kvm/emulate.c
+@@ -4030,6 +4030,10 @@ static int decode_operand(struct x86_emu
+               break;
+       case OpMem8:
+               ctxt->memop.bytes = 1;
++              if (ctxt->memop.type == OP_REG) {
++                      ctxt->memop.addr.reg = decode_register(ctxt, ctxt->modrm_rm, 1);
++                      fetch_register_operand(&ctxt->memop);
++              }
+               goto mem_common;
+       case OpMem16:
+               ctxt->memop.bytes = 2;
diff --git a/queue-3.8/mfd-adp5520-restore-mode-bits-on-resume.patch b/queue-3.8/mfd-adp5520-restore-mode-bits-on-resume.patch
new file mode 100644 (file)
index 0000000..874f6f0
--- /dev/null
@@ -0,0 +1,53 @@
+From c6cc25fda58da8685ecef3f179adc7b99c8253b2 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Tue, 19 Feb 2013 11:51:22 +0100
+Subject: mfd: adp5520: Restore mode bits on resume
+
+From: Lars-Peter Clausen <lars@metafoo.de>
+
+commit c6cc25fda58da8685ecef3f179adc7b99c8253b2 upstream.
+
+The adp5520 unfortunately also clears the BL_EN bit when the nSTNDBY bit is
+cleared. So we need to make sure to restore it during resume if it was set
+before suspend.
+
+Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
+Acked-by: Michael Hennerich <michael.hennerich@analog.com>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/adp5520.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/mfd/adp5520.c
++++ b/drivers/mfd/adp5520.c
+@@ -36,6 +36,7 @@ struct adp5520_chip {
+       struct blocking_notifier_head notifier_list;
+       int irq;
+       unsigned long id;
++      uint8_t mode;
+ };
+ static int __adp5520_read(struct i2c_client *client,
+@@ -326,7 +327,10 @@ static int adp5520_suspend(struct device
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adp5520_chip *chip = dev_get_drvdata(&client->dev);
+-      adp5520_clr_bits(chip->dev, ADP5520_MODE_STATUS, ADP5520_nSTNBY);
++      adp5520_read(chip->dev, ADP5520_MODE_STATUS, &chip->mode);
++      /* All other bits are W1C */
++      chip->mode &= ADP5520_BL_EN | ADP5520_DIM_EN | ADP5520_nSTNBY;
++      adp5520_write(chip->dev, ADP5520_MODE_STATUS, 0);
+       return 0;
+ }
+@@ -335,7 +339,7 @@ static int adp5520_resume(struct device
+       struct i2c_client *client = to_i2c_client(dev);
+       struct adp5520_chip *chip = dev_get_drvdata(&client->dev);
+-      adp5520_set_bits(chip->dev, ADP5520_MODE_STATUS, ADP5520_nSTNBY);
++      adp5520_write(chip->dev, ADP5520_MODE_STATUS, chip->mode);
+       return 0;
+ }
+ #endif
diff --git a/queue-3.8/mmc-atmel-mci-pio-hang-on-block-errors.patch b/queue-3.8/mmc-atmel-mci-pio-hang-on-block-errors.patch
new file mode 100644 (file)
index 0000000..f9288c6
--- /dev/null
@@ -0,0 +1,85 @@
+From bdbc5d0c60f3e9de3eeccf1c1a18bdc11dca62cc Mon Sep 17 00:00:00 2001
+From: Terry Barnaby <terry@beam.ltd.uk>
+Date: Mon, 8 Apr 2013 12:05:47 -0400
+Subject: mmc: atmel-mci: pio hang on block errors
+
+From: Terry Barnaby <terry@beam.ltd.uk>
+
+commit bdbc5d0c60f3e9de3eeccf1c1a18bdc11dca62cc upstream.
+
+The driver is doing, by default, multi-block reads. When a block error
+occurs, card/block.c instigates a single block read: "mmcblk0: retrying
+using single block read".  It leaves the sg chain intact and just changes
+the length attribute for the first sg entry and the overall sg_len
+parameter.  When atmci_read_data_pio is called to read the single block
+of data it ignores the sg_len and expects to read more than 512 bytes as
+it sees there are multiple items in the sg list. No more data comes as
+the controller has only been commanded to get one block.
+
+Signed-off-by: Terry Barnaby <terry@beam.ltd.uk>
+Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/atmel-mci.c |   14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/mmc/host/atmel-mci.c
++++ b/drivers/mmc/host/atmel-mci.c
+@@ -178,6 +178,7 @@ struct atmel_mci {
+       void __iomem            *regs;
+       struct scatterlist      *sg;
++      unsigned int            sg_len;
+       unsigned int            pio_offset;
+       unsigned int            *buffer;
+       unsigned int            buf_size;
+@@ -892,6 +893,7 @@ static u32 atmci_prepare_data(struct atm
+       data->error = -EINPROGRESS;
+       host->sg = data->sg;
++      host->sg_len = data->sg_len;
+       host->data = data;
+       host->data_chan = NULL;
+@@ -1826,7 +1828,8 @@ static void atmci_read_data_pio(struct a
+                       if (offset == sg->length) {
+                               flush_dcache_page(sg_page(sg));
+                               host->sg = sg = sg_next(sg);
+-                              if (!sg)
++                              host->sg_len--;
++                              if (!sg || !host->sg_len)
+                                       goto done;
+                               offset = 0;
+@@ -1839,7 +1842,8 @@ static void atmci_read_data_pio(struct a
+                       flush_dcache_page(sg_page(sg));
+                       host->sg = sg = sg_next(sg);
+-                      if (!sg)
++                      host->sg_len--;
++                      if (!sg || !host->sg_len)
+                               goto done;
+                       offset = 4 - remaining;
+@@ -1890,7 +1894,8 @@ static void atmci_write_data_pio(struct
+                       nbytes += 4;
+                       if (offset == sg->length) {
+                               host->sg = sg = sg_next(sg);
+-                              if (!sg)
++                              host->sg_len--;
++                              if (!sg || !host->sg_len)
+                                       goto done;
+                               offset = 0;
+@@ -1904,7 +1909,8 @@ static void atmci_write_data_pio(struct
+                       nbytes += remaining;
+                       host->sg = sg = sg_next(sg);
+-                      if (!sg) {
++                      host->sg_len--;
++                      if (!sg || !host->sg_len) {
+                               atmci_writel(host, ATMCI_TDR, value);
+                               goto done;
+                       }
diff --git a/queue-3.8/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch b/queue-3.8/mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch
new file mode 100644 (file)
index 0000000..161cf9c
--- /dev/null
@@ -0,0 +1,42 @@
+From 836dc2fe89c968c10cada87e0dfae6626f8f9da3 Mon Sep 17 00:00:00 2001
+From: Philip Rakity <prakity@yahoo.com>
+Date: Thu, 4 Apr 2013 20:18:11 +0100
+Subject: mmc: core: Fix bit width test failing on old eMMC cards
+
+From: Philip Rakity <prakity@yahoo.com>
+
+commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3 upstream.
+
+PARTITION_SUPPORT needs to be set before doing the compare on version
+number so the bit width test does not get invalid data.  Before this
+patch, a Sandisk iNAND eMMC card would detect 1-bit width although
+the hardware supports 4-bit.
+
+Only affects old emmc devices - pre 4.4 devices.
+
+Reported-by: Elad Yi <elad.yi@gmail.com>
+Signed-off-by: Philip Rakity <prakity@yahoo.com>
+Signed-off-by: Chris Ball <cjb@laptop.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/core/mmc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mmc/core/mmc.c
++++ b/drivers/mmc/core/mmc.c
+@@ -368,13 +368,13 @@ static int mmc_read_ext_csd(struct mmc_c
+               ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT];
+       card->ext_csd.raw_trim_mult =
+               ext_csd[EXT_CSD_TRIM_MULT];
++      card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT];
+       if (card->ext_csd.rev >= 4) {
+               /*
+                * Enhanced area feature support -- check whether the eMMC
+                * card has the Enhanced area enabled.  If so, export enhanced
+                * area offset and size to user by adding sysfs interface.
+                */
+-              card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT];
+               if ((ext_csd[EXT_CSD_PARTITION_SUPPORT] & 0x2) &&
+                   (ext_csd[EXT_CSD_PARTITION_ATTRIBUTE] & 0x1)) {
+                       hc_erase_grp_sz =
diff --git a/queue-3.8/rcutrace-single_open-leaks.patch b/queue-3.8/rcutrace-single_open-leaks.patch
new file mode 100644 (file)
index 0000000..de24550
--- /dev/null
@@ -0,0 +1,54 @@
+From 7ee2b9e56495c56dcaffa2bab19b39451d9fdc8a Mon Sep 17 00:00:00 2001
+From: Al Viro <viro@zeniv.linux.org.uk>
+Date: Sun, 5 May 2013 00:16:35 -0400
+Subject: rcutrace: single_open() leaks
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+commit 7ee2b9e56495c56dcaffa2bab19b39451d9fdc8a upstream.
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/rcutree_trace.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/kernel/rcutree_trace.c
++++ b/kernel/rcutree_trace.c
+@@ -97,7 +97,7 @@ static const struct file_operations rcub
+       .open = rcubarrier_open,
+       .read = seq_read,
+       .llseek = no_llseek,
+-      .release = seq_release,
++      .release = single_release,
+ };
+ #ifdef CONFIG_RCU_BOOST
+@@ -208,7 +208,7 @@ static const struct file_operations rcue
+       .open = rcuexp_open,
+       .read = seq_read,
+       .llseek = no_llseek,
+-      .release = seq_release,
++      .release = single_release,
+ };
+ #ifdef CONFIG_RCU_BOOST
+@@ -308,7 +308,7 @@ static const struct file_operations rcuh
+       .open = rcuhier_open,
+       .read = seq_read,
+       .llseek = no_llseek,
+-      .release = seq_release,
++      .release = single_release,
+ };
+ static void show_one_rcugp(struct seq_file *m, struct rcu_state *rsp)
+@@ -350,7 +350,7 @@ static const struct file_operations rcug
+       .open = rcugp_open,
+       .read = seq_read,
+       .llseek = no_llseek,
+-      .release = seq_release,
++      .release = single_release,
+ };
+ static void print_one_rcu_pending(struct seq_file *m, struct rcu_data *rdp)
index f304fe5ab56eba47a7cf1745c23779d173aa826b..15f021dd7365b1b4401ceabd3ce96c0f304c6ab5 100644 (file)
@@ -95,3 +95,10 @@ ext4-fix-big-endian-bug-in-metadata-checksum-calculations.patch
 ext4-fix-online-resizing-for-ext3-compat-file-systems.patch
 ext4-fix-kconfig-documentation-for-config_ext4_debug.patch
 mmc-at91-avr32-atmel-mci-fix-dma-channel-leak-on-module-unload.patch
+give-the-oid-registry-file-module-info-to-avoid-kernel-tainting.patch
+kvm-x86-emulator-fix-source-operand-decoding-for-8bit-movx-instructions.patch
+x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch
+mmc-core-fix-bit-width-test-failing-on-old-emmc-cards.patch
+mmc-atmel-mci-pio-hang-on-block-errors.patch
+rcutrace-single_open-leaks.patch
+mfd-adp5520-restore-mode-bits-on-resume.patch
diff --git a/queue-3.8/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch b/queue-3.8/x86-eliminate-irq_mis_count-counted-in-arch_irq_stat.patch
new file mode 100644 (file)
index 0000000..51a890b
--- /dev/null
@@ -0,0 +1,42 @@
+From f7b0e1055574ce06ab53391263b4e205bf38daf3 Mon Sep 17 00:00:00 2001
+From: Li Fei <fei.li@intel.com>
+Date: Fri, 26 Apr 2013 20:50:11 +0800
+Subject: x86: Eliminate irq_mis_count counted in arch_irq_stat
+
+From: Li Fei <fei.li@intel.com>
+
+commit f7b0e1055574ce06ab53391263b4e205bf38daf3 upstream.
+
+With the current implementation, kstat_cpu(cpu).irqs_sum is also
+increased in case of irq_mis_count increment.
+
+So there is no need to count irq_mis_count in arch_irq_stat,
+otherwise irq_mis_count will be counted twice in the sum of
+/proc/stat.
+
+Reported-by: Liu Chuansheng <chuansheng.liu@intel.com>
+Signed-off-by: Li Fei <fei.li@intel.com>
+Acked-by: Liu Chuansheng <chuansheng.liu@intel.com>
+Cc: tomoki.sekiyama.qu@hitachi.com
+Cc: joe@perches.com
+Link: http://lkml.kernel.org/r/1366980611.32469.7.camel@fli24-HP-Compaq-8100-Elite-CMT-PC
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/irq.c |    4 ----
+ 1 file changed, 4 deletions(-)
+
+--- a/arch/x86/kernel/irq.c
++++ b/arch/x86/kernel/irq.c
+@@ -165,10 +165,6 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
+ u64 arch_irq_stat(void)
+ {
+       u64 sum = atomic_read(&irq_err_count);
+-
+-#ifdef CONFIG_X86_IO_APIC
+-      sum += atomic_read(&irq_mis_count);
+-#endif
+       return sum;
+ }