]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2019 08:54:57 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2019 08:54:57 +0000 (09:54 +0100)
added patches:
media-vivid-free-bitmap_cap-when-updating-std-timings-etc.patch
mips-align-kernel-load-address-to-64kb.patch
mips-ensure-pmd_present-returns-false-after-pmd_mknotpresent.patch

queue-4.4/media-vivid-free-bitmap_cap-when-updating-std-timings-etc.patch [new file with mode: 0644]
queue-4.4/mips-align-kernel-load-address-to-64kb.patch [new file with mode: 0644]
queue-4.4/mips-ensure-pmd_present-returns-false-after-pmd_mknotpresent.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/media-vivid-free-bitmap_cap-when-updating-std-timings-etc.patch b/queue-4.4/media-vivid-free-bitmap_cap-when-updating-std-timings-etc.patch
new file mode 100644 (file)
index 0000000..850e550
--- /dev/null
@@ -0,0 +1,33 @@
+From 560ccb75c2caa6b1039dec1a53cd2ef526f5bf03 Mon Sep 17 00:00:00 2001
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Date: Fri, 9 Nov 2018 08:37:44 -0500
+Subject: media: vivid: free bitmap_cap when updating std/timings/etc.
+
+From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+
+commit 560ccb75c2caa6b1039dec1a53cd2ef526f5bf03 upstream.
+
+When vivid_update_format_cap() is called it should free any overlay
+bitmap since the compose size will change.
+
+Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
+Reported-by: syzbot+0cc8e3cc63ca373722c6@syzkaller.appspotmail.com
+Cc: <stable@vger.kernel.org>      # for v3.18 and up
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/media/platform/vivid/vivid-vid-cap.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/media/platform/vivid/vivid-vid-cap.c
++++ b/drivers/media/platform/vivid/vivid-vid-cap.c
+@@ -461,6 +461,8 @@ void vivid_update_format_cap(struct vivi
+               tpg_s_rgb_range(&dev->tpg, v4l2_ctrl_g_ctrl(dev->rgb_range_cap));
+               break;
+       }
++      vfree(dev->bitmap_cap);
++      dev->bitmap_cap = NULL;
+       vivid_update_quality(dev);
+       tpg_reset_source(&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap);
+       dev->crop_cap = dev->src_rect;
diff --git a/queue-4.4/mips-align-kernel-load-address-to-64kb.patch b/queue-4.4/mips-align-kernel-load-address-to-64kb.patch
new file mode 100644 (file)
index 0000000..d33dbff
--- /dev/null
@@ -0,0 +1,57 @@
+From bec0de4cfad21bd284dbddee016ed1767a5d2823 Mon Sep 17 00:00:00 2001
+From: Huacai Chen <chenhc@lemote.com>
+Date: Thu, 15 Nov 2018 15:53:56 +0800
+Subject: MIPS: Align kernel load address to 64KB
+
+From: Huacai Chen <chenhc@lemote.com>
+
+commit bec0de4cfad21bd284dbddee016ed1767a5d2823 upstream.
+
+KEXEC needs the new kernel's load address to be aligned on a page
+boundary (see sanity_check_segment_list()), but on MIPS the default
+vmlinuz load address is only explicitly aligned to 16 bytes.
+
+Since the largest PAGE_SIZE supported by MIPS kernels is 64KB, increase
+the alignment calculated by calc_vmlinuz_load_addr to 64KB.
+
+Signed-off-by: Huacai Chen <chenhc@lemote.com>
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Patchwork: https://patchwork.linux-mips.org/patch/21131/
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: James Hogan <james.hogan@mips.com>
+Cc: Steven J . Hill <Steven.Hill@cavium.com>
+Cc: linux-mips@linux-mips.org
+Cc: Fuxin Zhang <zhangfx@lemote.com>
+Cc: Zhangjin Wu <wuzhangjin@gmail.com>
+Cc: <stable@vger.kernel.org> # 2.6.36+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/boot/compressed/calc_vmlinuz_load_addr.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c
++++ b/arch/mips/boot/compressed/calc_vmlinuz_load_addr.c
+@@ -13,6 +13,7 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include "../../../../include/linux/sizes.h"
+ int main(int argc, char *argv[])
+ {
+@@ -45,11 +46,11 @@ int main(int argc, char *argv[])
+       vmlinuz_load_addr = vmlinux_load_addr + vmlinux_size;
+       /*
+-       * Align with 16 bytes: "greater than that used for any standard data
+-       * types by a MIPS compiler." -- See MIPS Run Linux (Second Edition).
++       * Align with 64KB: KEXEC needs load sections to be aligned to PAGE_SIZE,
++       * which may be as large as 64KB depending on the kernel configuration.
+        */
+-      vmlinuz_load_addr += (16 - vmlinux_size % 16);
++      vmlinuz_load_addr += (SZ_64K - vmlinux_size % SZ_64K);
+       printf("0x%llx\n", vmlinuz_load_addr);
diff --git a/queue-4.4/mips-ensure-pmd_present-returns-false-after-pmd_mknotpresent.patch b/queue-4.4/mips-ensure-pmd_present-returns-false-after-pmd_mknotpresent.patch
new file mode 100644 (file)
index 0000000..267b51d
--- /dev/null
@@ -0,0 +1,44 @@
+From 92aa0718c9fa5160ad2f0e7b5bffb52f1ea1e51a Mon Sep 17 00:00:00 2001
+From: Huacai Chen <chenhc@lemote.com>
+Date: Thu, 15 Nov 2018 15:53:54 +0800
+Subject: MIPS: Ensure pmd_present() returns false after pmd_mknotpresent()
+
+From: Huacai Chen <chenhc@lemote.com>
+
+commit 92aa0718c9fa5160ad2f0e7b5bffb52f1ea1e51a upstream.
+
+This patch is borrowed from ARM64 to ensure pmd_present() returns false
+after pmd_mknotpresent(). This is needed for THP.
+
+References: 5bb1cc0ff9a6 ("arm64: Ensure pmd_present() returns false after pmd_mknotpresent()")
+Reviewed-by: James Hogan <jhogan@kernel.org>
+Signed-off-by: Huacai Chen <chenhc@lemote.com>
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Patchwork: https://patchwork.linux-mips.org/patch/21135/
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: James Hogan <james.hogan@mips.com>
+Cc: Steven J . Hill <Steven.Hill@cavium.com>
+Cc: linux-mips@linux-mips.org
+Cc: Fuxin Zhang <zhangfx@lemote.com>
+Cc: Zhangjin Wu <wuzhangjin@gmail.com>
+Cc: <stable@vger.kernel.org> # 3.8+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/include/asm/pgtable-64.h |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/arch/mips/include/asm/pgtable-64.h
++++ b/arch/mips/include/asm/pgtable-64.h
+@@ -189,6 +189,11 @@ static inline int pmd_bad(pmd_t pmd)
+ static inline int pmd_present(pmd_t pmd)
+ {
++#ifdef CONFIG_MIPS_HUGE_TLB_SUPPORT
++      if (unlikely(pmd_val(pmd) & _PAGE_HUGE))
++              return pmd_val(pmd) & _PAGE_PRESENT;
++#endif
++
+       return pmd_val(pmd) != (unsigned long) invalid_pte_table;
+ }
index 0b8140c76dfd943f8628ed20c48a686329239bcf..21e4e2fda5788c6ee2ce0c7d2df84990715f8220 100644 (file)
@@ -49,3 +49,6 @@ spi-bcm2835-fix-race-on-dma-termination.patch
 spi-bcm2835-fix-book-keeping-of-dma-termination.patch
 spi-bcm2835-avoid-finishing-transfer-prematurely-in-irq-mode.patch
 cdc-acm-fix-abnormal-data-rx-issue-for-mediatek-preloader.patch
+media-vivid-free-bitmap_cap-when-updating-std-timings-etc.patch
+mips-ensure-pmd_present-returns-false-after-pmd_mknotpresent.patch
+mips-align-kernel-load-address-to-64kb.patch