]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Feb 2015 22:56:24 +0000 (14:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 28 Feb 2015 22:56:24 +0000 (14:56 -0800)
added patches:
arm-8284-1-sa1100-clear-rcsr_smr-on-resume.patch
arm-dra7-hwmod-fix-boot-crash-with-debug_ll-enabled-on-uart3.patch
arm-dts-am335x-bone-usb0-is-hardwired-for-peripheral.patch
arm-dts-bcm63xx-fix-l2-cache-properties.patch
arm-dts-tegra20-fix-gr3d-dsi-unit-and-reg-base-addresses.patch
blk-mq-fix-double-free-in-error-path.patch
tpm_tis-verify-interrupt-during-init.patch
tracing-fix-unmapping-loop-in-tracing_mark_write.patch

queue-3.19/arm-8284-1-sa1100-clear-rcsr_smr-on-resume.patch [new file with mode: 0644]
queue-3.19/arm-dra7-hwmod-fix-boot-crash-with-debug_ll-enabled-on-uart3.patch [new file with mode: 0644]
queue-3.19/arm-dts-am335x-bone-usb0-is-hardwired-for-peripheral.patch [new file with mode: 0644]
queue-3.19/arm-dts-bcm63xx-fix-l2-cache-properties.patch [new file with mode: 0644]
queue-3.19/arm-dts-tegra20-fix-gr3d-dsi-unit-and-reg-base-addresses.patch [new file with mode: 0644]
queue-3.19/blk-mq-fix-double-free-in-error-path.patch [new file with mode: 0644]
queue-3.19/series
queue-3.19/tpm_tis-verify-interrupt-during-init.patch [new file with mode: 0644]
queue-3.19/tracing-fix-unmapping-loop-in-tracing_mark_write.patch [new file with mode: 0644]

diff --git a/queue-3.19/arm-8284-1-sa1100-clear-rcsr_smr-on-resume.patch b/queue-3.19/arm-8284-1-sa1100-clear-rcsr_smr-on-resume.patch
new file mode 100644 (file)
index 0000000..045fb68
--- /dev/null
@@ -0,0 +1,33 @@
+From e461894dc2ce7778ccde1c3483c9b15a85a7fc5f Mon Sep 17 00:00:00 2001
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Date: Thu, 15 Jan 2015 03:06:22 +0100
+Subject: ARM: 8284/1: sa1100: clear RCSR_SMR on resume
+
+From: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+
+commit e461894dc2ce7778ccde1c3483c9b15a85a7fc5f upstream.
+
+StrongARM core uses RCSR SMR bit to tell to bootloader that it was reset
+by entering the sleep mode. After we have resumed, there is little point
+in having that bit enabled. Moreover, if this bit is set before reboot,
+the bootloader can become confused. Thus clear the SMR bit on resume
+just before clearing the scratchpad (resume address) register.
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-sa1100/pm.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/mach-sa1100/pm.c
++++ b/arch/arm/mach-sa1100/pm.c
+@@ -81,6 +81,7 @@ static int sa11x0_pm_enter(suspend_state
+       /*
+        * Ensure not to come back here if it wasn't intended
+        */
++      RCSR = RCSR_SMR;
+       PSPR = 0;
+       /*
diff --git a/queue-3.19/arm-dra7-hwmod-fix-boot-crash-with-debug_ll-enabled-on-uart3.patch b/queue-3.19/arm-dra7-hwmod-fix-boot-crash-with-debug_ll-enabled-on-uart3.patch
new file mode 100644 (file)
index 0000000..8b1089f
--- /dev/null
@@ -0,0 +1,41 @@
+From 1c7e36bfc3e2fb2df5e2d1989a4b6fb9055a0f9b Mon Sep 17 00:00:00 2001
+From: Lokesh Vutla <lokeshvutla@ti.com>
+Date: Thu, 8 Jan 2015 17:22:04 +0530
+Subject: ARM: DRA7: hwmod: Fix boot crash with DEBUG_LL enabled on UART3
+
+From: Lokesh Vutla <lokeshvutla@ti.com>
+
+commit 1c7e36bfc3e2fb2df5e2d1989a4b6fb9055a0f9b upstream.
+
+With commit '7dedd34: ARM: OMAP2+: hwmod: Fix a crash in _setup_reset()
+with DEBUG_LL' we moved from parsing cmdline to identify uart used
+for earlycon to using the requsite hwmod CONFIG_DEBUG_OMAPxUARTy FLAGS.
+
+On DRA7 UART3 hwmod doesn't have this flag enabled, and atleast on
+BeagleBoard-X15, where we use UART3 for console, boot fails with
+DEBUG_LL enabled. Enable DEBUG_OMAP4UART3_FLAGS for UART3 hwmod.
+
+For using DEBUG_LL, enable CONFIG_DEBUG_OMAP4UART3 in menuconfig.
+
+Fixes: 90020c7b2c5e ("ARM: OMAP: DRA7: hwmod: Create initial DRA7XX SoC data")
+Reviewed-by: Felipe Balbi <balbi@ti.com>
+Acked-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/mach-omap2/omap_hwmod_7xx_data.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
++++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+@@ -2017,7 +2017,7 @@ static struct omap_hwmod dra7xx_uart3_hw
+       .class          = &dra7xx_uart_hwmod_class,
+       .clkdm_name     = "l4per_clkdm",
+       .main_clk       = "uart3_gfclk_mux",
+-      .flags          = HWMOD_SWSUP_SIDLE_ACT,
++      .flags          = HWMOD_SWSUP_SIDLE_ACT | DEBUG_OMAP4UART3_FLAGS,
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = DRA7XX_CM_L4PER_UART3_CLKCTRL_OFFSET,
diff --git a/queue-3.19/arm-dts-am335x-bone-usb0-is-hardwired-for-peripheral.patch b/queue-3.19/arm-dts-am335x-bone-usb0-is-hardwired-for-peripheral.patch
new file mode 100644 (file)
index 0000000..09fc4eb
--- /dev/null
@@ -0,0 +1,33 @@
+From 67fd14b3eca63b14429350e9eadc5fab709a8821 Mon Sep 17 00:00:00 2001
+From: Robert Nelson <robertcnelson@gmail.com>
+Date: Tue, 24 Feb 2015 10:10:43 -0600
+Subject: ARM: dts: am335x-bone*: usb0 is hardwired for peripheral
+
+From: Robert Nelson <robertcnelson@gmail.com>
+
+commit 67fd14b3eca63b14429350e9eadc5fab709a8821 upstream.
+
+Fixes: http://bugs.elinux.org/issues/127
+
+the bb.org community was seeing random reboots before this change.
+
+Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
+Reviewed-by: Felipe Balbi <balbi@ti.com>
+Acked-by: Felipe Balbi <balbi@ti.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/am335x-bone-common.dtsi |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
+@@ -195,6 +195,7 @@
+ &usb0 {
+       status = "okay";
++      dr_mode = "peripheral";
+ };
+ &usb1 {
diff --git a/queue-3.19/arm-dts-bcm63xx-fix-l2-cache-properties.patch b/queue-3.19/arm-dts-bcm63xx-fix-l2-cache-properties.patch
new file mode 100644 (file)
index 0000000..66bcdfe
--- /dev/null
@@ -0,0 +1,36 @@
+From 9df11828d9b5665ddef81e45f83dd5376a8cd620 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Tue, 10 Feb 2015 17:33:07 -0800
+Subject: ARM: dts: BCM63xx: fix L2 cache properties
+
+From: Florian Fainelli <f.fainelli@gmail.com>
+
+commit 9df11828d9b5665ddef81e45f83dd5376a8cd620 upstream.
+
+The L2 cache properties were completely off with respect to what the
+hardware is configured for. Fix the cache-size, cache-line-size and
+cache-sets to reflect the L2 cache controller we have: 512KB, 16 ways
+and 32 bytes per cache-line.
+
+Fixes: 46d4bca0445a0 ("ARM: BCM63XX: add BCM63138 minimal Device Tree")
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/bcm63138.dtsi |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm63138.dtsi
++++ b/arch/arm/boot/dts/bcm63138.dtsi
+@@ -66,8 +66,9 @@
+                       reg = <0x1d000 0x1000>;
+                       cache-unified;
+                       cache-level = <2>;
+-                      cache-sets = <16>;
+-                      cache-size = <0x80000>;
++                      cache-size = <524288>;
++                      cache-sets = <1024>;
++                      cache-line-size = <32>;
+                       interrupts = <GIC_PPI 0 IRQ_TYPE_LEVEL_HIGH>;
+               };
diff --git a/queue-3.19/arm-dts-tegra20-fix-gr3d-dsi-unit-and-reg-base-addresses.patch b/queue-3.19/arm-dts-tegra20-fix-gr3d-dsi-unit-and-reg-base-addresses.patch
new file mode 100644 (file)
index 0000000..905e4d3
--- /dev/null
@@ -0,0 +1,50 @@
+From de47699d005996b41cea590c6098078ac12058be Mon Sep 17 00:00:00 2001
+From: Dmitry Osipenko <digetx@gmail.com>
+Date: Fri, 12 Dec 2014 18:19:19 +0300
+Subject: ARM: dts: tegra20: fix GR3D, DSI unit and reg base addresses
+
+From: Dmitry Osipenko <digetx@gmail.com>
+
+commit de47699d005996b41cea590c6098078ac12058be upstream.
+
+Commit 58ecb23f64ee ("ARM: tegra: add missing unit addresses to DT") added
+unit address and changed reg base for GR3D and DSI host1x modules, but these
+addresses belongs to GR2D and TVO modules respectively. Fix it by changing
+modules unit and reg base addresses to proper ones.
+
+Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
+Fixes: 58ecb23f64ee (ARM: tegra: add missing unit addresses to DT)
+Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/boot/dts/tegra20.dtsi |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/boot/dts/tegra20.dtsi
++++ b/arch/arm/boot/dts/tegra20.dtsi
+@@ -68,9 +68,9 @@
+                       reset-names = "2d";
+               };
+-              gr3d@54140000 {
++              gr3d@54180000 {
+                       compatible = "nvidia,tegra20-gr3d";
+-                      reg = <0x54140000 0x00040000>;
++                      reg = <0x54180000 0x00040000>;
+                       clocks = <&tegra_car TEGRA20_CLK_GR3D>;
+                       resets = <&tegra_car 24>;
+                       reset-names = "3d";
+@@ -130,9 +130,9 @@
+                       status = "disabled";
+               };
+-              dsi@542c0000 {
++              dsi@54300000 {
+                       compatible = "nvidia,tegra20-dsi";
+-                      reg = <0x542c0000 0x00040000>;
++                      reg = <0x54300000 0x00040000>;
+                       clocks = <&tegra_car TEGRA20_CLK_DSI>;
+                       resets = <&tegra_car 48>;
+                       reset-names = "dsi";
diff --git a/queue-3.19/blk-mq-fix-double-free-in-error-path.patch b/queue-3.19/blk-mq-fix-double-free-in-error-path.patch
new file mode 100644 (file)
index 0000000..7f3f77d
--- /dev/null
@@ -0,0 +1,32 @@
+From 564e559f2baf6a868768d0cac286980b3cfd6e30 Mon Sep 17 00:00:00 2001
+From: Tony Battersby <tonyb@cybernetics.com>
+Date: Wed, 11 Feb 2015 11:32:30 -0500
+Subject: blk-mq: fix double-free in error path
+
+From: Tony Battersby <tonyb@cybernetics.com>
+
+commit 564e559f2baf6a868768d0cac286980b3cfd6e30 upstream.
+
+If the allocation of bt->bs fails, then bt->map can be freed twice, once
+in blk_mq_init_bitmap_tags() -> bt_alloc(), and once in
+blk_mq_init_bitmap_tags() -> bt_free().  Fix by setting the pointer to
+NULL after the first free.
+
+Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ block/blk-mq-tag.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/block/blk-mq-tag.c
++++ b/block/blk-mq-tag.c
+@@ -509,6 +509,7 @@ static int bt_alloc(struct blk_mq_bitmap
+       bt->bs = kzalloc(BT_WAIT_QUEUES * sizeof(*bt->bs), GFP_KERNEL);
+       if (!bt->bs) {
+               kfree(bt->map);
++              bt->map = NULL;
+               return -ENOMEM;
+       }
index c64ba3ba56993cdd1599ff7fd0f9a2032d9e9a6e..30ee5ae8bf39e88f54fee33b36faca0215a2771d 100644 (file)
@@ -84,3 +84,11 @@ mips-asm-pgtable-prevent-htw-race-when-updating-ptes.patch
 mips-export-fp-functions-used-by-lose_fpu-1-for-kvm.patch
 mips-export-msa-functions-used-by-lose_fpu-1-for-kvm.patch
 mm-hugetlb-pmd_huge-returns-true-for-non-present-hugepage.patch
+tracing-fix-unmapping-loop-in-tracing_mark_write.patch
+blk-mq-fix-double-free-in-error-path.patch
+arm-8284-1-sa1100-clear-rcsr_smr-on-resume.patch
+arm-dra7-hwmod-fix-boot-crash-with-debug_ll-enabled-on-uart3.patch
+arm-dts-tegra20-fix-gr3d-dsi-unit-and-reg-base-addresses.patch
+arm-dts-am335x-bone-usb0-is-hardwired-for-peripheral.patch
+arm-dts-bcm63xx-fix-l2-cache-properties.patch
+tpm_tis-verify-interrupt-during-init.patch
diff --git a/queue-3.19/tpm_tis-verify-interrupt-during-init.patch b/queue-3.19/tpm_tis-verify-interrupt-during-init.patch
new file mode 100644 (file)
index 0000000..ba10633
--- /dev/null
@@ -0,0 +1,163 @@
+From 448e9c55c12d6bd4fa90a7e31d802e045666d7c8 Mon Sep 17 00:00:00 2001
+From: Scot Doyle <lkml14@scotdoyle.com>
+Date: Wed, 24 Sep 2014 22:41:10 +0000
+Subject: tpm_tis: verify interrupt during init
+
+From: Scot Doyle <lkml14@scotdoyle.com>
+
+commit 448e9c55c12d6bd4fa90a7e31d802e045666d7c8 upstream.
+
+Some machines, such as the Acer C720 and Toshiba CB35, have TPMs that do
+not send IRQs while also having an ACPI TPM entry indicating that they
+will be sent. These machines freeze on resume while the tpm_tis module
+waits for an IRQ, eventually timing out.
+
+When in interrupt mode, the tpm_tis module should receive an IRQ during
+module init. Fall back to polling mode if none is received when expected.
+
+Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
+Tested-by: Michael Mullin <masmullin@gmail.com>
+Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
+[phuewe: minor checkpatch fixed]
+Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/char/tpm/tpm_tis.c |   76 ++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 62 insertions(+), 14 deletions(-)
+
+--- a/drivers/char/tpm/tpm_tis.c
++++ b/drivers/char/tpm/tpm_tis.c
+@@ -75,6 +75,10 @@ enum tis_defaults {
+ #define       TPM_DID_VID(l)                  (0x0F00 | ((l) << 12))
+ #define       TPM_RID(l)                      (0x0F04 | ((l) << 12))
++struct priv_data {
++      bool irq_tested;
++};
++
+ static LIST_HEAD(tis_chips);
+ static DEFINE_MUTEX(tis_lock);
+@@ -338,12 +342,27 @@ out_err:
+       return rc;
+ }
++static void disable_interrupts(struct tpm_chip *chip)
++{
++      u32 intmask;
++
++      intmask =
++          ioread32(chip->vendor.iobase +
++                   TPM_INT_ENABLE(chip->vendor.locality));
++      intmask &= ~TPM_GLOBAL_INT_ENABLE;
++      iowrite32(intmask,
++                chip->vendor.iobase +
++                TPM_INT_ENABLE(chip->vendor.locality));
++      free_irq(chip->vendor.irq, chip);
++      chip->vendor.irq = 0;
++}
++
+ /*
+  * If interrupts are used (signaled by an irq set in the vendor structure)
+  * tpm.c can skip polling for the data to be available as the interrupt is
+  * waited for here
+  */
+-static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
++static int tpm_tis_send_main(struct tpm_chip *chip, u8 *buf, size_t len)
+ {
+       int rc;
+       u32 ordinal;
+@@ -373,6 +392,30 @@ out_err:
+       return rc;
+ }
++static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len)
++{
++      int rc, irq;
++      struct priv_data *priv = chip->vendor.priv;
++
++      if (!chip->vendor.irq || priv->irq_tested)
++              return tpm_tis_send_main(chip, buf, len);
++
++      /* Verify receipt of the expected IRQ */
++      irq = chip->vendor.irq;
++      chip->vendor.irq = 0;
++      rc = tpm_tis_send_main(chip, buf, len);
++      chip->vendor.irq = irq;
++      if (!priv->irq_tested)
++              msleep(1);
++      if (!priv->irq_tested) {
++              disable_interrupts(chip);
++              dev_err(chip->dev,
++                      FW_BUG "TPM interrupt not working, polling instead\n");
++      }
++      priv->irq_tested = true;
++      return rc;
++}
++
+ struct tis_vendor_timeout_override {
+       u32 did_vid;
+       unsigned long timeout_us[4];
+@@ -505,6 +548,7 @@ static irqreturn_t tis_int_handler(int d
+       if (interrupt == 0)
+               return IRQ_NONE;
++      ((struct priv_data *)chip->vendor.priv)->irq_tested = true;
+       if (interrupt & TPM_INTF_DATA_AVAIL_INT)
+               wake_up_interruptible(&chip->vendor.read_queue);
+       if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT)
+@@ -534,9 +578,14 @@ static int tpm_tis_init(struct device *d
+       u32 vendor, intfcaps, intmask;
+       int rc, i, irq_s, irq_e, probe;
+       struct tpm_chip *chip;
++      struct priv_data *priv;
++      priv = devm_kzalloc(dev, sizeof(struct priv_data), GFP_KERNEL);
++      if (priv == NULL)
++              return -ENOMEM;
+       if (!(chip = tpm_register_hardware(dev, &tpm_tis)))
+               return -ENODEV;
++      chip->vendor.priv = priv;
+       chip->vendor.iobase = ioremap(start, len);
+       if (!chip->vendor.iobase) {
+@@ -605,19 +654,6 @@ static int tpm_tis_init(struct device *d
+       if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
+               dev_dbg(dev, "\tData Avail Int Support\n");
+-      /* get the timeouts before testing for irqs */
+-      if (tpm_get_timeouts(chip)) {
+-              dev_err(dev, "Could not get TPM timeouts and durations\n");
+-              rc = -ENODEV;
+-              goto out_err;
+-      }
+-
+-      if (tpm_do_selftest(chip)) {
+-              dev_err(dev, "TPM self test failed\n");
+-              rc = -ENODEV;
+-              goto out_err;
+-      }
+-
+       /* INTERRUPT Setup */
+       init_waitqueue_head(&chip->vendor.read_queue);
+       init_waitqueue_head(&chip->vendor.int_queue);
+@@ -719,6 +755,18 @@ static int tpm_tis_init(struct device *d
+               }
+       }
++      if (tpm_get_timeouts(chip)) {
++              dev_err(dev, "Could not get TPM timeouts and durations\n");
++              rc = -ENODEV;
++              goto out_err;
++      }
++
++      if (tpm_do_selftest(chip)) {
++              dev_err(dev, "TPM self test failed\n");
++              rc = -ENODEV;
++              goto out_err;
++      }
++
+       INIT_LIST_HEAD(&chip->vendor.list);
+       mutex_lock(&tis_lock);
+       list_add(&chip->vendor.list, &tis_chips);
diff --git a/queue-3.19/tracing-fix-unmapping-loop-in-tracing_mark_write.patch b/queue-3.19/tracing-fix-unmapping-loop-in-tracing_mark_write.patch
new file mode 100644 (file)
index 0000000..2fe3f3f
--- /dev/null
@@ -0,0 +1,41 @@
+From 7215853e985a4bef1a6c14e00e89dfec84f1e457 Mon Sep 17 00:00:00 2001
+From: Vikram Mulukutla <markivx@codeaurora.org>
+Date: Wed, 17 Dec 2014 18:50:56 -0800
+Subject: tracing: Fix unmapping loop in tracing_mark_write
+
+From: Vikram Mulukutla <markivx@codeaurora.org>
+
+commit 7215853e985a4bef1a6c14e00e89dfec84f1e457 upstream.
+
+Commit 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce introduced
+an array map_pages that contains the addresses returned by
+kmap_atomic. However, when unmapping those pages, map_pages[0]
+is unmapped before map_pages[1], breaking the nesting requirement
+as specified in the documentation for kmap_atomic/kunmap_atomic.
+
+This was caught by the highmem debug code present in kunmap_atomic.
+Fix the loop to do the unmapping properly.
+
+Link: http://lkml.kernel.org/r/1418871056-6614-1-git-send-email-markivx@codeaurora.org
+
+Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
+Reported-by: Lime Yang <limey@codeaurora.org>
+Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/trace/trace.c
++++ b/kernel/trace/trace.c
+@@ -4942,7 +4942,7 @@ tracing_mark_write(struct file *filp, co
+       *fpos += written;
+  out_unlock:
+-      for (i = 0; i < nr_pages; i++){
++      for (i = nr_pages - 1; i >= 0; i--) {
+               kunmap_atomic(map_page[i]);
+               put_page(pages[i]);
+       }