]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Fri, 6 Dec 2019 21:13:26 +0000 (16:13 -0500)
committerSasha Levin <sashal@kernel.org>
Fri, 6 Dec 2019 21:13:26 +0000 (16:13 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
68 files changed:
queue-4.9/acpi-fix-acpi_find_child_device-invocation-in-acpi_p.patch [new file with mode: 0644]
queue-4.9/alsa-pcm-fix-stream-lock-usage-in-snd_pcm_period_ela.patch [new file with mode: 0644]
queue-4.9/altera-stapl-check-for-a-null-key-before-strcasecmp-.patch [new file with mode: 0644]
queue-4.9/arm-8813-1-make-aligned-2-byte-getuser-putuser-atomi.patch [new file with mode: 0644]
queue-4.9/arm-debug-enable-uart1-for-socfpga-cyclone5.patch [new file with mode: 0644]
queue-4.9/arm-dts-exynos-use-samsung-soc-specific-compatible-f.patch [new file with mode: 0644]
queue-4.9/arm-dts-mmp2-fix-the-gpio-interrupt-cell-number.patch [new file with mode: 0644]
queue-4.9/arm-dts-pxa-clean-up-usb-controller-nodes.patch [new file with mode: 0644]
queue-4.9/arm-dts-realview-fix-some-more-duplicate-regulator-n.patch [new file with mode: 0644]
queue-4.9/arm-dts-realview-pbx-fix-duplicate-regulator-nodes.patch [new file with mode: 0644]
queue-4.9/arm-dts-rockchip-fix-rk3288-rock2-vcc_flash-name.patch [new file with mode: 0644]
queue-4.9/arm-dts-sunxi-fix-pmu-compatible-strings.patch [new file with mode: 0644]
queue-4.9/arm-omap1-2-fix-soc-name-printing.patch [new file with mode: 0644]
queue-4.9/audit_get_nd-don-t-unlock-parent-too-early.patch [new file with mode: 0644]
queue-4.9/autofs-fix-a-leak-in-autofs_expire_indirect.patch [new file with mode: 0644]
queue-4.9/clk-rockchip-fix-rk3188-sclk_mac_lbtest-parameter-or.patch [new file with mode: 0644]
queue-4.9/clk-rockchip-fix-rk3188-sclk_smc-gate-data.patch [new file with mode: 0644]
queue-4.9/clk-sunxi-ng-h3-h5-fix-csi_mclk-parent.patch [new file with mode: 0644]
queue-4.9/cxgb4vf-fix-memleak-in-mac_hlist-initialization.patch [new file with mode: 0644]
queue-4.9/dlm-fix-invalid-cluster-name-warning.patch [new file with mode: 0644]
queue-4.9/dlm-fix-missing-idr_destroy-for-recover_idr.patch [new file with mode: 0644]
queue-4.9/dlm-null-check-before-kmem_cache_destroy-is-not-need.patch [new file with mode: 0644]
queue-4.9/dma-mapping-fix-return-type-of-dma_set_max_seg_size.patch [new file with mode: 0644]
queue-4.9/dmaengine-coh901318-fix-a-double-lock-bug.patch [new file with mode: 0644]
queue-4.9/dmaengine-xilinx_dma-fix-64-bit-simple-cdma-transfer.patch [new file with mode: 0644]
queue-4.9/exportfs_decode_fh-negative-pinned-may-become-positi.patch [new file with mode: 0644]
queue-4.9/extcon-max8997-fix-lack-of-path-setting-in-usb-devic.patch [new file with mode: 0644]
queue-4.9/i2c-imx-don-t-print-error-message-on-probe-defer.patch [new file with mode: 0644]
queue-4.9/input-cyttsp4_core-fix-use-after-free-bug.patch [new file with mode: 0644]
queue-4.9/iw_cxgb4-only-reconnect-with-mpav1-if-the-peer-abort.patch [new file with mode: 0644]
queue-4.9/iwlwifi-mvm-send-non-offchannel-traffic-via-ap-sta.patch [new file with mode: 0644]
queue-4.9/kbuild-fix-single-target-build-for-external-module.patch [new file with mode: 0644]
queue-4.9/lockd-fix-decoding-of-test-results.patch [new file with mode: 0644]
queue-4.9/math-emu-soft-fp.h-_fp_round_zero-cast-0-to-void-to-.patch [new file with mode: 0644]
queue-4.9/media-coda-fix-memory-corruption-in-case-more-than-3.patch [new file with mode: 0644]
queue-4.9/media-pulse8-cec-return-0-when-invalidating-the-logi.patch [new file with mode: 0644]
queue-4.9/media-stkwebcam-bugfix-for-wrong-return-values.patch [new file with mode: 0644]
queue-4.9/mips-octeon-cvmx_pko_mem_debug8-use-oldest-forward-c.patch [new file with mode: 0644]
queue-4.9/mips-octeon-octeon-platform-fix-typing.patch [new file with mode: 0644]
queue-4.9/mips-sibyte-enable-zone_dma32-for-littlesur.patch [new file with mode: 0644]
queue-4.9/mlx4-use-snprintf-instead-of-complicated-strcpy.patch [new file with mode: 0644]
queue-4.9/modpost-skip-elf-local-symbols-during-section-mismat.patch [new file with mode: 0644]
queue-4.9/mtd-fix-mtd_oobavail-incoherent-returned-value.patch [new file with mode: 0644]
queue-4.9/net-ep93xx_eth-fix-mismatch-of-request_mem_region-in.patch [new file with mode: 0644]
queue-4.9/net-mlx4_core-fix-return-codes-of-unsupported-operat.patch [new file with mode: 0644]
queue-4.9/net-mlx5-release-resource-on-error-flow.patch [new file with mode: 0644]
queue-4.9/net-x25-fix-called-calling-length-calculation-in-x25.patch [new file with mode: 0644]
queue-4.9/net-x25-fix-null_x25_address-handling.patch [new file with mode: 0644]
queue-4.9/nfc-nxp-nci-fix-null-pointer-dereference-after-i2c-c.patch [new file with mode: 0644]
queue-4.9/nfsd-fix-a-warning-in-__cld_pipe_upcall.patch [new file with mode: 0644]
queue-4.9/nfsd-return-eperm-not-eacces-in-some-setattr-cases.patch [new file with mode: 0644]
queue-4.9/pinctrl-qcom-ssbi-gpio-fix-gpio-hog-related-boot-iss.patch [new file with mode: 0644]
queue-4.9/pinctrl-sh-pfc-r8a7792-fix-vin-versioned-groups.patch [new file with mode: 0644]
queue-4.9/powerpc-math-emu-update-macros-from-gcc.patch [new file with mode: 0644]
queue-4.9/rdma-hns-correct-the-value-of-hns_roce_hem_chunk_len.patch [new file with mode: 0644]
queue-4.9/regulator-fix-return-value-of-_set_load-stub.patch [new file with mode: 0644]
queue-4.9/rsxx-add-missed-destroy_workqueue-calls-in-remove.patch [new file with mode: 0644]
queue-4.9/rtc-dt-binding-abx80x-fix-resistance-scale.patch [new file with mode: 0644]
queue-4.9/rtc-max8997-fix-the-returned-value-in-case-of-error-.patch [new file with mode: 0644]
queue-4.9/scsi-zfcp-drop-default-switch-case-which-might-paper.patch [new file with mode: 0644]
queue-4.9/serial-core-allow-processing-sysrq-at-port-unlock-ti.patch [new file with mode: 0644]
queue-4.9/serial-imx-fix-error-handling-in-console_setup.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/staging-iio-adt7316-fix-i2c-data-reading-set-the-dat.patch [new file with mode: 0644]
queue-4.9/tcp-fix-off-by-one-bug-on-aborting-window-probing-so.patch [new file with mode: 0644]
queue-4.9/tcp-fix-snmp-tcp-timeout-under-estimation.patch [new file with mode: 0644]
queue-4.9/tty-don-t-block-on-io-when-ldisc-change-is-pending.patch [new file with mode: 0644]
queue-4.9/usb-dwc3-don-t-log-probe-deferrals-but-do-log-other-.patch [new file with mode: 0644]

diff --git a/queue-4.9/acpi-fix-acpi_find_child_device-invocation-in-acpi_p.patch b/queue-4.9/acpi-fix-acpi_find_child_device-invocation-in-acpi_p.patch
new file mode 100644 (file)
index 0000000..5a8efca
--- /dev/null
@@ -0,0 +1,36 @@
+From 609fa44d323e3dbe33ca90fe7f39ef7a35854af3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 23 Nov 2018 23:07:14 +0300
+Subject: ACPI: fix acpi_find_child_device() invocation in
+ acpi_preset_companion()
+
+From: Alexey Dobriyan <adobriyan@gmail.com>
+
+[ Upstream commit f8c6d1402b89f22a3647705d63cbd171aa19a77e ]
+
+acpi_find_child_device() accepts boolean not pointer as last argument.
+
+Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
+[ rjw: Subject ]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/acpi.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/acpi.h b/include/linux/acpi.h
+index 719eb97217a3c..5670bb9788bb4 100644
+--- a/include/linux/acpi.h
++++ b/include/linux/acpi.h
+@@ -77,7 +77,7 @@ static inline bool has_acpi_companion(struct device *dev)
+ static inline void acpi_preset_companion(struct device *dev,
+                                        struct acpi_device *parent, u64 addr)
+ {
+-      ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL));
++      ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, false));
+ }
+ static inline const char *acpi_dev_name(struct acpi_device *adev)
+-- 
+2.20.1
+
diff --git a/queue-4.9/alsa-pcm-fix-stream-lock-usage-in-snd_pcm_period_ela.patch b/queue-4.9/alsa-pcm-fix-stream-lock-usage-in-snd_pcm_period_ela.patch
new file mode 100644 (file)
index 0000000..792d676
--- /dev/null
@@ -0,0 +1,53 @@
+From 49264658ffbfaf4555190ec251d9d1adb5dd05e8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Nov 2019 01:17:14 +0800
+Subject: ALSA: pcm: Fix stream lock usage in snd_pcm_period_elapsed()
+
+From: paulhsia <paulhsia@chromium.org>
+
+[ Upstream commit f5cdc9d4003a2f66ea57b3edd3e04acc2b1a4439 ]
+
+If the nullity check for `substream->runtime` is outside of the lock
+region, it is possible to have a null runtime in the critical section
+if snd_pcm_detach_substream is called right before the lock.
+
+Signed-off-by: paulhsia <paulhsia@chromium.org>
+Link: https://lore.kernel.org/r/20191112171715.128727-2-paulhsia@chromium.org
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/core/pcm_lib.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
+index 3acb373674c37..f09ae7efc6957 100644
+--- a/sound/core/pcm_lib.c
++++ b/sound/core/pcm_lib.c
+@@ -1877,11 +1877,14 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
+       struct snd_pcm_runtime *runtime;
+       unsigned long flags;
+-      if (PCM_RUNTIME_CHECK(substream))
++      if (snd_BUG_ON(!substream))
+               return;
+-      runtime = substream->runtime;
+       snd_pcm_stream_lock_irqsave(substream, flags);
++      if (PCM_RUNTIME_CHECK(substream))
++              goto _unlock;
++      runtime = substream->runtime;
++
+       if (!snd_pcm_running(substream) ||
+           snd_pcm_update_hw_ptr0(substream, 1) < 0)
+               goto _end;
+@@ -1892,6 +1895,7 @@ void snd_pcm_period_elapsed(struct snd_pcm_substream *substream)
+ #endif
+  _end:
+       kill_fasync(&runtime->fasync, SIGIO, POLL_IN);
++ _unlock:
+       snd_pcm_stream_unlock_irqrestore(substream, flags);
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/altera-stapl-check-for-a-null-key-before-strcasecmp-.patch b/queue-4.9/altera-stapl-check-for-a-null-key-before-strcasecmp-.patch
new file mode 100644 (file)
index 0000000..d723e6d
--- /dev/null
@@ -0,0 +1,41 @@
+From a5f065fcec33833c7711829e7b55ee6a8b889c3d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 24 Nov 2018 12:34:10 +0000
+Subject: altera-stapl: check for a null key before strcasecmp'ing it
+
+From: Colin Ian King <colin.king@canonical.com>
+
+[ Upstream commit 9ccb645683ef46e3c52c12c088a368baa58447d4 ]
+
+Currently the null check on key is occurring after the strcasecmp on
+the key, hence there is a potential null pointer dereference on key.
+Fix this by checking if key is null first. Also replace the == 0
+check on strcasecmp with just the ! operator.
+
+Detected by CoverityScan, CID#1248787 ("Dereference before null check")
+
+Fixes: fa766c9be58b ("[media] Altera FPGA firmware download module")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/misc/altera-stapl/altera.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c
+index f53e217e963f5..494e263daa748 100644
+--- a/drivers/misc/altera-stapl/altera.c
++++ b/drivers/misc/altera-stapl/altera.c
+@@ -2176,8 +2176,7 @@ static int altera_get_note(u8 *p, s32 program_size,
+                       key_ptr = &p[note_strings +
+                                       get_unaligned_be32(
+                                       &p[note_table + (8 * i)])];
+-                      if ((strncasecmp(key, key_ptr, strlen(key_ptr)) == 0) &&
+-                                              (key != NULL)) {
++                      if (key && !strncasecmp(key, key_ptr, strlen(key_ptr))) {
+                               status = 0;
+                               value_ptr = &p[note_strings +
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-8813-1-make-aligned-2-byte-getuser-putuser-atomi.patch b/queue-4.9/arm-8813-1-make-aligned-2-byte-getuser-putuser-atomi.patch
new file mode 100644 (file)
index 0000000..c84566a
--- /dev/null
@@ -0,0 +1,172 @@
+From 06f874d5cd61b5b5eb0ca37d32014e35ea98d6d3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 9 Nov 2018 10:12:30 +0100
+Subject: ARM: 8813/1: Make aligned 2-byte getuser()/putuser() atomic on ARMv6+
+
+From: Vincent Whitchurch <vincent.whitchurch@axis.com>
+
+[ Upstream commit 344eb5539abf3e0b6ce22568c03e86450073e097 ]
+
+getuser() and putuser() (and there underscored variants) use two
+strb[t]/ldrb[t] instructions when they are asked to get/put 16-bits.
+This means that the read/write is not atomic even when performed to a
+16-bit-aligned address.
+
+This leads to problems with vhost: vhost uses __getuser() to read the
+vring's 16-bit avail.index field, and if it happens to observe a partial
+update of the index, wrong descriptors will be used which will lead to a
+breakdown of the virtio communication.  A similar problem exists for
+__putuser() which is used to write to the vring's used.index field.
+
+The reason these functions use strb[t]/ldrb[t] is because strht/ldrht
+instructions did not exist until ARMv6T2/ARMv7.  So we should be easily
+able to fix this on ARMv7.  Also, since all ARMv6 processors also don't
+actually use the unprivileged instructions anymore for uaccess (since
+CONFIG_CPU_USE_DOMAINS is not used) we can easily fix them too.
+
+Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
+Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/include/asm/uaccess.h | 18 ++++++++++++++++++
+ arch/arm/lib/getuser.S         | 11 +++++++++++
+ arch/arm/lib/putuser.S         | 20 ++++++++++----------
+ 3 files changed, 39 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
+index 0f6c6b873bc5f..e05c31af48d1b 100644
+--- a/arch/arm/include/asm/uaccess.h
++++ b/arch/arm/include/asm/uaccess.h
+@@ -379,6 +379,13 @@ do {                                                                      \
+ #define __get_user_asm_byte(x, addr, err)                     \
+       __get_user_asm(x, addr, err, ldrb)
++#if __LINUX_ARM_ARCH__ >= 6
++
++#define __get_user_asm_half(x, addr, err)                     \
++      __get_user_asm(x, addr, err, ldrh)
++
++#else
++
+ #ifndef __ARMEB__
+ #define __get_user_asm_half(x, __gu_addr, err)                        \
+ ({                                                            \
+@@ -397,6 +404,8 @@ do {                                                                       \
+ })
+ #endif
++#endif /* __LINUX_ARM_ARCH__ >= 6 */
++
+ #define __get_user_asm_word(x, addr, err)                     \
+       __get_user_asm(x, addr, err, ldr)
+ #endif
+@@ -472,6 +481,13 @@ do {                                                                      \
+ #define __put_user_asm_byte(x, __pu_addr, err)                        \
+       __put_user_asm(x, __pu_addr, err, strb)
++#if __LINUX_ARM_ARCH__ >= 6
++
++#define __put_user_asm_half(x, __pu_addr, err)                        \
++      __put_user_asm(x, __pu_addr, err, strh)
++
++#else
++
+ #ifndef __ARMEB__
+ #define __put_user_asm_half(x, __pu_addr, err)                        \
+ ({                                                            \
+@@ -488,6 +504,8 @@ do {                                                                       \
+ })
+ #endif
++#endif /* __LINUX_ARM_ARCH__ >= 6 */
++
+ #define __put_user_asm_word(x, __pu_addr, err)                        \
+       __put_user_asm(x, __pu_addr, err, str)
+diff --git a/arch/arm/lib/getuser.S b/arch/arm/lib/getuser.S
+index 746e7801dcdf7..b2e4bc3a635e2 100644
+--- a/arch/arm/lib/getuser.S
++++ b/arch/arm/lib/getuser.S
+@@ -42,6 +42,12 @@ _ASM_NOKPROBE(__get_user_1)
+ ENTRY(__get_user_2)
+       check_uaccess r0, 2, r1, r2, __get_user_bad
++#if __LINUX_ARM_ARCH__ >= 6
++
++2: TUSER(ldrh)        r2, [r0]
++
++#else
++
+ #ifdef CONFIG_CPU_USE_DOMAINS
+ rb    .req    ip
+ 2:    ldrbt   r2, [r0], #1
+@@ -56,6 +62,9 @@ rb   .req    r0
+ #else
+       orr     r2, rb, r2, lsl #8
+ #endif
++
++#endif /* __LINUX_ARM_ARCH__ >= 6 */
++
+       mov     r0, #0
+       ret     lr
+ ENDPROC(__get_user_2)
+@@ -145,7 +154,9 @@ _ASM_NOKPROBE(__get_user_bad8)
+ .pushsection __ex_table, "a"
+       .long   1b, __get_user_bad
+       .long   2b, __get_user_bad
++#if __LINUX_ARM_ARCH__ < 6
+       .long   3b, __get_user_bad
++#endif
+       .long   4b, __get_user_bad
+       .long   5b, __get_user_bad8
+       .long   6b, __get_user_bad8
+diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S
+index 38d660d3705f4..515eeaa9975c6 100644
+--- a/arch/arm/lib/putuser.S
++++ b/arch/arm/lib/putuser.S
+@@ -41,16 +41,13 @@ ENDPROC(__put_user_1)
+ ENTRY(__put_user_2)
+       check_uaccess r0, 2, r1, ip, __put_user_bad
+-      mov     ip, r2, lsr #8
+-#ifdef CONFIG_THUMB2_KERNEL
+-#ifndef __ARMEB__
+-2: TUSER(strb)        r2, [r0]
+-3: TUSER(strb)        ip, [r0, #1]
++#if __LINUX_ARM_ARCH__ >= 6
++
++2: TUSER(strh)        r2, [r0]
++
+ #else
+-2: TUSER(strb)        ip, [r0]
+-3: TUSER(strb)        r2, [r0, #1]
+-#endif
+-#else /* !CONFIG_THUMB2_KERNEL */
++
++      mov     ip, r2, lsr #8
+ #ifndef __ARMEB__
+ 2: TUSER(strb)        r2, [r0], #1
+ 3: TUSER(strb)        ip, [r0]
+@@ -58,7 +55,8 @@ ENTRY(__put_user_2)
+ 2: TUSER(strb)        ip, [r0], #1
+ 3: TUSER(strb)        r2, [r0]
+ #endif
+-#endif        /* CONFIG_THUMB2_KERNEL */
++
++#endif /* __LINUX_ARM_ARCH__ >= 6 */
+       mov     r0, #0
+       ret     lr
+ ENDPROC(__put_user_2)
+@@ -91,7 +89,9 @@ ENDPROC(__put_user_bad)
+ .pushsection __ex_table, "a"
+       .long   1b, __put_user_bad
+       .long   2b, __put_user_bad
++#if __LINUX_ARM_ARCH__ < 6
+       .long   3b, __put_user_bad
++#endif
+       .long   4b, __put_user_bad
+       .long   5b, __put_user_bad
+       .long   6b, __put_user_bad
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-debug-enable-uart1-for-socfpga-cyclone5.patch b/queue-4.9/arm-debug-enable-uart1-for-socfpga-cyclone5.patch
new file mode 100644 (file)
index 0000000..d58fda7
--- /dev/null
@@ -0,0 +1,87 @@
+From 0c8413beca0bf06fc48d1cef87612ea2897a5708 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 9 Oct 2018 13:28:37 +0200
+Subject: ARM: debug: enable UART1 for socfpga Cyclone5
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Clément Péron <peron.clem@gmail.com>
+
+[ Upstream commit f6628486c8489e91c513b62608f89ccdb745600d ]
+
+Cyclone5 and Arria10 doesn't have the same memory map for UART1.
+
+Split the SOCFPGA_UART1 into 2 options to allow debugging on UART1 for Cyclone5.
+
+Signed-off-by: Clément Péron <peron.clem@gmail.com>
+Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/Kconfig.debug | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
+index a5625430bef64..bb8f39fe3a225 100644
+--- a/arch/arm/Kconfig.debug
++++ b/arch/arm/Kconfig.debug
+@@ -987,14 +987,21 @@ choice
+                 Say Y here if you want kernel low-level debugging support
+                 on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
+-      config DEBUG_SOCFPGA_UART1
++      config DEBUG_SOCFPGA_ARRIA10_UART1
+               depends on ARCH_SOCFPGA
+-              bool "Use SOCFPGA UART1 for low-level debug"
++              bool "Use SOCFPGA Arria10 UART1 for low-level debug"
+               select DEBUG_UART_8250
+               help
+                 Say Y here if you want kernel low-level debugging support
+                 on SOCFPGA(Arria 10) based platforms.
++      config DEBUG_SOCFPGA_CYCLONE5_UART1
++              depends on ARCH_SOCFPGA
++              bool "Use SOCFPGA Cyclone 5 UART1 for low-level debug"
++              select DEBUG_UART_8250
++              help
++                Say Y here if you want kernel low-level debugging support
++                on SOCFPGA(Cyclone 5 and Arria 5) based platforms.
+       config DEBUG_SUN9I_UART0
+               bool "Kernel low-level debugging messages via sun9i UART0"
+@@ -1534,7 +1541,8 @@ config DEBUG_UART_PHYS
+       default 0xfe800000 if ARCH_IOP32X
+       default 0xff690000 if DEBUG_RK32_UART2
+       default 0xffc02000 if DEBUG_SOCFPGA_UART0
+-      default 0xffc02100 if DEBUG_SOCFPGA_UART1
++      default 0xffc02100 if DEBUG_SOCFPGA_ARRIA10_UART1
++      default 0xffc03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
+       default 0xffd82340 if ARCH_IOP13XX
+       default 0xffe40000 if DEBUG_RCAR_GEN1_SCIF0
+       default 0xffe42000 if DEBUG_RCAR_GEN1_SCIF2
+@@ -1624,7 +1632,8 @@ config DEBUG_UART_VIRT
+       default 0xfeb30c00 if DEBUG_KEYSTONE_UART0
+       default 0xfeb31000 if DEBUG_KEYSTONE_UART1
+       default 0xfec02000 if DEBUG_SOCFPGA_UART0
+-      default 0xfec02100 if DEBUG_SOCFPGA_UART1
++      default 0xfec02100 if DEBUG_SOCFPGA_ARRIA10_UART1
++      default 0xfec03000 if DEBUG_SOCFPGA_CYCLONE5_UART1
+       default 0xfec12000 if (DEBUG_MVEBU_UART0 || DEBUG_MVEBU_UART0_ALTERNATE) && ARCH_MVEBU
+       default 0xfec12100 if DEBUG_MVEBU_UART1_ALTERNATE
+       default 0xfec10000 if DEBUG_SIRFATLAS7_UART0
+@@ -1672,9 +1681,9 @@ config DEBUG_UART_8250_WORD
+       depends on DEBUG_LL_UART_8250 || DEBUG_UART_8250
+       depends on DEBUG_UART_8250_SHIFT >= 2
+       default y if DEBUG_PICOXCELL_UART || \
+-              DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_UART1 || \
+-              DEBUG_KEYSTONE_UART0 || DEBUG_KEYSTONE_UART1 || \
+-              DEBUG_ALPINE_UART0 || \
++              DEBUG_SOCFPGA_UART0 || DEBUG_SOCFPGA_ARRIA10_UART1 || \
++              DEBUG_SOCFPGA_CYCLONE5_UART1 || DEBUG_KEYSTONE_UART0 || \
++              DEBUG_KEYSTONE_UART1 || DEBUG_ALPINE_UART0 || \
+               DEBUG_DAVINCI_DMx_UART0 || DEBUG_DAVINCI_DA8XX_UART1 || \
+               DEBUG_DAVINCI_DA8XX_UART2 || \
+               DEBUG_BCM_KONA_UART || DEBUG_RK32_UART2
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-exynos-use-samsung-soc-specific-compatible-f.patch b/queue-4.9/arm-dts-exynos-use-samsung-soc-specific-compatible-f.patch
new file mode 100644 (file)
index 0000000..d03dbe0
--- /dev/null
@@ -0,0 +1,36 @@
+From 304a2fc12d1badc4524d2ae7fbb9920d4f74c9bd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 20 Nov 2018 16:54:28 +0100
+Subject: ARM: dts: exynos: Use Samsung SoC specific compatible for DWC2 module
+
+From: Marek Szyprowski <m.szyprowski@samsung.com>
+
+[ Upstream commit 6035cbcceb069f87296b3cd0bc4736ad5618bf47 ]
+
+DWC2 hardware module integrated in Samsung SoCs requires some quirks to
+operate properly, so use Samsung SoC specific compatible to notify driver
+to apply respective fixes.
+
+Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
+Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/exynos3250.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
+index 51dbd8cb91cb5..99b3d23319719 100644
+--- a/arch/arm/boot/dts/exynos3250.dtsi
++++ b/arch/arm/boot/dts/exynos3250.dtsi
+@@ -345,7 +345,7 @@
+               };
+               hsotg: hsotg@12480000 {
+-                      compatible = "snps,dwc2";
++                      compatible = "samsung,s3c6400-hsotg", "snps,dwc2";
+                       reg = <0x12480000 0x20000>;
+                       interrupts = <0 141 0>;
+                       clocks = <&cmu CLK_USBOTG>;
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-mmp2-fix-the-gpio-interrupt-cell-number.patch b/queue-4.9/arm-dts-mmp2-fix-the-gpio-interrupt-cell-number.patch
new file mode 100644 (file)
index 0000000..572be88
--- /dev/null
@@ -0,0 +1,36 @@
+From 970f94b9abe5e5153b5e39b0294a102ab3541ee2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Nov 2018 18:53:06 +0100
+Subject: ARM: dts: mmp2: fix the gpio interrupt cell number
+
+From: Lubomir Rintel <lkundrak@v3.sk>
+
+[ Upstream commit 400583983f8a8e95ec02c9c9e2b50188753a87fb ]
+
+gpio-pxa uses two cell to encode the interrupt source: the pin number
+and the trigger type. Adjust the device node accordingly.
+
+Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
+Acked-by: Pavel Machek <pavel@ucw.cz>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/mmp2.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/mmp2.dtsi b/arch/arm/boot/dts/mmp2.dtsi
+index 47e5b63339d18..e95deed6a7973 100644
+--- a/arch/arm/boot/dts/mmp2.dtsi
++++ b/arch/arm/boot/dts/mmp2.dtsi
+@@ -180,7 +180,7 @@
+                               clocks = <&soc_clocks MMP2_CLK_GPIO>;
+                               resets = <&soc_clocks MMP2_CLK_GPIO>;
+                               interrupt-controller;
+-                              #interrupt-cells = <1>;
++                              #interrupt-cells = <2>;
+                               ranges;
+                               gcb0: gpio@d4019000 {
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-pxa-clean-up-usb-controller-nodes.patch b/queue-4.9/arm-dts-pxa-clean-up-usb-controller-nodes.patch
new file mode 100644 (file)
index 0000000..6a23d41
--- /dev/null
@@ -0,0 +1,73 @@
+From a96cc4be3b353bf4934d945df27660da286eed7a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 1 Dec 2018 14:54:51 +0100
+Subject: ARM: dts: pxa: clean up USB controller nodes
+
+From: Daniel Mack <daniel@zonque.org>
+
+[ Upstream commit c40ad24254f1dbd54f2df5f5f524130dc1862122 ]
+
+PXA25xx SoCs don't have a USB controller, so drop the node from the
+common pxa2xx.dtsi base file. Both pxa27x and pxa3xx have a dedicated
+node already anyway.
+
+While at it, unify the names for the nodes across all pxa platforms.
+
+Signed-off-by: Daniel Mack <daniel@zonque.org>
+Reported-by: Sergey Yanovich <ynvich@gmail.com>
+Link: https://patchwork.kernel.org/patch/8375421/
+Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/pxa27x.dtsi | 2 +-
+ arch/arm/boot/dts/pxa2xx.dtsi | 7 -------
+ arch/arm/boot/dts/pxa3xx.dtsi | 2 +-
+ 3 files changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/arch/arm/boot/dts/pxa27x.dtsi b/arch/arm/boot/dts/pxa27x.dtsi
+index 0e1320afa1562..d629948000db1 100644
+--- a/arch/arm/boot/dts/pxa27x.dtsi
++++ b/arch/arm/boot/dts/pxa27x.dtsi
+@@ -34,7 +34,7 @@
+                       clocks = <&clks CLK_NONE>;
+               };
+-              pxa27x_ohci: usb@4c000000 {
++              usb0: usb@4c000000 {
+                       compatible = "marvell,pxa-ohci";
+                       reg = <0x4c000000 0x10000>;
+                       interrupts = <3>;
+diff --git a/arch/arm/boot/dts/pxa2xx.dtsi b/arch/arm/boot/dts/pxa2xx.dtsi
+index 3ff077ca44002..5a6f4ed92dac3 100644
+--- a/arch/arm/boot/dts/pxa2xx.dtsi
++++ b/arch/arm/boot/dts/pxa2xx.dtsi
+@@ -117,13 +117,6 @@
+                       status = "disabled";
+               };
+-              usb0: ohci@4c000000 {
+-                      compatible = "marvell,pxa-ohci";
+-                      reg = <0x4c000000 0x10000>;
+-                      interrupts = <3>;
+-                      status = "disabled";
+-              };
+-
+               mmc0: mmc@41100000 {
+                       compatible = "marvell,pxa-mmc";
+                       reg = <0x41100000 0x1000>;
+diff --git a/arch/arm/boot/dts/pxa3xx.dtsi b/arch/arm/boot/dts/pxa3xx.dtsi
+index 9d6f3aacedb70..4aee150626902 100644
+--- a/arch/arm/boot/dts/pxa3xx.dtsi
++++ b/arch/arm/boot/dts/pxa3xx.dtsi
+@@ -187,7 +187,7 @@
+                       status = "disabled";
+               };
+-              pxa3xx_ohci: usb@4c000000 {
++              usb0: usb@4c000000 {
+                       compatible = "marvell,pxa-ohci";
+                       reg = <0x4c000000 0x10000>;
+                       interrupts = <3>;
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-realview-fix-some-more-duplicate-regulator-n.patch b/queue-4.9/arm-dts-realview-fix-some-more-duplicate-regulator-n.patch
new file mode 100644 (file)
index 0000000..04d7a60
--- /dev/null
@@ -0,0 +1,73 @@
+From 86a57a7c3ecf4edc3226c5f6dacd26637b1fa0ff Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 3 Dec 2018 13:12:48 -0600
+Subject: ARM: dts: realview: Fix some more duplicate regulator nodes
+
+From: Rob Herring <robh@kernel.org>
+
+[ Upstream commit f3b2f758ec1e6cdb13c925647cbd8ad4938b78fb ]
+
+There's a bug in dtc in checking for duplicate node names when there's
+another section (e.g. "/ { };"). In this case, skeleton.dtsi provides
+another section. Upon removal of skeleton.dtsi, the dtb fails to build
+due to a duplicate node 'fixedregulator@0'. As both nodes were pretty
+much the same 3.3V fixed regulator, it hasn't really mattered. Fix this
+by renaming the nodes to something unique. In the process, drop the
+unit-address which shouldn't be present wtihout reg property.
+
+Signed-off-by: Rob Herring <robh@kernel.org>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/arm-realview-pb1176.dts | 4 ++--
+ arch/arm/boot/dts/arm-realview-pb11mp.dts | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/boot/dts/arm-realview-pb1176.dts b/arch/arm/boot/dts/arm-realview-pb1176.dts
+index c1fd5615ddfe3..939c108c24a6c 100644
+--- a/arch/arm/boot/dts/arm-realview-pb1176.dts
++++ b/arch/arm/boot/dts/arm-realview-pb1176.dts
+@@ -45,7 +45,7 @@
+       };
+       /* The voltage to the MMC card is hardwired at 3.3V */
+-      vmmc: fixedregulator@0 {
++      vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc";
+               regulator-min-microvolt = <3300000>;
+@@ -53,7 +53,7 @@
+               regulator-boot-on;
+         };
+-      veth: fixedregulator@0 {
++      veth: regulator-veth {
+               compatible = "regulator-fixed";
+               regulator-name = "veth";
+               regulator-min-microvolt = <3300000>;
+diff --git a/arch/arm/boot/dts/arm-realview-pb11mp.dts b/arch/arm/boot/dts/arm-realview-pb11mp.dts
+index e306f1cceb4ec..95037c48182de 100644
+--- a/arch/arm/boot/dts/arm-realview-pb11mp.dts
++++ b/arch/arm/boot/dts/arm-realview-pb11mp.dts
+@@ -145,7 +145,7 @@
+       };
+       /* The voltage to the MMC card is hardwired at 3.3V */
+-      vmmc: fixedregulator@0 {
++      vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc";
+               regulator-min-microvolt = <3300000>;
+@@ -153,7 +153,7 @@
+               regulator-boot-on;
+         };
+-      veth: fixedregulator@0 {
++      veth: regulator-veth {
+               compatible = "regulator-fixed";
+               regulator-name = "veth";
+               regulator-min-microvolt = <3300000>;
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-realview-pbx-fix-duplicate-regulator-nodes.patch b/queue-4.9/arm-dts-realview-pbx-fix-duplicate-regulator-nodes.patch
new file mode 100644 (file)
index 0000000..b2132f4
--- /dev/null
@@ -0,0 +1,55 @@
+From 56c26decfacd5816f89b9db45a7b6b064c45ef22 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 29 Nov 2018 19:05:47 -0600
+Subject: ARM: dts: realview-pbx: Fix duplicate regulator nodes
+
+From: Rob Herring <robh@kernel.org>
+
+[ Upstream commit 7f4b001b7f6e0480b5bdab9cd8ce1711e43e5cb5 ]
+
+There's a bug in dtc in checking for duplicate node names when there's
+another section (e.g. "/ { };"). In this case, skeleton.dtsi provides
+another section. Upon removal of skeleton.dtsi, the dtb fails to build
+due to a duplicate node 'fixedregulator@0'. As both nodes were pretty
+much the same 3.3V fixed regulator, it hasn't really mattered. Fix this
+by renaming the nodes to something unique. In the process, drop the
+unit-address which shouldn't be present wtihout reg property.
+
+Cc: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Signed-off-by: Olof Johansson <olof@lixom.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/arm-realview-pbx.dtsi | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/boot/dts/arm-realview-pbx.dtsi b/arch/arm/boot/dts/arm-realview-pbx.dtsi
+index 2bf3958b2e6b9..068293254fbb8 100644
+--- a/arch/arm/boot/dts/arm-realview-pbx.dtsi
++++ b/arch/arm/boot/dts/arm-realview-pbx.dtsi
+@@ -43,7 +43,7 @@
+       };
+       /* The voltage to the MMC card is hardwired at 3.3V */
+-      vmmc: fixedregulator@0 {
++      vmmc: regulator-vmmc {
+               compatible = "regulator-fixed";
+               regulator-name = "vmmc";
+               regulator-min-microvolt = <3300000>;
+@@ -51,7 +51,7 @@
+               regulator-boot-on;
+         };
+-      veth: fixedregulator@0 {
++      veth: regulator-veth {
+               compatible = "regulator-fixed";
+               regulator-name = "veth";
+               regulator-min-microvolt = <3300000>;
+@@ -539,4 +539,3 @@
+               };
+       };
+ };
+-
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-rockchip-fix-rk3288-rock2-vcc_flash-name.patch b/queue-4.9/arm-dts-rockchip-fix-rk3288-rock2-vcc_flash-name.patch
new file mode 100644 (file)
index 0000000..48006c8
--- /dev/null
@@ -0,0 +1,36 @@
+From a31dc071edf71ce2694f392d1fb2a3f4853747da Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 13 Nov 2018 15:24:13 +0000
+Subject: ARM: dts: rockchip: Fix rk3288-rock2 vcc_flash name
+
+From: John Keeping <john@metanate.com>
+
+[ Upstream commit 03d9f8fa2bfdc791865624d3adc29070cf67814e ]
+
+There is no functional change from this, but it is confusing to find two
+copies of vcc_sys and no vcc_flash when looking in
+/sys/class/regulator/*/name.
+
+Signed-off-by: John Keeping <john@metanate.com>
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/rk3288-rock2-som.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+index bb1f01e037ba7..c1c576875bc85 100644
+--- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi
++++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi
+@@ -63,7 +63,7 @@
+       vcc_flash: flash-regulator {
+               compatible = "regulator-fixed";
+-              regulator-name = "vcc_sys";
++              regulator-name = "vcc_flash";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               startup-delay-us = <150>;
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-dts-sunxi-fix-pmu-compatible-strings.patch b/queue-4.9/arm-dts-sunxi-fix-pmu-compatible-strings.patch
new file mode 100644 (file)
index 0000000..6f36729
--- /dev/null
@@ -0,0 +1,52 @@
+From 8bf5f974fb95b9fab91bdf77385274b56f8c2bc9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 6 Dec 2018 13:11:42 -0600
+Subject: ARM: dts: sunxi: Fix PMU compatible strings
+
+From: Rob Herring <robh@kernel.org>
+
+[ Upstream commit 5719ac19fc32d892434939c1756c2f9a8322e6ef ]
+
+"arm,cortex-a15-pmu" is not a valid fallback compatible string for an
+Cortex-A7 PMU, so drop it.
+
+Cc: Maxime Ripard <maxime.ripard@bootlin.com>
+Cc: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Rob Herring <robh@kernel.org>
+Acked-by: Will Deacon <will.deacon@arm.com>
+Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/boot/dts/sun6i-a31.dtsi | 2 +-
+ arch/arm/boot/dts/sun7i-a20.dtsi | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts/sun6i-a31.dtsi
+index ce1960453a0bb..3bfa79717dfab 100644
+--- a/arch/arm/boot/dts/sun6i-a31.dtsi
++++ b/arch/arm/boot/dts/sun6i-a31.dtsi
+@@ -174,7 +174,7 @@
+       };
+       pmu {
+-              compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
++              compatible = "arm,cortex-a7-pmu";
+               interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
+index 94cf5a1c71723..db5d30598ad66 100644
+--- a/arch/arm/boot/dts/sun7i-a20.dtsi
++++ b/arch/arm/boot/dts/sun7i-a20.dtsi
+@@ -172,7 +172,7 @@
+       };
+       pmu {
+-              compatible = "arm,cortex-a7-pmu", "arm,cortex-a15-pmu";
++              compatible = "arm,cortex-a7-pmu";
+               interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
+       };
+-- 
+2.20.1
+
diff --git a/queue-4.9/arm-omap1-2-fix-soc-name-printing.patch b/queue-4.9/arm-omap1-2-fix-soc-name-printing.patch
new file mode 100644 (file)
index 0000000..3446907
--- /dev/null
@@ -0,0 +1,63 @@
+From 264c02f5fb4f8c9f3d6d3b28dd87f56a40b3855f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 19 Nov 2018 21:46:41 +0200
+Subject: ARM: OMAP1/2: fix SoC name printing
+
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+
+[ Upstream commit 04a92358b3964988c78dfe370a559ae550383886 ]
+
+Currently we get extra newlines on OMAP1/2 when the SoC name is printed:
+
+[    0.000000] OMAP1510
+[    0.000000]  revision 2 handled as 15xx id: bc058c9b93111a16
+
+[    0.000000] OMAP2420
+[    0.000000]
+
+Fix by using pr_cont.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/mach-omap1/id.c | 6 +++---
+ arch/arm/mach-omap2/id.c | 4 ++--
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
+index 52de382fc8047..7e49dfda3d2f4 100644
+--- a/arch/arm/mach-omap1/id.c
++++ b/arch/arm/mach-omap1/id.c
+@@ -200,10 +200,10 @@ void __init omap_check_revision(void)
+               printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type);
+       }
+-      printk(KERN_INFO "OMAP%04x", omap_revision >> 16);
++      pr_info("OMAP%04x", omap_revision >> 16);
+       if ((omap_revision >> 8) & 0xff)
+-              printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff);
+-      printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n",
++              pr_cont("%x", (omap_revision >> 8) & 0xff);
++      pr_cont(" revision %i handled as %02xxx id: %08x%08x\n",
+              die_rev, omap_revision & 0xff, system_serial_low,
+              system_serial_high);
+ }
+diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
+index cc6d9fa609242..9d942f022f2f6 100644
+--- a/arch/arm/mach-omap2/id.c
++++ b/arch/arm/mach-omap2/id.c
+@@ -199,8 +199,8 @@ void __init omap2xxx_check_revision(void)
+       pr_info("%s", soc_name);
+       if ((omap_rev() >> 8) & 0x0f)
+-              pr_info("%s", soc_rev);
+-      pr_info("\n");
++              pr_cont("%s", soc_rev);
++      pr_cont("\n");
+ }
+ #define OMAP3_SHOW_FEATURE(feat)              \
+-- 
+2.20.1
+
diff --git a/queue-4.9/audit_get_nd-don-t-unlock-parent-too-early.patch b/queue-4.9/audit_get_nd-don-t-unlock-parent-too-early.patch
new file mode 100644 (file)
index 0000000..3173df5
--- /dev/null
@@ -0,0 +1,40 @@
+From 0a02fe96d213aceb6864da26088de9753a7db01e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 2 Nov 2019 13:11:41 -0400
+Subject: audit_get_nd(): don't unlock parent too early
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+[ Upstream commit 69924b89687a2923e88cc42144aea27868913d0e ]
+
+if the child has been negative and just went positive
+under us, we want coherent d_is_positive() and ->d_inode.
+Don't unlock the parent until we'd done that work...
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ kernel/audit_watch.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
+index f036b6ada6efc..712469a3103ac 100644
+--- a/kernel/audit_watch.c
++++ b/kernel/audit_watch.c
+@@ -365,12 +365,12 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
+       struct dentry *d = kern_path_locked(watch->path, parent);
+       if (IS_ERR(d))
+               return PTR_ERR(d);
+-      inode_unlock(d_backing_inode(parent->dentry));
+       if (d_is_positive(d)) {
+               /* update watch filter fields */
+               watch->dev = d->d_sb->s_dev;
+               watch->ino = d_backing_inode(d)->i_ino;
+       }
++      inode_unlock(d_backing_inode(parent->dentry));
+       dput(d);
+       return 0;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/autofs-fix-a-leak-in-autofs_expire_indirect.patch b/queue-4.9/autofs-fix-a-leak-in-autofs_expire_indirect.patch
new file mode 100644 (file)
index 0000000..1d101e6
--- /dev/null
@@ -0,0 +1,39 @@
+From 3e4ab9b984badeb2ee4ca870a316d02ea154d026 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 25 Oct 2019 00:03:11 -0400
+Subject: autofs: fix a leak in autofs_expire_indirect()
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+[ Upstream commit 03ad0d703df75c43f78bd72e16124b5b94a95188 ]
+
+if the second call of should_expire() in there ends up
+grabbing and returning a new reference to dentry, we need
+to drop it before continuing.
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/autofs4/expire.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
+index 2e1f50e467f15..02f0d373adbf7 100644
+--- a/fs/autofs4/expire.c
++++ b/fs/autofs4/expire.c
+@@ -469,9 +469,10 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
+                */
+               flags &= ~AUTOFS_EXP_LEAVES;
+               found = should_expire(expired, mnt, timeout, how);
+-              if (!found || found != expired)
+-                      /* Something has changed, continue */
++              if (found != expired) { // something has changed, continue
++                      dput(found);
+                       goto next;
++              }
+               if (expired != dentry)
+                       dput(dentry);
+-- 
+2.20.1
+
diff --git a/queue-4.9/clk-rockchip-fix-rk3188-sclk_mac_lbtest-parameter-or.patch b/queue-4.9/clk-rockchip-fix-rk3188-sclk_mac_lbtest-parameter-or.patch
new file mode 100644 (file)
index 0000000..5233ca7
--- /dev/null
@@ -0,0 +1,37 @@
+From eeb9e3761474f50de6cfb039fc162f6cce2cd32f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 15 Nov 2018 12:17:30 +0100
+Subject: clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering
+
+From: Heiko Stuebner <heiko@sntech.de>
+
+[ Upstream commit ac8cb53829a6ba119082e067f5bc8fab3611ce6a ]
+
+Similar to commit a9f0c0e56371 ("clk: rockchip: fix rk3188 sclk_smc
+gate data") there is one other gate clock in the rk3188 clock driver
+with a similar wrong ordering, the sclk_mac_lbtest. So fix it as well.
+
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/rockchip/clk-rk3188.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
+index a4c49906acf2c..d62031eedbe64 100644
+--- a/drivers/clk/rockchip/clk-rk3188.c
++++ b/drivers/clk/rockchip/clk-rk3188.c
+@@ -361,8 +361,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
+                       RK2928_CLKGATE_CON(2), 5, GFLAGS),
+       MUX(SCLK_MAC, "sclk_macref", mux_sclk_macref_p, CLK_SET_RATE_PARENT,
+                       RK2928_CLKSEL_CON(21), 4, 1, MFLAGS),
+-      GATE(0, "sclk_mac_lbtest", "sclk_macref",
+-                      RK2928_CLKGATE_CON(2), 12, 0, GFLAGS),
++      GATE(0, "sclk_mac_lbtest", "sclk_macref", 0,
++                      RK2928_CLKGATE_CON(2), 12, GFLAGS),
+       COMPOSITE(0, "hsadc_src", mux_pll_src_gpll_cpll_p, 0,
+                       RK2928_CLKSEL_CON(22), 0, 1, MFLAGS, 8, 8, DFLAGS,
+-- 
+2.20.1
+
diff --git a/queue-4.9/clk-rockchip-fix-rk3188-sclk_smc-gate-data.patch b/queue-4.9/clk-rockchip-fix-rk3188-sclk_smc-gate-data.patch
new file mode 100644 (file)
index 0000000..bae68ce
--- /dev/null
@@ -0,0 +1,38 @@
+From bbc20e9c7f742ad64ee761bec7e9d581fb64b337 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Nov 2018 15:45:49 +0000
+Subject: clk: rockchip: fix rk3188 sclk_smc gate data
+
+From: Finley Xiao <finley.xiao@rock-chips.com>
+
+[ Upstream commit a9f0c0e563717b9f63b3bb1c4a7c2df436a206d9 ]
+
+Fix sclk_smc gate data.
+Change variable order, flags come before the register address.
+
+Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
+Signed-off-by: Johan Jonker <jbx9999@hotmail.com>
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/rockchip/clk-rk3188.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
+index 523378d1396e8..a4c49906acf2c 100644
+--- a/drivers/clk/rockchip/clk-rk3188.c
++++ b/drivers/clk/rockchip/clk-rk3188.c
+@@ -390,8 +390,8 @@ static struct rockchip_clk_branch common_clk_branches[] __initdata = {
+        * Clock-Architecture Diagram 4
+        */
+-      GATE(SCLK_SMC, "sclk_smc", "hclk_peri",
+-                      RK2928_CLKGATE_CON(2), 4, 0, GFLAGS),
++      GATE(SCLK_SMC, "sclk_smc", "hclk_peri", 0,
++                      RK2928_CLKGATE_CON(2), 4, GFLAGS),
+       COMPOSITE_NOMUX(SCLK_SPI0, "sclk_spi0", "pclk_peri", 0,
+                       RK2928_CLKSEL_CON(25), 0, 7, DFLAGS,
+-- 
+2.20.1
+
diff --git a/queue-4.9/clk-sunxi-ng-h3-h5-fix-csi_mclk-parent.patch b/queue-4.9/clk-sunxi-ng-h3-h5-fix-csi_mclk-parent.patch
new file mode 100644 (file)
index 0000000..699c551
--- /dev/null
@@ -0,0 +1,36 @@
+From 295b2064d1c5b5698b2f6d8ef24c585296019f44 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 30 Nov 2018 13:33:28 +0800
+Subject: clk: sunxi-ng: h3/h5: Fix CSI_MCLK parent
+
+From: Chen-Yu Tsai <wens@csie.org>
+
+[ Upstream commit 7bb7d29cffdd24bf419516d14b6768591e74069e ]
+
+The third parent of CSI_MCLK is PLL_PERIPH1, not PLL_PERIPH0.
+Fix it.
+
+Fixes: 0577e4853bfb ("clk: sunxi-ng: Add H3 clocks")
+Acked-by: Stephen Boyd <sboyd@kernel.org>
+Signed-off-by: Chen-Yu Tsai <wens@csie.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/clk/sunxi-ng/ccu-sun8i-h3.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
+index a26c8a19fe93a..9dd6daaa13367 100644
+--- a/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
++++ b/drivers/clk/sunxi-ng/ccu-sun8i-h3.c
+@@ -458,7 +458,7 @@ static const char * const csi_sclk_parents[] = { "pll-periph0", "pll-periph1" };
+ static SUNXI_CCU_M_WITH_MUX_GATE(csi_sclk_clk, "csi-sclk", csi_sclk_parents,
+                                0x134, 16, 4, 24, 3, BIT(31), 0);
+-static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph0" };
++static const char * const csi_mclk_parents[] = { "osc24M", "pll-video", "pll-periph1" };
+ static SUNXI_CCU_M_WITH_MUX_GATE(csi_mclk_clk, "csi-mclk", csi_mclk_parents,
+                                0x134, 0, 5, 8, 3, BIT(15), 0);
+-- 
+2.20.1
+
diff --git a/queue-4.9/cxgb4vf-fix-memleak-in-mac_hlist-initialization.patch b/queue-4.9/cxgb4vf-fix-memleak-in-mac_hlist-initialization.patch
new file mode 100644 (file)
index 0000000..24f9bbd
--- /dev/null
@@ -0,0 +1,51 @@
+From 5797bd267426cfbd16cf8ac354e1852fdf0f6d25 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 9 Nov 2018 14:52:01 +0530
+Subject: cxgb4vf: fix memleak in mac_hlist initialization
+
+From: Arjun Vynipadath <arjun@chelsio.com>
+
+[ Upstream commit 24357e06ba511ad874d664d39475dbb01c1ca450 ]
+
+mac_hlist was initialized during adapter_up, which will be called
+every time a vf device is first brought up, or every time when device
+is brought up again after bringing all devices down. This means our
+state of previous list is lost, causing a memleak if entries are
+present in the list. To fix that, move list init to the condition
+that performs initial one time adapter setup.
+
+Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
+Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+index a37481c04a87b..9eb3071b69a42 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
++++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+@@ -718,6 +718,10 @@ static int adapter_up(struct adapter *adapter)
+               if (adapter->flags & USING_MSIX)
+                       name_msix_vecs(adapter);
++
++              /* Initialize hash mac addr list*/
++              INIT_LIST_HEAD(&adapter->mac_hlist);
++
+               adapter->flags |= FULL_INIT_DONE;
+       }
+@@ -743,8 +747,6 @@ static int adapter_up(struct adapter *adapter)
+       enable_rx(adapter);
+       t4vf_sge_start(adapter);
+-      /* Initialize hash mac addr list*/
+-      INIT_LIST_HEAD(&adapter->mac_hlist);
+       return 0;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/dlm-fix-invalid-cluster-name-warning.patch b/queue-4.9/dlm-fix-invalid-cluster-name-warning.patch
new file mode 100644 (file)
index 0000000..4ad0625
--- /dev/null
@@ -0,0 +1,47 @@
+From bac8aaa66f348b0b90b2c002358aeb5c6fb46743 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 3 Dec 2018 15:27:37 -0600
+Subject: dlm: fix invalid cluster name warning
+
+From: David Teigland <teigland@redhat.com>
+
+[ Upstream commit 3595c559326d0b660bb088a88e22e0ca630a0e35 ]
+
+The warning added in commit 3b0e761ba83
+  "dlm: print log message when cluster name is not set"
+
+did not account for the fact that lockspaces created
+from userland do not supply a cluster name, so bogus
+warnings are printed every time a userland lockspace
+is created.
+
+Signed-off-by: David Teigland <teigland@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/dlm/user.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fs/dlm/user.c b/fs/dlm/user.c
+index 57f2aacec97f5..bb0d307deadd3 100644
+--- a/fs/dlm/user.c
++++ b/fs/dlm/user.c
+@@ -25,6 +25,7 @@
+ #include "lvb_table.h"
+ #include "user.h"
+ #include "ast.h"
++#include "config.h"
+ static const char name_prefix[] = "dlm";
+ static const struct file_operations device_fops;
+@@ -402,7 +403,7 @@ static int device_create_lockspace(struct dlm_lspace_params *params)
+       if (!capable(CAP_SYS_ADMIN))
+               return -EPERM;
+-      error = dlm_new_lockspace(params->name, NULL, params->flags,
++      error = dlm_new_lockspace(params->name, dlm_config.ci_cluster_name, params->flags,
+                                 DLM_USER_LVB_LEN, NULL, NULL, NULL,
+                                 &lockspace);
+       if (error)
+-- 
+2.20.1
+
diff --git a/queue-4.9/dlm-fix-missing-idr_destroy-for-recover_idr.patch b/queue-4.9/dlm-fix-missing-idr_destroy-for-recover_idr.patch
new file mode 100644 (file)
index 0000000..ff62940
--- /dev/null
@@ -0,0 +1,32 @@
+From 45c77c0a84a379e5317ebb34b0fa20dfb33fdf60 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 15 Nov 2018 11:17:40 -0600
+Subject: dlm: fix missing idr_destroy for recover_idr
+
+From: David Teigland <teigland@redhat.com>
+
+[ Upstream commit 8fc6ed9a3508a0435b9270c313600799d210d319 ]
+
+Which would leak memory for the idr internals.
+
+Signed-off-by: David Teigland <teigland@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/dlm/lockspace.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
+index 30e4e01db35a3..b14bb2c460426 100644
+--- a/fs/dlm/lockspace.c
++++ b/fs/dlm/lockspace.c
+@@ -800,6 +800,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
+       dlm_delete_debug_file(ls);
++      idr_destroy(&ls->ls_recover_idr);
+       kfree(ls->ls_recover_buf);
+       /*
+-- 
+2.20.1
+
diff --git a/queue-4.9/dlm-null-check-before-kmem_cache_destroy-is-not-need.patch b/queue-4.9/dlm-null-check-before-kmem_cache_destroy-is-not-need.patch
new file mode 100644 (file)
index 0000000..f49aa0b
--- /dev/null
@@ -0,0 +1,49 @@
+From f5e0abd442eaeddad3d913f185598bbd8140209f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Nov 2018 15:25:00 +0800
+Subject: dlm: NULL check before kmem_cache_destroy is not needed
+
+From: Wen Yang <wen.yang99@zte.com.cn>
+
+[ Upstream commit f31a89692830061bceba8469607e4e4b0f900159 ]
+
+kmem_cache_destroy(NULL) is safe, so removes NULL check before
+freeing the mem. This patch also fix ifnullfree.cocci warnings.
+
+Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
+Signed-off-by: David Teigland <teigland@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/dlm/memory.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c
+index 7cd24bccd4fe5..37be29f21d04d 100644
+--- a/fs/dlm/memory.c
++++ b/fs/dlm/memory.c
+@@ -38,10 +38,8 @@ int __init dlm_memory_init(void)
+ void dlm_memory_exit(void)
+ {
+-      if (lkb_cache)
+-              kmem_cache_destroy(lkb_cache);
+-      if (rsb_cache)
+-              kmem_cache_destroy(rsb_cache);
++      kmem_cache_destroy(lkb_cache);
++      kmem_cache_destroy(rsb_cache);
+ }
+ char *dlm_allocate_lvb(struct dlm_ls *ls)
+@@ -86,8 +84,7 @@ void dlm_free_lkb(struct dlm_lkb *lkb)
+               struct dlm_user_args *ua;
+               ua = lkb->lkb_ua;
+               if (ua) {
+-                      if (ua->lksb.sb_lvbptr)
+-                              kfree(ua->lksb.sb_lvbptr);
++                      kfree(ua->lksb.sb_lvbptr);
+                       kfree(ua);
+               }
+       }
+-- 
+2.20.1
+
diff --git a/queue-4.9/dma-mapping-fix-return-type-of-dma_set_max_seg_size.patch b/queue-4.9/dma-mapping-fix-return-type-of-dma_set_max_seg_size.patch
new file mode 100644 (file)
index 0000000..93de05c
--- /dev/null
@@ -0,0 +1,41 @@
+From 1c1ee4cf72ab195456d7740b068d568e7a64d67d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 29 Aug 2018 23:29:21 +0200
+Subject: dma-mapping: fix return type of dma_set_max_seg_size()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
+
+[ Upstream commit c9d76d0655c06b8c1f944e46c4fd9e9cf4b331c0 ]
+
+The function dma_set_max_seg_size() can return either 0 on success or
+-EIO on error. Change its return type from unsigned int to int to
+capture this.
+
+Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
+Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/dma-mapping.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
+index 704caae69c427..97f817f4eb784 100644
+--- a/include/linux/dma-mapping.h
++++ b/include/linux/dma-mapping.h
+@@ -618,8 +618,7 @@ static inline unsigned int dma_get_max_seg_size(struct device *dev)
+       return SZ_64K;
+ }
+-static inline unsigned int dma_set_max_seg_size(struct device *dev,
+-                                              unsigned int size)
++static inline int dma_set_max_seg_size(struct device *dev, unsigned int size)
+ {
+       if (dev->dma_parms) {
+               dev->dma_parms->max_segment_size = size;
+-- 
+2.20.1
+
diff --git a/queue-4.9/dmaengine-coh901318-fix-a-double-lock-bug.patch b/queue-4.9/dmaengine-coh901318-fix-a-double-lock-bug.patch
new file mode 100644 (file)
index 0000000..3e0d976
--- /dev/null
@@ -0,0 +1,51 @@
+From 132cc37b118337397820caa765e3af01060893a2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 6 Nov 2018 11:33:48 +0800
+Subject: dmaengine: coh901318: Fix a double-lock bug
+
+From: Jia-Ju Bai <baijiaju1990@gmail.com>
+
+[ Upstream commit 627469e4445b9b12e0229b3bdf8564d5ce384dd7 ]
+
+The function coh901318_alloc_chan_resources() calls spin_lock_irqsave()
+before calling coh901318_config().
+But coh901318_config() calls spin_lock_irqsave() again in its
+definition, which may cause a double-lock bug.
+
+Because coh901318_config() is only called by
+coh901318_alloc_chan_resources(), the bug fix is to remove the
+calls to spin-lock and -unlock functions in coh901318_config().
+
+Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
+Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/coh901318.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c
+index 74794c9859f60..a8886abf0c75c 100644
+--- a/drivers/dma/coh901318.c
++++ b/drivers/dma/coh901318.c
+@@ -1802,8 +1802,6 @@ static int coh901318_config(struct coh901318_chan *cohc,
+       int channel = cohc->id;
+       void __iomem *virtbase = cohc->base->virtbase;
+-      spin_lock_irqsave(&cohc->lock, flags);
+-
+       if (param)
+               p = param;
+       else
+@@ -1823,8 +1821,6 @@ static int coh901318_config(struct coh901318_chan *cohc,
+       coh901318_set_conf(cohc, p->config);
+       coh901318_set_ctrl(cohc, p->ctrl_lli_last);
+-      spin_unlock_irqrestore(&cohc->lock, flags);
+-
+       return 0;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/dmaengine-xilinx_dma-fix-64-bit-simple-cdma-transfer.patch b/queue-4.9/dmaengine-xilinx_dma-fix-64-bit-simple-cdma-transfer.patch
new file mode 100644 (file)
index 0000000..eddeb07
--- /dev/null
@@ -0,0 +1,42 @@
+From becb6b622da23aeca6a97ad747c0ecc0ed06a917 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 29 Sep 2018 11:18:00 -0600
+Subject: dmaengine: xilinx_dma: Fix 64-bit simple CDMA transfer
+
+From: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
+
+[ Upstream commit 0e03aca2659ef7a85eaff1a1ca9b0b498002ede8 ]
+
+In AXI CDMA simple mode also pass MSB bits of source and destination
+address to xilinx_write function. This fixes simple CDMA operation
+mode using 64-bit addressing.
+
+Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
+Signed-off-by: Michal Simek <michal.simek@xilinx.com>
+Reviewed-by: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com>
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
+index cd271f7826051..381df46246dac 100644
+--- a/drivers/dma/xilinx/xilinx_dma.c
++++ b/drivers/dma/xilinx/xilinx_dma.c
+@@ -1174,8 +1174,10 @@ static void xilinx_cdma_start_transfer(struct xilinx_dma_chan *chan)
+               hw = &segment->hw;
+-              xilinx_write(chan, XILINX_CDMA_REG_SRCADDR, hw->src_addr);
+-              xilinx_write(chan, XILINX_CDMA_REG_DSTADDR, hw->dest_addr);
++              xilinx_write(chan, XILINX_CDMA_REG_SRCADDR,
++                           xilinx_prep_dma_addr_t(hw->src_addr));
++              xilinx_write(chan, XILINX_CDMA_REG_DSTADDR,
++                           xilinx_prep_dma_addr_t(hw->dest_addr));
+               /* Start the transfer */
+               dma_ctrl_write(chan, XILINX_DMA_REG_BTT,
+-- 
+2.20.1
+
diff --git a/queue-4.9/exportfs_decode_fh-negative-pinned-may-become-positi.patch b/queue-4.9/exportfs_decode_fh-negative-pinned-may-become-positi.patch
new file mode 100644 (file)
index 0000000..f897817
--- /dev/null
@@ -0,0 +1,69 @@
+From 64bf52292e00ebb7a6cd95a6e8265e5d6a21d9ae Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 8 Nov 2019 22:08:29 -0500
+Subject: exportfs_decode_fh(): negative pinned may become positive without the
+ parent locked
+
+From: Al Viro <viro@zeniv.linux.org.uk>
+
+[ Upstream commit a2ece088882666e1dc7113744ac912eb161e3f87 ]
+
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/exportfs/expfs.c | 31 +++++++++++++++++++------------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
+index 7a7bba7c23284..3706939e5dd5e 100644
+--- a/fs/exportfs/expfs.c
++++ b/fs/exportfs/expfs.c
+@@ -506,26 +506,33 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
+                * inode is actually connected to the parent.
+                */
+               err = exportfs_get_name(mnt, target_dir, nbuf, result);
+-              if (!err) {
+-                      inode_lock(target_dir->d_inode);
+-                      nresult = lookup_one_len(nbuf, target_dir,
+-                                               strlen(nbuf));
+-                      inode_unlock(target_dir->d_inode);
+-                      if (!IS_ERR(nresult)) {
+-                              if (nresult->d_inode) {
+-                                      dput(result);
+-                                      result = nresult;
+-                              } else
+-                                      dput(nresult);
+-                      }
++              if (err) {
++                      dput(target_dir);
++                      goto err_result;
+               }
++              inode_lock(target_dir->d_inode);
++              nresult = lookup_one_len(nbuf, target_dir, strlen(nbuf));
++              if (!IS_ERR(nresult)) {
++                      if (unlikely(nresult->d_inode != result->d_inode)) {
++                              dput(nresult);
++                              nresult = ERR_PTR(-ESTALE);
++                      }
++              }
++              inode_unlock(target_dir->d_inode);
+               /*
+                * At this point we are done with the parent, but it's pinned
+                * by the child dentry anyway.
+                */
+               dput(target_dir);
++              if (IS_ERR(nresult)) {
++                      err = PTR_ERR(nresult);
++                      goto err_result;
++              }
++              dput(result);
++              result = nresult;
++
+               /*
+                * And finally make sure the dentry is actually acceptable
+                * to NFSD.
+-- 
+2.20.1
+
diff --git a/queue-4.9/extcon-max8997-fix-lack-of-path-setting-in-usb-devic.patch b/queue-4.9/extcon-max8997-fix-lack-of-path-setting-in-usb-devic.patch
new file mode 100644 (file)
index 0000000..dad9886
--- /dev/null
@@ -0,0 +1,49 @@
+From 1df04bc64314780aed73454ac4898b6fcd8f95cd Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 13 Nov 2018 16:38:47 +0100
+Subject: extcon: max8997: Fix lack of path setting in USB device mode
+
+From: Marek Szyprowski <m.szyprowski@samsung.com>
+
+[ Upstream commit a2dc50914744eea9f83a70a5db0486be625e5dc0 ]
+
+MAX8997 driver disables automatic path selection from MicroUSB connector
+and manually sets path to either UART or USB lines. However the code for
+setting USB path worked only for USB host mode (when ID pin is set
+to ground). When standard USB cable (USB device mode) is connected, path
+registers are not touched. This means that once the non-USB accessory is
+connected to MAX8997-operated micro USB port, the path is no longer set
+to USB and USB device mode doesn't work. This patch fixes it by setting
+USB path both for USB and USB host modes.
+
+Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
+Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/extcon/extcon-max8997.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
+index 4a0612fb9c070..b9b48d45a6dc4 100644
+--- a/drivers/extcon/extcon-max8997.c
++++ b/drivers/extcon/extcon-max8997.c
+@@ -321,12 +321,10 @@ static int max8997_muic_handle_usb(struct max8997_muic_info *info,
+ {
+       int ret = 0;
+-      if (usb_type == MAX8997_USB_HOST) {
+-              ret = max8997_muic_set_path(info, info->path_usb, attached);
+-              if (ret < 0) {
+-                      dev_err(info->dev, "failed to update muic register\n");
+-                      return ret;
+-              }
++      ret = max8997_muic_set_path(info, info->path_usb, attached);
++      if (ret < 0) {
++              dev_err(info->dev, "failed to update muic register\n");
++              return ret;
+       }
+       switch (usb_type) {
+-- 
+2.20.1
+
diff --git a/queue-4.9/i2c-imx-don-t-print-error-message-on-probe-defer.patch b/queue-4.9/i2c-imx-don-t-print-error-message-on-probe-defer.patch
new file mode 100644 (file)
index 0000000..1efba02
--- /dev/null
@@ -0,0 +1,40 @@
+From ecea9b81a1f80f23ee8c53961e030f1066e754cf Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Nov 2018 18:29:13 +0100
+Subject: i2c: imx: don't print error message on probe defer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Lucas Stach <l.stach@pengutronix.de>
+
+[ Upstream commit fece4978510e43f09c8cd386fee15210e8c68493 ]
+
+Probe deferral is a normal operating condition in the probe function,
+so don't spam the log with an error in this case.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-imx.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
+index c4188308cefae..9c1be9378dfde 100644
+--- a/drivers/i2c/busses/i2c-imx.c
++++ b/drivers/i2c/busses/i2c-imx.c
+@@ -1088,7 +1088,8 @@ static int i2c_imx_probe(struct platform_device *pdev)
+       /* Get I2C clock */
+       i2c_imx->clk = devm_clk_get(&pdev->dev, NULL);
+       if (IS_ERR(i2c_imx->clk)) {
+-              dev_err(&pdev->dev, "can't get I2C clock\n");
++              if (PTR_ERR(i2c_imx->clk) != -EPROBE_DEFER)
++                      dev_err(&pdev->dev, "can't get I2C clock\n");
+               return PTR_ERR(i2c_imx->clk);
+       }
+-- 
+2.20.1
+
diff --git a/queue-4.9/input-cyttsp4_core-fix-use-after-free-bug.patch b/queue-4.9/input-cyttsp4_core-fix-use-after-free-bug.patch
new file mode 100644 (file)
index 0000000..40f843e
--- /dev/null
@@ -0,0 +1,51 @@
+From cdc4e32d7a526b64c1b25cbffa253c5b24cf9184 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 12 Nov 2019 17:04:54 -0800
+Subject: Input: cyttsp4_core - fix use after free bug
+
+From: Pan Bian <bianpan2016@163.com>
+
+[ Upstream commit 79aae6acbef16f720a7949f8fc6ac69816c79d62 ]
+
+The device md->input is used after it is released. Setting the device
+data to NULL is unnecessary as the device is never used again. Instead,
+md->input should be assigned NULL to avoid accessing the freed memory
+accidently. Besides, checking md->si against NULL is superfluous as it
+points to a variable address, which cannot be NULL.
+
+Signed-off-by: Pan Bian <bianpan2016@163.com>
+Link: https://lore.kernel.org/r/1572936379-6423-1-git-send-email-bianpan2016@163.com
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/input/touchscreen/cyttsp4_core.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/drivers/input/touchscreen/cyttsp4_core.c b/drivers/input/touchscreen/cyttsp4_core.c
+index 44deca88c5797..c1c29d7487bf3 100644
+--- a/drivers/input/touchscreen/cyttsp4_core.c
++++ b/drivers/input/touchscreen/cyttsp4_core.c
+@@ -1972,11 +1972,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
+       /* get sysinfo */
+       md->si = &cd->sysinfo;
+-      if (!md->si) {
+-              dev_err(dev, "%s: Fail get sysinfo pointer from core p=%p\n",
+-                      __func__, md->si);
+-              goto error_get_sysinfo;
+-      }
+       rc = cyttsp4_setup_input_device(cd);
+       if (rc)
+@@ -1986,8 +1981,6 @@ static int cyttsp4_mt_probe(struct cyttsp4 *cd)
+ error_init_input:
+       input_free_device(md->input);
+-error_get_sysinfo:
+-      input_set_drvdata(md->input, NULL);
+ error_alloc_failed:
+       dev_err(dev, "%s failed.\n", __func__);
+       return rc;
+-- 
+2.20.1
+
diff --git a/queue-4.9/iw_cxgb4-only-reconnect-with-mpav1-if-the-peer-abort.patch b/queue-4.9/iw_cxgb4-only-reconnect-with-mpav1-if-the-peer-abort.patch
new file mode 100644 (file)
index 0000000..856a103
--- /dev/null
@@ -0,0 +1,39 @@
+From b2b0c34036171c5e113ae18b89055f5fb628b19f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 10 Nov 2018 05:27:39 -0800
+Subject: iw_cxgb4: only reconnect with MPAv1 if the peer aborts
+
+From: Steve Wise <swise@opengridcomputing.com>
+
+[ Upstream commit 9828ca654b52848e7eb7dcc9b0994ff130dd4546 ]
+
+Only retry connection setup with MPAv1 if the peer actually aborted the
+connection upon receiving the MPAv2 start message.  This avoids retrying
+with MPAv1 in the case where the connection was aborted due to retransmit
+timeouts.
+
+Fixes: d2fe99e86bb2 ("RDMA/cxgb4: Add support for MPAv2 Enhanced RDMA Negotiation")
+Signed-off-by: Steve Wise <swise@opengridcomputing.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/cxgb4/cm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
+index 605d50ad123cc..49a21e6aaabcc 100644
+--- a/drivers/infiniband/hw/cxgb4/cm.c
++++ b/drivers/infiniband/hw/cxgb4/cm.c
+@@ -2756,7 +2756,8 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
+               break;
+       case MPA_REQ_SENT:
+               (void)stop_ep_timer(ep);
+-              if (mpa_rev == 1 || (mpa_rev == 2 && ep->tried_with_mpa_v1))
++              if (status != CPL_ERR_CONN_RESET || mpa_rev == 1 ||
++                  (mpa_rev == 2 && ep->tried_with_mpa_v1))
+                       connect_reply_upcall(ep, -ECONNRESET);
+               else {
+                       /*
+-- 
+2.20.1
+
diff --git a/queue-4.9/iwlwifi-mvm-send-non-offchannel-traffic-via-ap-sta.patch b/queue-4.9/iwlwifi-mvm-send-non-offchannel-traffic-via-ap-sta.patch
new file mode 100644 (file)
index 0000000..63e54c1
--- /dev/null
@@ -0,0 +1,51 @@
+From 9d1dbf1e7c42745a1f250ebc5ce304a1e616c14c Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 24 Jul 2018 21:57:50 +0300
+Subject: iwlwifi: mvm: Send non offchannel traffic via AP sta
+
+From: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
+
+[ Upstream commit dc1aca22f8f38b7e2ad7b118db87404d11e68771 ]
+
+TDLS discovery response frame is a unicast direct frame to the peer.
+Since we don't have a STA for this peer, this frame goes through
+iwl_tx_skb_non_sta(). As the result aux_sta and some completely
+arbitrary queue would be selected for this frame, resulting in a queue
+hang.  Fix that by sending such frames through AP sta instead.
+
+Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+index 92557cd31a397..d91ab2b8d6671 100644
+--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
++++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+@@ -805,6 +805,21 @@ static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
+                    !ieee80211_is_action(hdr->frame_control)))
+               sta = NULL;
++      /* If there is no sta, and it's not offchannel - send through AP */
++      if (info->control.vif->type == NL80211_IFTYPE_STATION &&
++          info->hw_queue != IWL_MVM_OFFCHANNEL_QUEUE && !sta) {
++              struct iwl_mvm_vif *mvmvif =
++                      iwl_mvm_vif_from_mac80211(info->control.vif);
++              u8 ap_sta_id = READ_ONCE(mvmvif->ap_sta_id);
++
++              if (ap_sta_id < IWL_MVM_STATION_COUNT) {
++                      /* mac80211 holds rcu read lock */
++                      sta = rcu_dereference(mvm->fw_id_to_mac_id[ap_sta_id]);
++                      if (IS_ERR_OR_NULL(sta))
++                              goto drop;
++              }
++      }
++
+       if (sta) {
+               if (iwl_mvm_defer_tx(mvm, sta, skb))
+                       return;
+-- 
+2.20.1
+
diff --git a/queue-4.9/kbuild-fix-single-target-build-for-external-module.patch b/queue-4.9/kbuild-fix-single-target-build-for-external-module.patch
new file mode 100644 (file)
index 0000000..69de936
--- /dev/null
@@ -0,0 +1,85 @@
+From 7a994fb1b99ce2223f3d80ed4c64537a83e6168a Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 22 Nov 2018 08:11:54 +0900
+Subject: kbuild: fix single target build for external module
+
+From: Masahiro Yamada <yamada.masahiro@socionext.com>
+
+[ Upstream commit e07db28eea38ed4e332b3a89f3995c86b713cb5b ]
+
+Building a single target in an external module fails due to missing
+.tmp_versions directory.
+
+For example,
+
+  $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o
+
+will fail in the following way:
+
+  CC [M]  /home/masahiro/foo/foo.o
+/bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent
+
+This is because $(cmd_crmodverdir) is executed only before building
+/, %/, %.ko single targets of external modules. Create .tmp_versions
+in the 'prepare' target.
+
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Makefile | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 55a91bc3d8f9c..6baf1e6324255 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1521,9 +1521,6 @@ else # KBUILD_EXTMOD
+ # We are always building modules
+ KBUILD_MODULES := 1
+-PHONY += crmodverdir
+-crmodverdir:
+-      $(cmd_crmodverdir)
+ PHONY += $(objtree)/Module.symvers
+ $(objtree)/Module.symvers:
+@@ -1535,7 +1532,7 @@ $(objtree)/Module.symvers:
+ module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
+ PHONY += $(module-dirs) modules
+-$(module-dirs): crmodverdir $(objtree)/Module.symvers
++$(module-dirs): prepare $(objtree)/Module.symvers
+       $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
+ modules: $(module-dirs)
+@@ -1576,7 +1573,8 @@ help:
+ # Dummies...
+ PHONY += prepare scripts
+-prepare: ;
++prepare:
++      $(cmd_crmodverdir)
+ scripts: ;
+ endif # KBUILD_EXTMOD
+@@ -1701,17 +1699,14 @@ endif
+ # Modules
+ /: prepare scripts FORCE
+-      $(cmd_crmodverdir)
+       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+       $(build)=$(build-dir)
+ # Make sure the latest headers are built for Documentation
+ Documentation/ samples/: headers_install
+ %/: prepare scripts FORCE
+-      $(cmd_crmodverdir)
+       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
+       $(build)=$(build-dir)
+ %.ko: prepare scripts FORCE
+-      $(cmd_crmodverdir)
+       $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1)   \
+       $(build)=$(build-dir) $(@:.ko=.o)
+       $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
+-- 
+2.20.1
+
diff --git a/queue-4.9/lockd-fix-decoding-of-test-results.patch b/queue-4.9/lockd-fix-decoding-of-test-results.patch
new file mode 100644 (file)
index 0000000..ce43de6
--- /dev/null
@@ -0,0 +1,98 @@
+From 4873f938c9da1e72e69a7b6f4351597de9631af7 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 26 Nov 2018 11:36:52 -0500
+Subject: lockd: fix decoding of TEST results
+
+From: J. Bruce Fields <bfields@redhat.com>
+
+[ Upstream commit b8db159239b3f51e2b909859935cc25cb3ff3eed ]
+
+We fail to advance the read pointer when reading the stat.oh field that
+identifies the lock-holder in a TEST result.
+
+This turns out not to matter if the server is knfsd, which always
+returns a zero-length field.  But other servers (Ganesha is an example)
+may not do this.  The result is bad values in fcntl F_GETLK results.
+
+Fix this.
+
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/lockd/clnt4xdr.c | 22 ++++++----------------
+ fs/lockd/clntxdr.c  | 22 ++++++----------------
+ 2 files changed, 12 insertions(+), 32 deletions(-)
+
+diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
+index d3e40db289302..4fdf8dae0db28 100644
+--- a/fs/lockd/clnt4xdr.c
++++ b/fs/lockd/clnt4xdr.c
+@@ -127,24 +127,14 @@ static void encode_netobj(struct xdr_stream *xdr,
+ static int decode_netobj(struct xdr_stream *xdr,
+                        struct xdr_netobj *obj)
+ {
+-      u32 length;
+-      __be32 *p;
++      ssize_t ret;
+-      p = xdr_inline_decode(xdr, 4);
+-      if (unlikely(p == NULL))
+-              goto out_overflow;
+-      length = be32_to_cpup(p++);
+-      if (unlikely(length > XDR_MAX_NETOBJ))
+-              goto out_size;
+-      obj->len = length;
+-      obj->data = (u8 *)p;
++      ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data,
++                                              XDR_MAX_NETOBJ);
++      if (unlikely(ret < 0))
++              return -EIO;
++      obj->len = ret;
+       return 0;
+-out_size:
+-      dprintk("NFS: returned netobj was too long: %u\n", length);
+-      return -EIO;
+-out_overflow:
+-      print_overflow_msg(__func__, xdr);
+-      return -EIO;
+ }
+ /*
+diff --git a/fs/lockd/clntxdr.c b/fs/lockd/clntxdr.c
+index 3e9f7874b9755..29392d66473c8 100644
+--- a/fs/lockd/clntxdr.c
++++ b/fs/lockd/clntxdr.c
+@@ -124,24 +124,14 @@ static void encode_netobj(struct xdr_stream *xdr,
+ static int decode_netobj(struct xdr_stream *xdr,
+                        struct xdr_netobj *obj)
+ {
+-      u32 length;
+-      __be32 *p;
++      ssize_t ret;
+-      p = xdr_inline_decode(xdr, 4);
+-      if (unlikely(p == NULL))
+-              goto out_overflow;
+-      length = be32_to_cpup(p++);
+-      if (unlikely(length > XDR_MAX_NETOBJ))
+-              goto out_size;
+-      obj->len = length;
+-      obj->data = (u8 *)p;
++      ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data,
++                      XDR_MAX_NETOBJ);
++      if (unlikely(ret < 0))
++              return -EIO;
++      obj->len = ret;
+       return 0;
+-out_size:
+-      dprintk("NFS: returned netobj was too long: %u\n", length);
+-      return -EIO;
+-out_overflow:
+-      print_overflow_msg(__func__, xdr);
+-      return -EIO;
+ }
+ /*
+-- 
+2.20.1
+
diff --git a/queue-4.9/math-emu-soft-fp.h-_fp_round_zero-cast-0-to-void-to-.patch b/queue-4.9/math-emu-soft-fp.h-_fp_round_zero-cast-0-to-void-to-.patch
new file mode 100644 (file)
index 0000000..03bc005
--- /dev/null
@@ -0,0 +1,41 @@
+From b5d8d24db21ac3e919cd8802d7f4ddbbc2d83bd4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 22 Nov 2018 11:14:38 +0800
+Subject: math-emu/soft-fp.h: (_FP_ROUND_ZERO) cast 0 to void to fix warning
+
+From: Vincent Chen <vincentc@andestech.com>
+
+[ Upstream commit 83312f1b7ae205dca647bf52bbe2d51303cdedfb ]
+
+_FP_ROUND_ZERO is defined as 0 and used as a statemente in macro
+_FP_ROUND. This generates "error: statement with no effect
+[-Werror=unused-value]" from gcc. Defining _FP_ROUND_ZERO as (void)0 to
+fix it.
+
+This modification is quoted from glibc 'commit <In libc/:>
+(8ed1e7d5894000c155acbd06f)'
+
+Signed-off-by: Vincent Chen <vincentc@andestech.com>
+Acked-by: Greentime Hu <greentime@andestech.com>
+Signed-off-by: Greentime Hu <greentime@andestech.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/math-emu/soft-fp.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/math-emu/soft-fp.h b/include/math-emu/soft-fp.h
+index 3f284bc031809..5650c16283830 100644
+--- a/include/math-emu/soft-fp.h
++++ b/include/math-emu/soft-fp.h
+@@ -138,7 +138,7 @@ do {                                                       \
+       _FP_FRAC_ADDI_##wc(X, _FP_WORK_ROUND);          \
+ } while (0)
+-#define _FP_ROUND_ZERO(wc, X)         0
++#define _FP_ROUND_ZERO(wc, X)         (void)0
+ #define _FP_ROUND_PINF(wc, X)                         \
+ do {                                                  \
+-- 
+2.20.1
+
diff --git a/queue-4.9/media-coda-fix-memory-corruption-in-case-more-than-3.patch b/queue-4.9/media-coda-fix-memory-corruption-in-case-more-than-3.patch
new file mode 100644 (file)
index 0000000..21402dd
--- /dev/null
@@ -0,0 +1,140 @@
+From 4ccb690023f79116e9f42ddbf66d28dcaebd1de1 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 6 Nov 2018 05:40:54 -0500
+Subject: media: coda: fix memory corruption in case more than 32 instances are
+ opened
+
+From: Philipp Zabel <p.zabel@pengutronix.de>
+
+[ Upstream commit 649cfc2bdfeeb98ff7d8fdff0af3f8fb9c8da50f ]
+
+The ffz() return value is undefined if the instance mask does not
+contain any zeros. If it returned 32, the following set_bit would
+corrupt the debugfs_root pointer.
+Switch to IDA for context index allocation. This also removes the
+artificial 32 instance limit for all except CodaDx6.
+
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Signed-off-by: Hans Verkuil <hansverk@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/media/platform/coda/coda-common.c | 26 +++++++++--------------
+ drivers/media/platform/coda/coda.h        |  3 ++-
+ 2 files changed, 12 insertions(+), 17 deletions(-)
+
+diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
+index c39718a63e5ed..60396d404606c 100644
+--- a/drivers/media/platform/coda/coda-common.c
++++ b/drivers/media/platform/coda/coda-common.c
+@@ -17,6 +17,7 @@
+ #include <linux/firmware.h>
+ #include <linux/gcd.h>
+ #include <linux/genalloc.h>
++#include <linux/idr.h>
+ #include <linux/interrupt.h>
+ #include <linux/io.h>
+ #include <linux/irq.h>
+@@ -1641,17 +1642,6 @@ int coda_decoder_queue_init(void *priv, struct vb2_queue *src_vq,
+       return coda_queue_init(priv, dst_vq);
+ }
+-static int coda_next_free_instance(struct coda_dev *dev)
+-{
+-      int idx = ffz(dev->instance_mask);
+-
+-      if ((idx < 0) ||
+-          (dev->devtype->product == CODA_DX6 && idx > CODADX6_MAX_INSTANCES))
+-              return -EBUSY;
+-
+-      return idx;
+-}
+-
+ /*
+  * File operations
+  */
+@@ -1660,7 +1650,8 @@ static int coda_open(struct file *file)
+ {
+       struct video_device *vdev = video_devdata(file);
+       struct coda_dev *dev = video_get_drvdata(vdev);
+-      struct coda_ctx *ctx = NULL;
++      struct coda_ctx *ctx;
++      unsigned int max = ~0;
+       char *name;
+       int ret;
+       int idx;
+@@ -1669,12 +1660,13 @@ static int coda_open(struct file *file)
+       if (!ctx)
+               return -ENOMEM;
+-      idx = coda_next_free_instance(dev);
++      if (dev->devtype->product == CODA_DX6)
++              max = CODADX6_MAX_INSTANCES - 1;
++      idx = ida_alloc_max(&dev->ida, max, GFP_KERNEL);
+       if (idx < 0) {
+               ret = idx;
+               goto err_coda_max;
+       }
+-      set_bit(idx, &dev->instance_mask);
+       name = kasprintf(GFP_KERNEL, "context%d", idx);
+       if (!name) {
+@@ -1768,8 +1760,8 @@ err_clk_per:
+ err_pm_get:
+       v4l2_fh_del(&ctx->fh);
+       v4l2_fh_exit(&ctx->fh);
+-      clear_bit(ctx->idx, &dev->instance_mask);
+ err_coda_name_init:
++      ida_free(&dev->ida, ctx->idx);
+ err_coda_max:
+       kfree(ctx);
+       return ret;
+@@ -1808,7 +1800,7 @@ static int coda_release(struct file *file)
+       pm_runtime_put_sync(&dev->plat_dev->dev);
+       v4l2_fh_del(&ctx->fh);
+       v4l2_fh_exit(&ctx->fh);
+-      clear_bit(ctx->idx, &dev->instance_mask);
++      ida_free(&dev->ida, ctx->idx);
+       if (ctx->ops->release)
+               ctx->ops->release(ctx);
+       debugfs_remove_recursive(ctx->debugfs_entry);
+@@ -2241,6 +2233,7 @@ static int coda_probe(struct platform_device *pdev)
+       mutex_init(&dev->dev_mutex);
+       mutex_init(&dev->coda_mutex);
++      ida_init(&dev->ida);
+       dev->debugfs_root = debugfs_create_dir("coda", NULL);
+       if (!dev->debugfs_root)
+@@ -2323,6 +2316,7 @@ static int coda_remove(struct platform_device *pdev)
+       coda_free_aux_buf(dev, &dev->tempbuf);
+       coda_free_aux_buf(dev, &dev->workbuf);
+       debugfs_remove_recursive(dev->debugfs_root);
++      ida_destroy(&dev->ida);
+       return 0;
+ }
+diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
+index 53f96661683c6..30dd0e8623947 100644
+--- a/drivers/media/platform/coda/coda.h
++++ b/drivers/media/platform/coda/coda.h
+@@ -16,6 +16,7 @@
+ #define __CODA_H__
+ #include <linux/debugfs.h>
++#include <linux/idr.h>
+ #include <linux/irqreturn.h>
+ #include <linux/mutex.h>
+ #include <linux/kfifo.h>
+@@ -93,7 +94,7 @@ struct coda_dev {
+       struct workqueue_struct *workqueue;
+       struct v4l2_m2m_dev     *m2m_dev;
+       struct list_head        instances;
+-      unsigned long           instance_mask;
++      struct ida              ida;
+       struct dentry           *debugfs_root;
+ };
+-- 
+2.20.1
+
diff --git a/queue-4.9/media-pulse8-cec-return-0-when-invalidating-the-logi.patch b/queue-4.9/media-pulse8-cec-return-0-when-invalidating-the-logi.patch
new file mode 100644 (file)
index 0000000..9368c32
--- /dev/null
@@ -0,0 +1,37 @@
+From 2370919109102e8dec139e23c0ca3fceb38dee87 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Nov 2018 08:25:53 -0500
+Subject: media: pulse8-cec: return 0 when invalidating the logical address
+
+From: Hans Verkuil <hverkuil@xs4all.nl>
+
+[ Upstream commit 2e84eb9affac43eeaf834992888b72426a8cd442 ]
+
+Return 0 when invalidating the logical address. The cec core produces
+a warning for drivers that do this.
+
+Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
+Reported-by: Torbjorn Jansson <torbjorn.jansson@mbox200.swipnet.se>
+Signed-off-by: Hans Verkuil <hansverk@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/staging/media/pulse8-cec/pulse8-cec.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/drivers/staging/media/pulse8-cec/pulse8-cec.c
+index 1732c3857b8ea..2785cc03c5298 100644
+--- a/drivers/staging/media/pulse8-cec/pulse8-cec.c
++++ b/drivers/staging/media/pulse8-cec/pulse8-cec.c
+@@ -580,7 +580,7 @@ unlock:
+       else
+               pulse8->config_pending = true;
+       mutex_unlock(&pulse8->config_lock);
+-      return err;
++      return log_addr == CEC_LOG_ADDR_INVALID ? 0 : err;
+ }
+ static int pulse8_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
+-- 
+2.20.1
+
diff --git a/queue-4.9/media-stkwebcam-bugfix-for-wrong-return-values.patch b/queue-4.9/media-stkwebcam-bugfix-for-wrong-return-values.patch
new file mode 100644 (file)
index 0000000..923281a
--- /dev/null
@@ -0,0 +1,42 @@
+From 8dce03b282b1d0828c8b00fab79dc4a2ce17c526 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 23 Nov 2018 11:14:54 -0500
+Subject: media: stkwebcam: Bugfix for wrong return values
+
+From: Andreas Pape <ap@ca-pape.de>
+
+[ Upstream commit 3c28b91380dd1183347d32d87d820818031ebecf ]
+
+usb_control_msg returns in case of a successfully sent message the number
+of sent bytes as a positive number. Don't use this value as a return value
+for stk_camera_read_reg, as a non-zero return value is used as an error
+condition in some cases when stk_camera_read_reg is called.
+
+Signed-off-by: Andreas Pape <ap@ca-pape.de>
+Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/media/usb/stkwebcam/stk-webcam.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
+index 7297fd261df94..f9844f87467b4 100644
+--- a/drivers/media/usb/stkwebcam/stk-webcam.c
++++ b/drivers/media/usb/stkwebcam/stk-webcam.c
+@@ -166,7 +166,11 @@ int stk_camera_read_reg(struct stk_camera *dev, u16 index, u8 *value)
+               *value = *buf;
+       kfree(buf);
+-      return ret;
++
++      if (ret < 0)
++              return ret;
++      else
++              return 0;
+ }
+ static int stk_start_stream(struct stk_camera *dev)
+-- 
+2.20.1
+
diff --git a/queue-4.9/mips-octeon-cvmx_pko_mem_debug8-use-oldest-forward-c.patch b/queue-4.9/mips-octeon-cvmx_pko_mem_debug8-use-oldest-forward-c.patch
new file mode 100644 (file)
index 0000000..aaa5706
--- /dev/null
@@ -0,0 +1,53 @@
+From 8235740d370ead159c411f08cd7d91034c283414 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 4 Dec 2018 22:12:17 +0200
+Subject: MIPS: OCTEON: cvmx_pko_mem_debug8: use oldest forward compatible
+ definition
+
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+
+[ Upstream commit 1c6121c39677175bd372076020948e184bad4b6b ]
+
+cn58xx is compatible with cn50xx, so use the latter.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
+[paul.burton@mips.com: s/cn52xx/cn50xx/ in commit message.]
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: James Hogan <jhogan@kernel.org>
+Cc: linux-mips@vger.kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c | 2 +-
+ arch/mips/include/asm/octeon/cvmx-pko.h            | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
+index 8241fc6aa17d8..3839feba68f20 100644
+--- a/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
++++ b/arch/mips/cavium-octeon/executive/cvmx-cmd-queue.c
+@@ -266,7 +266,7 @@ int cvmx_cmd_queue_length(cvmx_cmd_queue_id_t queue_id)
+               } else {
+                       union cvmx_pko_mem_debug8 debug8;
+                       debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
+-                      return debug8.cn58xx.doorbell;
++                      return debug8.cn50xx.doorbell;
+               }
+       case CVMX_CMD_QUEUE_ZIP:
+       case CVMX_CMD_QUEUE_DFA:
+diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/asm/octeon/cvmx-pko.h
+index 5f47f76ed510a..20eb9c46a75ab 100644
+--- a/arch/mips/include/asm/octeon/cvmx-pko.h
++++ b/arch/mips/include/asm/octeon/cvmx-pko.h
+@@ -611,7 +611,7 @@ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t clear,
+               pko_reg_read_idx.s.index = cvmx_pko_get_base_queue(port_num);
+               cvmx_write_csr(CVMX_PKO_REG_READ_IDX, pko_reg_read_idx.u64);
+               debug8.u64 = cvmx_read_csr(CVMX_PKO_MEM_DEBUG8);
+-              status->doorbell = debug8.cn58xx.doorbell;
++              status->doorbell = debug8.cn50xx.doorbell;
+       }
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/mips-octeon-octeon-platform-fix-typing.patch b/queue-4.9/mips-octeon-octeon-platform-fix-typing.patch
new file mode 100644 (file)
index 0000000..187a8e2
--- /dev/null
@@ -0,0 +1,38 @@
+From a5367a03b83a0531edfe8bd4c9eca4cb682fa93e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 22 Nov 2018 00:37:29 +0200
+Subject: MIPS: OCTEON: octeon-platform: fix typing
+
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+
+[ Upstream commit 2cf1c8933dd93088cfb5f8f58b3bb9bbdf1781b9 ]
+
+Use correct type for fdt_property nameoff field.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Patchwork: https://patchwork.linux-mips.org/patch/21204/
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: James Hogan <jhogan@kernel.org>
+Cc: linux-mips@linux-mips.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/cavium-octeon/octeon-platform.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
+index 1ba6bcf985702..2ecc8d1b05395 100644
+--- a/arch/mips/cavium-octeon/octeon-platform.c
++++ b/arch/mips/cavium-octeon/octeon-platform.c
+@@ -502,7 +502,7 @@ static void __init octeon_fdt_set_phy(int eth, int phy_addr)
+       if (phy_addr >= 256 && alt_phy > 0) {
+               const struct fdt_property *phy_prop;
+               struct fdt_property *alt_prop;
+-              u32 phy_handle_name;
++              fdt32_t phy_handle_name;
+               /* Use the alt phy node instead.*/
+               phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL);
+-- 
+2.20.1
+
diff --git a/queue-4.9/mips-sibyte-enable-zone_dma32-for-littlesur.patch b/queue-4.9/mips-sibyte-enable-zone_dma32-for-littlesur.patch
new file mode 100644 (file)
index 0000000..dedf5d0
--- /dev/null
@@ -0,0 +1,53 @@
+From 016330cc14cd4494d0b8c2a6b4e3e9b66070b14d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 13 Nov 2018 22:42:37 +0000
+Subject: MIPS: SiByte: Enable ZONE_DMA32 for LittleSur
+
+From: Maciej W. Rozycki <macro@linux-mips.org>
+
+[ Upstream commit 756d6d836dbfb04a5a486bc2ec89397aa4533737 ]
+
+The LittleSur board is marked for high memory support and therefore
+clearly must provide a way to have enough memory installed for some to
+be present outside the low 4GiB physical address range.  With the memory
+map of the BCM1250 SOC it has been built around it means over 1GiB of
+actual DRAM, as only the first 1GiB is mapped in the low 4GiB physical
+address range[1].
+
+Complement commit cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need
+DMA32.") then and also enable ZONE_DMA32 for LittleSur.
+
+References:
+
+[1] "BCM1250/BCM1125/BCM1125H User Manual", Revision 1250_1125-UM100-R,
+    Broadcom Corporation, 21 Oct 2002, Section 3: "System Overview",
+    "Memory Map", pp. 34-38
+
+Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
+Signed-off-by: Paul Burton <paul.burton@mips.com>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Patchwork: https://patchwork.linux-mips.org/patch/21107/
+Fixes: cce335ae47e2 ("[MIPS] 64-bit Sibyte kernels need DMA32.")
+Cc: Ralf Baechle <ralf@linux-mips.org>
+Cc: linux-mips@linux-mips.org
+Cc: linux-kernel@vger.kernel.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/mips/Kconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
+index 92bcde046b6b4..f8a529c852795 100644
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -804,6 +804,7 @@ config SIBYTE_LITTLESUR
+       select SYS_SUPPORTS_BIG_ENDIAN
+       select SYS_SUPPORTS_HIGHMEM
+       select SYS_SUPPORTS_LITTLE_ENDIAN
++      select ZONE_DMA32 if 64BIT
+ config SIBYTE_SENTOSA
+       bool "Sibyte BCM91250E-Sentosa"
+-- 
+2.20.1
+
diff --git a/queue-4.9/mlx4-use-snprintf-instead-of-complicated-strcpy.patch b/queue-4.9/mlx4-use-snprintf-instead-of-complicated-strcpy.patch
new file mode 100644 (file)
index 0000000..0108af8
--- /dev/null
@@ -0,0 +1,53 @@
+From 1410b2ec5b66da8e551ee94410c0ebccc03edc4b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 29 Nov 2018 21:18:07 -0500
+Subject: mlx4: Use snprintf instead of complicated strcpy
+
+From: Qian Cai <cai@gmx.us>
+
+[ Upstream commit 0fbc9b8b4ea3f688a5da141a64f97aa33ad02ae9 ]
+
+This fixes a compilation warning in sysfs.c
+
+drivers/infiniband/hw/mlx4/sysfs.c:360:2: warning: 'strncpy' output may be
+truncated copying 8 bytes from a string of length 31
+[-Wstringop-truncation]
+
+By eliminating the temporary stack buffer.
+
+Signed-off-by: Qian Cai <cai@gmx.us>
+Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/mlx4/sysfs.c | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/infiniband/hw/mlx4/sysfs.c b/drivers/infiniband/hw/mlx4/sysfs.c
+index 69fb5ba94d0f2..19caacd26f61a 100644
+--- a/drivers/infiniband/hw/mlx4/sysfs.c
++++ b/drivers/infiniband/hw/mlx4/sysfs.c
+@@ -352,16 +352,12 @@ err:
+ static void get_name(struct mlx4_ib_dev *dev, char *name, int i, int max)
+ {
+-      char base_name[9];
+-
+-      /* pci_name format is: bus:dev:func -> xxxx:yy:zz.n */
+-      strlcpy(name, pci_name(dev->dev->persist->pdev), max);
+-      strncpy(base_name, name, 8); /*till xxxx:yy:*/
+-      base_name[8] = '\0';
+-      /* with no ARI only 3 last bits are used so when the fn is higher than 8
++      /* pci_name format is: bus:dev:func -> xxxx:yy:zz.n
++       * with no ARI only 3 last bits are used so when the fn is higher than 8
+        * need to add it to the dev num, so count in the last number will be
+        * modulo 8 */
+-      sprintf(name, "%s%.2d.%d", base_name, (i/8), (i%8));
++      snprintf(name, max, "%.8s%.2d.%d", pci_name(dev->dev->persist->pdev),
++               i / 8, i % 8);
+ }
+ struct mlx4_port {
+-- 
+2.20.1
+
diff --git a/queue-4.9/modpost-skip-elf-local-symbols-during-section-mismat.patch b/queue-4.9/modpost-skip-elf-local-symbols-during-section-mismat.patch
new file mode 100644 (file)
index 0000000..d05f7ac
--- /dev/null
@@ -0,0 +1,96 @@
+From b888bda59c0cd5f6bed37a8a737d84dbec3d06da Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 21 Nov 2018 13:14:13 -0800
+Subject: modpost: skip ELF local symbols during section mismatch check
+
+From: Paul Walmsley <paul.walmsley@sifive.com>
+
+[ Upstream commit a4d26f1a0958bb1c2b60c6f1e67c6f5d43e2647b ]
+
+During development of a serial console driver with a gcc 8.2.0
+toolchain for RISC-V, the following modpost warning appeared:
+
+----
+WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
+The variable .LANCHOR1 references
+the function __init sifive_serial_console_setup()
+If the reference is valid then annotate the
+variable with __init* or __refdata (see linux/init.h) or name the variable:
+*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
+----
+
+".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
+anchor generation code:
+
+https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
+
+https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
+
+This was verified by compiling the kernel with -fno-section-anchors
+and observing that the ".LANCHOR1" ELF local symbol disappeared, and
+modpost no longer warned about the section mismatch.  The serial
+driver code idiom triggering the warning is standard Linux serial
+driver practice that has a specific whitelist inclusion in modpost.c.
+
+I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
+useful for modpost to report section mismatch warnings caused by ELF
+local symbols by default.  Local symbols have compiler-generated
+names, and thus bypass modpost's whitelisting algorithm, which relies
+on the presence of a non-autogenerated symbol name.  This increases
+the likelihood that false positive warnings will be generated (as in
+the above case).
+
+Thus, disable section mismatch reporting on ELF local symbols.  The
+rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
+ARM binutils leaking ELF local symbols") and of similar code already
+present in modpost.c:
+
+https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
+
+This third version of the patch implements a suggestion from Masahiro
+Yamada <yamada.masahiro@socionext.com> to restructure the code as an
+additional pattern matching step inside secref_whitelist(), and
+further improves the patch description.
+
+Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+Acked-by: Sam Ravnborg <sam@ravnborg.org>
+Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ scripts/mod/modpost.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
+index fdf5bbfd00cd9..9abcdf2e8dfe8 100644
+--- a/scripts/mod/modpost.c
++++ b/scripts/mod/modpost.c
+@@ -1157,6 +1157,14 @@ static const struct sectioncheck *section_mismatch(
+  *   fromsec = text section
+  *   refsymname = *.constprop.*
+  *
++ * Pattern 6:
++ *   Hide section mismatch warnings for ELF local symbols.  The goal
++ *   is to eliminate false positive modpost warnings caused by
++ *   compiler-generated ELF local symbol names such as ".LANCHOR1".
++ *   Autogenerated symbol names bypass modpost's "Pattern 2"
++ *   whitelisting, which relies on pattern-matching against symbol
++ *   names to work.  (One situation where gcc can autogenerate ELF
++ *   local symbols is when "-fsection-anchors" is used.)
+  **/
+ static int secref_whitelist(const struct sectioncheck *mismatch,
+                           const char *fromsec, const char *fromsym,
+@@ -1195,6 +1203,10 @@ static int secref_whitelist(const struct sectioncheck *mismatch,
+           match(fromsym, optim_symbols))
+               return 0;
++      /* Check for pattern 6 */
++      if (strstarts(fromsym, ".L"))
++              return 0;
++
+       return 1;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/mtd-fix-mtd_oobavail-incoherent-returned-value.patch b/queue-4.9/mtd-fix-mtd_oobavail-incoherent-returned-value.patch
new file mode 100644 (file)
index 0000000..2d26307
--- /dev/null
@@ -0,0 +1,36 @@
+From f5897f6a713e0a3b957dc45dd17808e96bd6df6f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 18 Nov 2018 21:18:30 +0100
+Subject: mtd: fix mtd_oobavail() incoherent returned value
+
+From: Miquel Raynal <miquel.raynal@bootlin.com>
+
+[ Upstream commit 4348433d8c0234f44adb6e12112e69343f50f0c5 ]
+
+mtd_oobavail() returns either mtd->oovabail or mtd->oobsize. Both
+values are unsigned 32-bit entities, so there is no reason to pretend
+returning a signed one.
+
+Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/mtd/mtd.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
+index 13f8052b9ff92..13ddba5e531d3 100644
+--- a/include/linux/mtd/mtd.h
++++ b/include/linux/mtd/mtd.h
+@@ -392,7 +392,7 @@ static inline struct device_node *mtd_get_of_node(struct mtd_info *mtd)
+       return mtd->dev.of_node;
+ }
+-static inline int mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
++static inline u32 mtd_oobavail(struct mtd_info *mtd, struct mtd_oob_ops *ops)
+ {
+       return ops->mode == MTD_OPS_AUTO_OOB ? mtd->oobavail : mtd->oobsize;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-ep93xx_eth-fix-mismatch-of-request_mem_region-in.patch b/queue-4.9/net-ep93xx_eth-fix-mismatch-of-request_mem_region-in.patch
new file mode 100644 (file)
index 0000000..788ec99
--- /dev/null
@@ -0,0 +1,46 @@
+From 1f49fdc95566a656fccde58972f4cf809c2f20eb Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 14 Nov 2019 23:43:24 +0800
+Subject: net: ep93xx_eth: fix mismatch of request_mem_region in remove
+
+From: Chuhong Yuan <hslester96@gmail.com>
+
+[ Upstream commit 3df70afe8d33f4977d0e0891bdcfb639320b5257 ]
+
+The driver calls release_resource in remove to match request_mem_region
+in probe, which is incorrect.
+Fix it by using the right one, release_mem_region.
+
+Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/cirrus/ep93xx_eth.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
+index 9a161e9815297..24f69034f52c4 100644
+--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
++++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
+@@ -780,6 +780,7 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
+ {
+       struct net_device *dev;
+       struct ep93xx_priv *ep;
++      struct resource *mem;
+       dev = platform_get_drvdata(pdev);
+       if (dev == NULL)
+@@ -795,8 +796,8 @@ static int ep93xx_eth_remove(struct platform_device *pdev)
+               iounmap(ep->base_addr);
+       if (ep->res != NULL) {
+-              release_resource(ep->res);
+-              kfree(ep->res);
++              mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++              release_mem_region(mem->start, resource_size(mem));
+       }
+       free_netdev(dev);
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-mlx4_core-fix-return-codes-of-unsupported-operat.patch b/queue-4.9/net-mlx4_core-fix-return-codes-of-unsupported-operat.patch
new file mode 100644 (file)
index 0000000..e7bc77c
--- /dev/null
@@ -0,0 +1,76 @@
+From e5b31004432756f3f509d865d8fa542c94f0a591 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 2 Dec 2018 17:40:25 +0200
+Subject: net/mlx4_core: Fix return codes of unsupported operations
+
+From: Erez Alfasi <ereza@mellanox.com>
+
+[ Upstream commit 95aac2cdafd8c8298c9b2589c52f44db0d824e0e ]
+
+Functions __set_port_type and mlx4_check_port_params returned
+-EINVAL while the proper return code is -EOPNOTSUPP as a
+result of an unsupported operation. All drivers should generate
+this and all users should check for it when detecting an
+unsupported functionality.
+
+Signed-off-by: Erez Alfasi <ereza@mellanox.com>
+Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/mellanox/mlx4/main.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
+index cb7c3ef971345..781642d47133d 100644
+--- a/drivers/net/ethernet/mellanox/mlx4/main.c
++++ b/drivers/net/ethernet/mellanox/mlx4/main.c
+@@ -198,7 +198,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
+               for (i = 0; i < dev->caps.num_ports - 1; i++) {
+                       if (port_type[i] != port_type[i + 1]) {
+                               mlx4_err(dev, "Only same port types supported on this HCA, aborting\n");
+-                              return -EINVAL;
++                              return -EOPNOTSUPP;
+                       }
+               }
+       }
+@@ -207,7 +207,7 @@ int mlx4_check_port_params(struct mlx4_dev *dev,
+               if (!(port_type[i] & dev->caps.supported_type[i+1])) {
+                       mlx4_err(dev, "Requested port type for port %d is not supported on this HCA\n",
+                                i + 1);
+-                      return -EINVAL;
++                      return -EOPNOTSUPP;
+               }
+       }
+       return 0;
+@@ -1122,8 +1122,7 @@ static int __set_port_type(struct mlx4_port_info *info,
+               mlx4_err(mdev,
+                        "Requested port type for port %d is not supported on this HCA\n",
+                        info->port);
+-              err = -EINVAL;
+-              goto err_sup;
++              return -EOPNOTSUPP;
+       }
+       mlx4_stop_sense(mdev);
+@@ -1145,7 +1144,7 @@ static int __set_port_type(struct mlx4_port_info *info,
+               for (i = 1; i <= mdev->caps.num_ports; i++) {
+                       if (mdev->caps.possible_type[i] == MLX4_PORT_TYPE_AUTO) {
+                               mdev->caps.possible_type[i] = mdev->caps.port_type[i];
+-                              err = -EINVAL;
++                              err = -EOPNOTSUPP;
+                       }
+               }
+       }
+@@ -1171,7 +1170,7 @@ static int __set_port_type(struct mlx4_port_info *info,
+ out:
+       mlx4_start_sense(mdev);
+       mutex_unlock(&priv->port_mutex);
+-err_sup:
++
+       return err;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-mlx5-release-resource-on-error-flow.patch b/queue-4.9/net-mlx5-release-resource-on-error-flow.patch
new file mode 100644 (file)
index 0000000..2b18487
--- /dev/null
@@ -0,0 +1,46 @@
+From c0b4cc1810eb4ebfa79b6f41c91952d0b79dda83 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 8 Nov 2018 21:10:08 +0200
+Subject: net/mlx5: Release resource on error flow
+
+From: Moni Shoua <monis@mellanox.com>
+
+[ Upstream commit 698114968a22f6c0c9f42e983ba033cc36bb7217 ]
+
+Fix reference counting leakage when the event handler aborts due to an
+unsupported event for the resource type.
+
+Fixes: a14c2d4beee5 ("net/mlx5_core: Warn on unsupported events of QP/RQ/SQ")
+Signed-off-by: Moni Shoua <monis@mellanox.com>
+Reviewed-by: Majd Dibbiny <majd@mellanox.com>
+Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/qp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/qp.c b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
+index 9346f3985edf3..354338c8a510e 100644
+--- a/drivers/net/ethernet/mellanox/mlx5/core/qp.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/qp.c
+@@ -125,7 +125,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
+       if (!is_event_type_allowed((rsn >> MLX5_USER_INDEX_LEN), event_type)) {
+               mlx5_core_warn(dev, "event 0x%.2x is not allowed on resource 0x%.8x\n",
+                              event_type, rsn);
+-              return;
++              goto out;
+       }
+       switch (common->res) {
+@@ -139,7 +139,7 @@ void mlx5_rsc_event(struct mlx5_core_dev *dev, u32 rsn, int event_type)
+       default:
+               mlx5_core_warn(dev, "invalid resource type for 0x%x\n", rsn);
+       }
+-
++out:
+       mlx5_core_put_rsc(common);
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-x25-fix-called-calling-length-calculation-in-x25.patch b/queue-4.9/net-x25-fix-called-calling-length-calculation-in-x25.patch
new file mode 100644 (file)
index 0000000..0a188d6
--- /dev/null
@@ -0,0 +1,36 @@
+From fb3daa8317422ec0137901214807b7960dcf00d9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 27 Nov 2018 09:50:27 +0100
+Subject: net/x25: fix called/calling length calculation in
+ x25_parse_address_block
+
+From: Martin Schiller <ms@dev.tdt.de>
+
+[ Upstream commit d449ba3d581ed29f751a59792fdc775572c66904 ]
+
+The length of the called and calling address was not calculated
+correctly (BCD encoding).
+
+Signed-off-by: Martin Schiller <ms@dev.tdt.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/x25/af_x25.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
+index 770ababb8f928..ebd9c5f50a571 100644
+--- a/net/x25/af_x25.c
++++ b/net/x25/af_x25.c
+@@ -100,7 +100,7 @@ int x25_parse_address_block(struct sk_buff *skb,
+       }
+       len = *skb->data;
+-      needed = 1 + (len >> 4) + (len & 0x0f);
++      needed = 1 + ((len >> 4) + (len & 0x0f) + 1) / 2;
+       if (!pskb_may_pull(skb, needed)) {
+               /* packet is too short to hold the addresses it claims
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-x25-fix-null_x25_address-handling.patch b/queue-4.9/net-x25-fix-null_x25_address-handling.patch
new file mode 100644 (file)
index 0000000..3a263c8
--- /dev/null
@@ -0,0 +1,59 @@
+From dd6550149cbc082af318b90db979e23c3348f328 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 27 Nov 2018 09:50:28 +0100
+Subject: net/x25: fix null_x25_address handling
+
+From: Martin Schiller <ms@dev.tdt.de>
+
+[ Upstream commit 06137619f061f498c2924f6543fa45b7d39f0501 ]
+
+o x25_find_listener(): the compare for the null_x25_address was wrong.
+   We have to check the x25_addr of the listener socket instead of the
+   x25_addr of the incomming call.
+
+ o x25_bind(): it was not possible to bind a socket to null_x25_address
+
+Signed-off-by: Martin Schiller <ms@dev.tdt.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/x25/af_x25.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
+index ebd9c5f50a571..6c2560f3f95bd 100644
+--- a/net/x25/af_x25.c
++++ b/net/x25/af_x25.c
+@@ -288,7 +288,7 @@ static struct sock *x25_find_listener(struct x25_address *addr,
+       sk_for_each(s, &x25_list)
+               if ((!strcmp(addr->x25_addr,
+                       x25_sk(s)->source_addr.x25_addr) ||
+-                              !strcmp(addr->x25_addr,
++                              !strcmp(x25_sk(s)->source_addr.x25_addr,
+                                       null_x25_address.x25_addr)) &&
+                                       s->sk_state == TCP_LISTEN) {
+                       /*
+@@ -684,11 +684,15 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
+               goto out;
+       }
+-      len = strlen(addr->sx25_addr.x25_addr);
+-      for (i = 0; i < len; i++) {
+-              if (!isdigit(addr->sx25_addr.x25_addr[i])) {
+-                      rc = -EINVAL;
+-                      goto out;
++      /* check for the null_x25_address */
++      if (strcmp(addr->sx25_addr.x25_addr, null_x25_address.x25_addr)) {
++
++              len = strlen(addr->sx25_addr.x25_addr);
++              for (i = 0; i < len; i++) {
++                      if (!isdigit(addr->sx25_addr.x25_addr[i])) {
++                              rc = -EINVAL;
++                              goto out;
++                      }
+               }
+       }
+-- 
+2.20.1
+
diff --git a/queue-4.9/nfc-nxp-nci-fix-null-pointer-dereference-after-i2c-c.patch b/queue-4.9/nfc-nxp-nci-fix-null-pointer-dereference-after-i2c-c.patch
new file mode 100644 (file)
index 0000000..6db4ff9
--- /dev/null
@@ -0,0 +1,73 @@
+From 69d48b27023bea71cf48c7b6ee11bae22ad4a69b Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sun, 10 Nov 2019 17:19:15 +0100
+Subject: NFC: nxp-nci: Fix NULL pointer dereference after I2C communication
+ error
+
+From: Stephan Gerhold <stephan@gerhold.net>
+
+[ Upstream commit a71a29f50de1ef97ab55c151a1598eb12dde379d ]
+
+I2C communication errors (-EREMOTEIO) during the IRQ handler of nxp-nci
+result in a NULL pointer dereference at the moment:
+
+    BUG: kernel NULL pointer dereference, address: 0000000000000000
+    Oops: 0002 [#1] PREEMPT SMP NOPTI
+    CPU: 1 PID: 355 Comm: irq/137-nxp-nci Not tainted 5.4.0-rc6 #1
+    RIP: 0010:skb_queue_tail+0x25/0x50
+    Call Trace:
+     nci_recv_frame+0x36/0x90 [nci]
+     nxp_nci_i2c_irq_thread_fn+0xd1/0x285 [nxp_nci_i2c]
+     ? preempt_count_add+0x68/0xa0
+     ? irq_forced_thread_fn+0x80/0x80
+     irq_thread_fn+0x20/0x60
+     irq_thread+0xee/0x180
+     ? wake_threads_waitq+0x30/0x30
+     kthread+0xfb/0x130
+     ? irq_thread_check_affinity+0xd0/0xd0
+     ? kthread_park+0x90/0x90
+     ret_from_fork+0x1f/0x40
+
+Afterward the kernel must be rebooted to work properly again.
+
+This happens because it attempts to call nci_recv_frame() with skb == NULL.
+However, unlike nxp_nci_fw_recv_frame(), nci_recv_frame() does not have any
+NULL checks for skb, causing the NULL pointer dereference.
+
+Change the code to call only nxp_nci_fw_recv_frame() in case of an error.
+Make sure to log it so it is obvious that a communication error occurred.
+The error above then becomes:
+
+    nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121
+    nci: __nci_request: wait_for_completion_interruptible_timeout failed 0
+    nxp-nci_i2c i2c-NXP1001:00: NFC: Read failed with error -121
+
+Fixes: 6be88670fc59 ("NFC: nxp-nci_i2c: Add I2C support to NXP NCI driver")
+Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
+Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/nfc/nxp-nci/i2c.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
+index 06a157c63416a..7eab97585f22b 100644
+--- a/drivers/nfc/nxp-nci/i2c.c
++++ b/drivers/nfc/nxp-nci/i2c.c
+@@ -238,8 +238,10 @@ static irqreturn_t nxp_nci_i2c_irq_thread_fn(int irq, void *phy_id)
+       if (r == -EREMOTEIO) {
+               phy->hard_fault = r;
+-              skb = NULL;
+-      } else if (r < 0) {
++              if (info->mode == NXP_NCI_MODE_FW)
++                      nxp_nci_fw_recv_frame(phy->ndev, NULL);
++      }
++      if (r < 0) {
+               nfc_err(&client->dev, "Read failed with error %d\n", r);
+               goto exit_irq_handled;
+       }
+-- 
+2.20.1
+
diff --git a/queue-4.9/nfsd-fix-a-warning-in-__cld_pipe_upcall.patch b/queue-4.9/nfsd-fix-a-warning-in-__cld_pipe_upcall.patch
new file mode 100644 (file)
index 0000000..a7c4097
--- /dev/null
@@ -0,0 +1,89 @@
+From 8b3a1a836dce5b0b867df625f468e1b7cd43b903 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 6 Nov 2018 13:35:08 -0500
+Subject: nfsd: fix a warning in __cld_pipe_upcall()
+
+From: Scott Mayhew <smayhew@redhat.com>
+
+[ Upstream commit b493fd31c0b89d9453917e977002de58bebc3802 ]
+
+__cld_pipe_upcall() emits a "do not call blocking ops when
+!TASK_RUNNING" warning due to the dput() call in rpc_queue_upcall().
+Fix it by using a completion instead of hand coding the wait.
+
+Signed-off-by: Scott Mayhew <smayhew@redhat.com>
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfsd/nfs4recover.c | 17 ++++++-----------
+ 1 file changed, 6 insertions(+), 11 deletions(-)
+
+diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
+index 66eaeb1e8c2ce..dc9586feab317 100644
+--- a/fs/nfsd/nfs4recover.c
++++ b/fs/nfsd/nfs4recover.c
+@@ -661,7 +661,7 @@ struct cld_net {
+ struct cld_upcall {
+       struct list_head         cu_list;
+       struct cld_net          *cu_net;
+-      struct task_struct      *cu_task;
++      struct completion        cu_done;
+       struct cld_msg           cu_msg;
+ };
+@@ -670,23 +670,18 @@ __cld_pipe_upcall(struct rpc_pipe *pipe, struct cld_msg *cmsg)
+ {
+       int ret;
+       struct rpc_pipe_msg msg;
++      struct cld_upcall *cup = container_of(cmsg, struct cld_upcall, cu_msg);
+       memset(&msg, 0, sizeof(msg));
+       msg.data = cmsg;
+       msg.len = sizeof(*cmsg);
+-      /*
+-       * Set task state before we queue the upcall. That prevents
+-       * wake_up_process in the downcall from racing with schedule.
+-       */
+-      set_current_state(TASK_UNINTERRUPTIBLE);
+       ret = rpc_queue_upcall(pipe, &msg);
+       if (ret < 0) {
+-              set_current_state(TASK_RUNNING);
+               goto out;
+       }
+-      schedule();
++      wait_for_completion(&cup->cu_done);
+       if (msg.errno < 0)
+               ret = msg.errno;
+@@ -753,7 +748,7 @@ cld_pipe_downcall(struct file *filp, const char __user *src, size_t mlen)
+       if (copy_from_user(&cup->cu_msg, src, mlen) != 0)
+               return -EFAULT;
+-      wake_up_process(cup->cu_task);
++      complete(&cup->cu_done);
+       return mlen;
+ }
+@@ -768,7 +763,7 @@ cld_pipe_destroy_msg(struct rpc_pipe_msg *msg)
+       if (msg->errno >= 0)
+               return;
+-      wake_up_process(cup->cu_task);
++      complete(&cup->cu_done);
+ }
+ static const struct rpc_pipe_ops cld_upcall_ops = {
+@@ -899,7 +894,7 @@ restart_search:
+                       goto restart_search;
+               }
+       }
+-      new->cu_task = current;
++      init_completion(&new->cu_done);
+       new->cu_msg.cm_vers = CLD_UPCALL_VERSION;
+       put_unaligned(cn->cn_xid++, &new->cu_msg.cm_xid);
+       new->cu_net = cn;
+-- 
+2.20.1
+
diff --git a/queue-4.9/nfsd-return-eperm-not-eacces-in-some-setattr-cases.patch b/queue-4.9/nfsd-return-eperm-not-eacces-in-some-setattr-cases.patch
new file mode 100644 (file)
index 0000000..c43b198
--- /dev/null
@@ -0,0 +1,57 @@
+From 7bc44de4ceaa9b160e1c16ba0740bbfaadb2ccbe Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 30 Nov 2018 16:04:25 +0800
+Subject: nfsd: Return EPERM, not EACCES, in some SETATTR cases
+
+From: zhengbin <zhengbin13@huawei.com>
+
+[ Upstream commit 255fbca65137e25b12bced18ec9a014dc77ecda0 ]
+
+As the man(2) page for utime/utimes states, EPERM is returned when the
+second parameter of utime or utimes is not NULL, the caller's effective UID
+does not match the owner of the file, and the caller is not privileged.
+
+However, in a NFS directory mounted from knfsd, it will return EACCES
+(from nfsd_setattr-> fh_verify->nfsd_permission).  This patch fixes
+that.
+
+Signed-off-by: zhengbin <zhengbin13@huawei.com>
+Signed-off-by: J. Bruce Fields <bfields@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/nfsd/vfs.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
+index 8f0b19a3ca810..b8cd100cfcd6d 100644
+--- a/fs/nfsd/vfs.c
++++ b/fs/nfsd/vfs.c
+@@ -395,10 +395,23 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,
+       bool            get_write_count;
+       bool            size_change = (iap->ia_valid & ATTR_SIZE);
+-      if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME | ATTR_SIZE))
++      if (iap->ia_valid & ATTR_SIZE) {
+               accmode |= NFSD_MAY_WRITE|NFSD_MAY_OWNER_OVERRIDE;
+-      if (iap->ia_valid & ATTR_SIZE)
+               ftype = S_IFREG;
++      }
++
++      /*
++       * If utimes(2) and friends are called with times not NULL, we should
++       * not set NFSD_MAY_WRITE bit. Otherwise fh_verify->nfsd_permission
++       * will return EACCESS, when the caller's effective UID does not match
++       * the owner of the file, and the caller is not privileged. In this
++       * situation, we should return EPERM(notify_change will return this).
++       */
++      if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME)) {
++              accmode |= NFSD_MAY_OWNER_OVERRIDE;
++              if (!(iap->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET)))
++                      accmode |= NFSD_MAY_WRITE;
++      }
+       /* Callers that do fh_verify should do the fh_want_write: */
+       get_write_count = !fhp->fh_dentry;
+-- 
+2.20.1
+
diff --git a/queue-4.9/pinctrl-qcom-ssbi-gpio-fix-gpio-hog-related-boot-iss.patch b/queue-4.9/pinctrl-qcom-ssbi-gpio-fix-gpio-hog-related-boot-iss.patch
new file mode 100644 (file)
index 0000000..0041a0f
--- /dev/null
@@ -0,0 +1,69 @@
+From d073438be50f5aab291c2bd7d849b6ff64e7c1b3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 10 Nov 2018 20:34:11 -0500
+Subject: pinctrl: qcom: ssbi-gpio: fix gpio-hog related boot issues
+
+From: Brian Masney <masneyb@onstation.org>
+
+[ Upstream commit 7ed07855773814337b9814f1c3e866df52ebce68 ]
+
+When attempting to setup up a gpio hog, device probing will repeatedly
+fail with -EPROBE_DEFERED errors. It is caused by a circular dependency
+between the gpio and pinctrl frameworks. If the gpio-ranges property is
+present in device tree, then the gpio framework will handle the gpio pin
+registration and eliminate the circular dependency.
+
+See Christian Lamparter's commit a86caa9ba5d7 ("pinctrl: msm: fix
+gpio-hog related boot issues") for a detailed commit message that
+explains the issue in much more detail. The code comment in this commit
+came from Christian's commit.
+
+I did not test this change against any hardware supported by this
+particular driver, however I was able to validate this same fix works
+for pinctrl-spmi-gpio.c using a LG Nexus 5 (hammerhead) phone.
+
+Signed-off-by: Brian Masney <masneyb@onstation.org>
+Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 23 +++++++++++++++++------
+ 1 file changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+index e86c4de2f6db1..92855f45bc537 100644
+--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
++++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+@@ -762,12 +762,23 @@ static int pm8xxx_gpio_probe(struct platform_device *pdev)
+               return ret;
+       }
+-      ret = gpiochip_add_pin_range(&pctrl->chip,
+-                                   dev_name(pctrl->dev),
+-                                   0, 0, pctrl->chip.ngpio);
+-      if (ret) {
+-              dev_err(pctrl->dev, "failed to add pin range\n");
+-              goto unregister_gpiochip;
++      /*
++       * For DeviceTree-supported systems, the gpio core checks the
++       * pinctrl's device node for the "gpio-ranges" property.
++       * If it is present, it takes care of adding the pin ranges
++       * for the driver. In this case the driver can skip ahead.
++       *
++       * In order to remain compatible with older, existing DeviceTree
++       * files which don't set the "gpio-ranges" property or systems that
++       * utilize ACPI the driver has to call gpiochip_add_pin_range().
++       */
++      if (!of_property_read_bool(pctrl->dev->of_node, "gpio-ranges")) {
++              ret = gpiochip_add_pin_range(&pctrl->chip, dev_name(pctrl->dev),
++                                           0, 0, pctrl->chip.ngpio);
++              if (ret) {
++                      dev_err(pctrl->dev, "failed to add pin range\n");
++                      goto unregister_gpiochip;
++              }
+       }
+       platform_set_drvdata(pdev, pctrl);
+-- 
+2.20.1
+
diff --git a/queue-4.9/pinctrl-sh-pfc-r8a7792-fix-vin-versioned-groups.patch b/queue-4.9/pinctrl-sh-pfc-r8a7792-fix-vin-versioned-groups.patch
new file mode 100644 (file)
index 0000000..e7ba7c0
--- /dev/null
@@ -0,0 +1,46 @@
+From 721f8cf36087786b4a03e28bda7e1266442a52cf Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 8 Nov 2018 17:07:25 +0100
+Subject: pinctrl: sh-pfc: r8a7792: Fix VIN versioned groups
+
+From: Jacopo Mondi <jacopo+renesas@jmondi.org>
+
+[ Upstream commit 11c8f8df85e77329d5a3cacc08682722cb80b95b ]
+
+Versioned VIN groups can appear on different sets of pins. Using the
+VIN_DATA_PIN_GROUP macro now supports proper naming of said groups
+through an optional 'version' argument.
+
+Use the 'version' argument for said macro to fix naming of versioned
+groups for the R-Car V2H R8A7792 SoC.
+
+Fixes: 7dd74bb1f058 ("pinctrl: sh-pfc: r8a7792: Add VIN pin groups")
+Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
+Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
+Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/pinctrl/sh-pfc/pfc-r8a7792.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7792.c b/drivers/pinctrl/sh-pfc/pfc-r8a7792.c
+index 21badb6166b92..97547f8871211 100644
+--- a/drivers/pinctrl/sh-pfc/pfc-r8a7792.c
++++ b/drivers/pinctrl/sh-pfc/pfc-r8a7792.c
+@@ -1705,10 +1705,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
+       VIN_DATA_PIN_GROUP(vin1_data, 12),
+       VIN_DATA_PIN_GROUP(vin1_data, 10),
+       VIN_DATA_PIN_GROUP(vin1_data, 8),
+-      VIN_DATA_PIN_GROUP(vin1_data_b, 24),
+-      VIN_DATA_PIN_GROUP(vin1_data_b, 20),
++      VIN_DATA_PIN_GROUP(vin1_data, 24, _b),
++      VIN_DATA_PIN_GROUP(vin1_data, 20, _b),
+       SH_PFC_PIN_GROUP(vin1_data18_b),
+-      VIN_DATA_PIN_GROUP(vin1_data_b, 16),
++      VIN_DATA_PIN_GROUP(vin1_data, 16, _b),
+       SH_PFC_PIN_GROUP(vin1_sync),
+       SH_PFC_PIN_GROUP(vin1_field),
+       SH_PFC_PIN_GROUP(vin1_clkenb),
+-- 
+2.20.1
+
diff --git a/queue-4.9/powerpc-math-emu-update-macros-from-gcc.patch b/queue-4.9/powerpc-math-emu-update-macros-from-gcc.patch
new file mode 100644 (file)
index 0000000..16f5002
--- /dev/null
@@ -0,0 +1,191 @@
+From b5b07c2c8937eafa46748d3ea1463dec7af4f9a8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 4 Dec 2018 09:37:46 +1030
+Subject: powerpc/math-emu: Update macros from GCC
+
+From: Joel Stanley <joel@jms.id.au>
+
+[ Upstream commit b682c8692442711684befe413cf93cf01c5324ea ]
+
+The add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros originate
+from GCC's longlong.h which in turn was copied from GMP's longlong.h a
+few decades ago.
+
+This was found when compiling with clang:
+
+   arch/powerpc/math-emu/fnmsub.c:46:2: error: invalid use of a cast in a
+   inline asm context requiring an l-value: remove the cast or build with
+   -fheinous-gnu-extensions
+           FP_ADD_D(R, T, B);
+           ^~~~~~~~~~~~~~~~~
+   ...
+
+   ./arch/powerpc/include/asm/sfp-machine.h:283:27: note: expanded from
+   macro 'sub_ddmmss'
+                  : "=r" ((USItype)(sh)),                                  \
+                          ~~~~~~~~~~^~~
+
+Segher points out: this was fixed in GCC over 16 years ago
+( https://gcc.gnu.org/r56600 ), and in GMP (where it comes from)
+presumably before that.
+
+Update the add_ssaaaa, sub_ddmmss, umul_ppmm and udiv_qrnnd macros to
+the latest GCC version in order to git rid of the invalid casts. These
+were taken as-is from GCC's longlong in order to make future syncs
+obvious. Other parts of sfp-machine.h were left as-is as the file
+contains more features than present in longlong.h.
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/260
+Signed-off-by: Joel Stanley <joel@jms.id.au>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/powerpc/include/asm/sfp-machine.h | 92 ++++++++------------------
+ 1 file changed, 29 insertions(+), 63 deletions(-)
+
+diff --git a/arch/powerpc/include/asm/sfp-machine.h b/arch/powerpc/include/asm/sfp-machine.h
+index d89beaba26ff9..8b957aabb826d 100644
+--- a/arch/powerpc/include/asm/sfp-machine.h
++++ b/arch/powerpc/include/asm/sfp-machine.h
+@@ -213,30 +213,18 @@
+  * respectively.  The result is placed in HIGH_SUM and LOW_SUM.  Overflow
+  * (i.e. carry out) is not stored anywhere, and is lost.
+  */
+-#define add_ssaaaa(sh, sl, ah, al, bh, bl)                            \
++#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+   do {                                                                        \
+     if (__builtin_constant_p (bh) && (bh) == 0)                               \
+-      __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{aze|addze} %0,%2"         \
+-           : "=r" ((USItype)(sh)),                                    \
+-             "=&r" ((USItype)(sl))                                    \
+-           : "%r" ((USItype)(ah)),                                    \
+-             "%r" ((USItype)(al)),                                    \
+-             "rI" ((USItype)(bl)));                                   \
+-    else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0)                \
+-      __asm__ ("{a%I4|add%I4c} %1,%3,%4\n\t{ame|addme} %0,%2"         \
+-           : "=r" ((USItype)(sh)),                                    \
+-             "=&r" ((USItype)(sl))                                    \
+-           : "%r" ((USItype)(ah)),                                    \
+-             "%r" ((USItype)(al)),                                    \
+-             "rI" ((USItype)(bl)));                                   \
++      __asm__ ("add%I4c %1,%3,%4\n\taddze %0,%2"              \
++           : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
++    else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0)               \
++      __asm__ ("add%I4c %1,%3,%4\n\taddme %0,%2"              \
++           : "=r" (sh), "=&r" (sl) : "r" (ah), "%r" (al), "rI" (bl));\
+     else                                                              \
+-      __asm__ ("{a%I5|add%I5c} %1,%4,%5\n\t{ae|adde} %0,%2,%3"                \
+-           : "=r" ((USItype)(sh)),                                    \
+-             "=&r" ((USItype)(sl))                                    \
+-           : "%r" ((USItype)(ah)),                                    \
+-             "r" ((USItype)(bh)),                                     \
+-             "%r" ((USItype)(al)),                                    \
+-             "rI" ((USItype)(bl)));                                   \
++      __asm__ ("add%I5c %1,%4,%5\n\tadde %0,%2,%3"            \
++           : "=r" (sh), "=&r" (sl)                                    \
++           : "%r" (ah), "r" (bh), "%r" (al), "rI" (bl));              \
+   } while (0)
+ /* sub_ddmmss is used in op-2.h and udivmodti4.c and should be equivalent to
+@@ -248,44 +236,24 @@
+  * and LOW_DIFFERENCE.  Overflow (i.e. carry out) is not stored anywhere,
+  * and is lost.
+  */
+-#define sub_ddmmss(sh, sl, ah, al, bh, bl)                            \
++#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+   do {                                                                        \
+     if (__builtin_constant_p (ah) && (ah) == 0)                               \
+-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfze|subfze} %0,%2"     \
+-             : "=r" ((USItype)(sh)),                                  \
+-               "=&r" ((USItype)(sl))                                  \
+-             : "r" ((USItype)(bh)),                                   \
+-               "rI" ((USItype)(al)),                                  \
+-               "r" ((USItype)(bl)));                                  \
+-    else if (__builtin_constant_p (ah) && (ah) ==~(USItype) 0)                \
+-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{sfme|subfme} %0,%2"     \
+-             : "=r" ((USItype)(sh)),                                  \
+-               "=&r" ((USItype)(sl))                                  \
+-             : "r" ((USItype)(bh)),                                   \
+-               "rI" ((USItype)(al)),                                  \
+-               "r" ((USItype)(bl)));                                  \
++      __asm__ ("subf%I3c %1,%4,%3\n\tsubfze %0,%2"    \
++             : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
++    else if (__builtin_constant_p (ah) && (ah) == ~(USItype) 0)               \
++      __asm__ ("subf%I3c %1,%4,%3\n\tsubfme %0,%2"    \
++             : "=r" (sh), "=&r" (sl) : "r" (bh), "rI" (al), "r" (bl));\
+     else if (__builtin_constant_p (bh) && (bh) == 0)                  \
+-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{ame|addme} %0,%2"               \
+-             : "=r" ((USItype)(sh)),                                  \
+-               "=&r" ((USItype)(sl))                                  \
+-             : "r" ((USItype)(ah)),                                   \
+-               "rI" ((USItype)(al)),                                  \
+-               "r" ((USItype)(bl)));                                  \
+-    else if (__builtin_constant_p (bh) && (bh) ==~(USItype) 0)                \
+-      __asm__ ("{sf%I3|subf%I3c} %1,%4,%3\n\t{aze|addze} %0,%2"               \
+-             : "=r" ((USItype)(sh)),                                  \
+-               "=&r" ((USItype)(sl))                                  \
+-             : "r" ((USItype)(ah)),                                   \
+-               "rI" ((USItype)(al)),                                  \
+-               "r" ((USItype)(bl)));                                  \
++      __asm__ ("subf%I3c %1,%4,%3\n\taddme %0,%2"             \
++             : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
++    else if (__builtin_constant_p (bh) && (bh) == ~(USItype) 0)               \
++      __asm__ ("subf%I3c %1,%4,%3\n\taddze %0,%2"             \
++             : "=r" (sh), "=&r" (sl) : "r" (ah), "rI" (al), "r" (bl));\
+     else                                                              \
+-      __asm__ ("{sf%I4|subf%I4c} %1,%5,%4\n\t{sfe|subfe} %0,%3,%2"    \
+-             : "=r" ((USItype)(sh)),                                  \
+-               "=&r" ((USItype)(sl))                                  \
+-             : "r" ((USItype)(ah)),                                   \
+-               "r" ((USItype)(bh)),                                   \
+-               "rI" ((USItype)(al)),                                  \
+-               "r" ((USItype)(bl)));                                  \
++      __asm__ ("subf%I4c %1,%5,%4\n\tsubfe %0,%3,%2"  \
++             : "=r" (sh), "=&r" (sl)                                  \
++             : "r" (ah), "r" (bh), "rI" (al), "r" (bl));              \
+   } while (0)
+ /* asm fragments for mul and div */
+@@ -294,13 +262,10 @@
+  * UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype
+  * word product in HIGH_PROD and LOW_PROD.
+  */
+-#define umul_ppmm(ph, pl, m0, m1)                                     \
++#define umul_ppmm(ph, pl, m0, m1) \
+   do {                                                                        \
+     USItype __m0 = (m0), __m1 = (m1);                                 \
+-    __asm__ ("mulhwu %0,%1,%2"                                                \
+-           : "=r" ((USItype)(ph))                                     \
+-           : "%r" (__m0),                                             \
+-               "r" (__m1));                                           \
++    __asm__ ("mulhwu %0,%1,%2" : "=r" (ph) : "%r" (m0), "r" (m1));    \
+     (pl) = __m0 * __m1;                                                       \
+   } while (0)
+@@ -312,9 +277,10 @@
+  * significant bit of DENOMINATOR must be 1, then the pre-processor symbol
+  * UDIV_NEEDS_NORMALIZATION is defined to 1.
+  */
+-#define udiv_qrnnd(q, r, n1, n0, d)                                   \
++#define udiv_qrnnd(q, r, n1, n0, d) \
+   do {                                                                        \
+-    UWtype __d1, __d0, __q1, __q0, __r1, __r0, __m;                   \
++    UWtype __d1, __d0, __q1, __q0;                                    \
++    UWtype __r1, __r0, __m;                                           \
+     __d1 = __ll_highpart (d);                                         \
+     __d0 = __ll_lowpart (d);                                          \
+                                                                       \
+@@ -325,7 +291,7 @@
+     if (__r1 < __m)                                                   \
+       {                                                                       \
+       __q1--, __r1 += (d);                                            \
+-      if (__r1 >= (d)) /* we didn't get carry when adding to __r1 */  \
++      if (__r1 >= (d)) /* i.e. we didn't get carry when adding to __r1 */\
+         if (__r1 < __m)                                               \
+           __q1--, __r1 += (d);                                        \
+       }                                                                       \
+-- 
+2.20.1
+
diff --git a/queue-4.9/rdma-hns-correct-the-value-of-hns_roce_hem_chunk_len.patch b/queue-4.9/rdma-hns-correct-the-value-of-hns_roce_hem_chunk_len.patch
new file mode 100644 (file)
index 0000000..40d42bf
--- /dev/null
@@ -0,0 +1,39 @@
+From 8190f40048000284f1e29bd34d8c5419cd87b89d Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 1 Nov 2019 10:33:29 +0800
+Subject: RDMA/hns: Correct the value of HNS_ROCE_HEM_CHUNK_LEN
+
+From: Sirong Wang <wangsirong@huawei.com>
+
+[ Upstream commit 531eb45b3da4267fc2a64233ba256c8ffb02edd2 ]
+
+Size of pointer to buf field of struct hns_roce_hem_chunk should be
+considered when calculating HNS_ROCE_HEM_CHUNK_LEN, or sg table size will
+be larger than expected when allocating hem.
+
+Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver")
+Link: https://lore.kernel.org/r/1572575610-52530-2-git-send-email-liweihang@hisilicon.com
+Signed-off-by: Sirong Wang <wangsirong@huawei.com>
+Signed-off-by: Weihang Li <liweihang@hisilicon.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/hns/hns_roce_hem.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.h b/drivers/infiniband/hw/hns/hns_roce_hem.h
+index 435748858252d..8e8917ebb013b 100644
+--- a/drivers/infiniband/hw/hns/hns_roce_hem.h
++++ b/drivers/infiniband/hw/hns/hns_roce_hem.h
+@@ -52,7 +52,7 @@ enum {
+ #define HNS_ROCE_HEM_CHUNK_LEN        \
+        ((256 - sizeof(struct list_head) - 2 * sizeof(int)) /   \
+-       (sizeof(struct scatterlist)))
++       (sizeof(struct scatterlist) + sizeof(void *)))
+ enum {
+        HNS_ROCE_HEM_PAGE_SHIFT = 12,
+-- 
+2.20.1
+
diff --git a/queue-4.9/regulator-fix-return-value-of-_set_load-stub.patch b/queue-4.9/regulator-fix-return-value-of-_set_load-stub.patch
new file mode 100644 (file)
index 0000000..19a28a1
--- /dev/null
@@ -0,0 +1,39 @@
+From a2308904b6c55b946959b7ebbfcd6da674e911e8 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 16 Nov 2018 19:19:30 -0800
+Subject: regulator: Fix return value of _set_load() stub
+
+From: Mark Brown <broonie@kernel.org>
+
+[ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ]
+
+The stub implementation of _set_load() returns a mode value which is
+within the bounds of valid return codes for success (the documentation
+just says that failures are negative error codes) but not sensible or
+what the actual implementation does.  Fix it to just return 0.
+
+Reported-by: Cheng-Yi Chiang <cychiang@chromium.org>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Reviewed-by: Douglas Anderson <dianders@chromium.org>
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/regulator/consumer.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
+index 692108222271a..bab9236e43675 100644
+--- a/include/linux/regulator/consumer.h
++++ b/include/linux/regulator/consumer.h
+@@ -479,7 +479,7 @@ static inline unsigned int regulator_get_mode(struct regulator *regulator)
+ static inline int regulator_set_load(struct regulator *regulator, int load_uA)
+ {
+-      return REGULATOR_MODE_NORMAL;
++      return 0;
+ }
+ static inline int regulator_allow_bypass(struct regulator *regulator,
+-- 
+2.20.1
+
diff --git a/queue-4.9/rsxx-add-missed-destroy_workqueue-calls-in-remove.patch b/queue-4.9/rsxx-add-missed-destroy_workqueue-calls-in-remove.patch
new file mode 100644 (file)
index 0000000..4c52ccf
--- /dev/null
@@ -0,0 +1,38 @@
+From 8994835f025f35da105a142b4d51a05b02e84552 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 13 Nov 2019 14:38:47 +0800
+Subject: rsxx: add missed destroy_workqueue calls in remove
+
+From: Chuhong Yuan <hslester96@gmail.com>
+
+[ Upstream commit dcb77e4b274b8f13ac6482dfb09160cd2fae9a40 ]
+
+The driver misses calling destroy_workqueue in remove like what is done
+when probe fails.
+Add the missed calls to fix it.
+
+Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/block/rsxx/core.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
+index 34997df132e24..6beafaa335c71 100644
+--- a/drivers/block/rsxx/core.c
++++ b/drivers/block/rsxx/core.c
+@@ -1025,8 +1025,10 @@ static void rsxx_pci_remove(struct pci_dev *dev)
+       cancel_work_sync(&card->event_work);
++      destroy_workqueue(card->event_wq);
+       rsxx_destroy_dev(card);
+       rsxx_dma_destroy(card);
++      destroy_workqueue(card->creg_ctrl.creg_wq);
+       spin_lock_irqsave(&card->irq_lock, flags);
+       rsxx_disable_ier_and_isr(card, CR_INTR_ALL);
+-- 
+2.20.1
+
diff --git a/queue-4.9/rtc-dt-binding-abx80x-fix-resistance-scale.patch b/queue-4.9/rtc-dt-binding-abx80x-fix-resistance-scale.patch
new file mode 100644 (file)
index 0000000..93235c8
--- /dev/null
@@ -0,0 +1,31 @@
+From 916c44be4a5d614c2ca8b0e79d240e0114a53dd4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 19 Nov 2018 14:34:02 +0200
+Subject: rtc: dt-binding: abx80x: fix resistance scale
+
+From: Baruch Siach <baruch@tkos.co.il>
+
+[ Upstream commit 73852e56827f5cb5db9d6e8dd8191fc2f2e8f424 ]
+
+The abracon,tc-resistor property value is in kOhm.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ Documentation/devicetree/bindings/rtc/abracon,abx80x.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
+index be789685a1c24..18b892d010d87 100644
+--- a/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
++++ b/Documentation/devicetree/bindings/rtc/abracon,abx80x.txt
+@@ -27,4 +27,4 @@ and valid to enable charging:
+  - "abracon,tc-diode": should be "standard" (0.6V) or "schottky" (0.3V)
+  - "abracon,tc-resistor": should be <0>, <3>, <6> or <11>. 0 disables the output
+-                          resistor, the other values are in ohm.
++                          resistor, the other values are in kOhm.
+-- 
+2.20.1
+
diff --git a/queue-4.9/rtc-max8997-fix-the-returned-value-in-case-of-error-.patch b/queue-4.9/rtc-max8997-fix-the-returned-value-in-case-of-error-.patch
new file mode 100644 (file)
index 0000000..058893c
--- /dev/null
@@ -0,0 +1,37 @@
+From ede6b0ee2a2dc414d556130bcf2b4250bff39c04 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Nov 2018 18:19:51 +0100
+Subject: rtc: max8997: Fix the returned value in case of error in
+ 'max8997_rtc_read_alarm()'
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+[ Upstream commit 41ef3878203cd9218d92eaa07df4b85a2cb128fb ]
+
+In case of error, we return 0.
+This is spurious and not consistent with the other functions of the driver.
+Propagate the error code instead.
+
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/rtc/rtc-max8997.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/rtc/rtc-max8997.c b/drivers/rtc/rtc-max8997.c
+index db984d4bf9526..4cce5bd448f65 100644
+--- a/drivers/rtc/rtc-max8997.c
++++ b/drivers/rtc/rtc-max8997.c
+@@ -221,7 +221,7 @@ static int max8997_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
+ out:
+       mutex_unlock(&info->lock);
+-      return 0;
++      return ret;
+ }
+ static int max8997_rtc_stop_alarm(struct max8997_rtc_info *info)
+-- 
+2.20.1
+
diff --git a/queue-4.9/scsi-zfcp-drop-default-switch-case-which-might-paper.patch b/queue-4.9/scsi-zfcp-drop-default-switch-case-which-might-paper.patch
new file mode 100644 (file)
index 0000000..ec7af61
--- /dev/null
@@ -0,0 +1,54 @@
+From 4789d4af4163a62e04ef32cac83433a2195e77b4 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 8 Nov 2018 15:44:57 +0100
+Subject: scsi: zfcp: drop default switch case which might paper over missing
+ case
+
+From: Steffen Maier <maier@linux.ibm.com>
+
+[ Upstream commit 0c902936e55cff9335b27ed632fc45e7115ced75 ]
+
+This was introduced with v4.18 commit 8c3d20aada70 ("scsi: zfcp: fix
+missing REC trigger trace for all objects in ERP_FAILED") but would now
+suppress helpful -Wswitch compiler warnings when building with W=1 such as
+the following forced example:
+
+drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_handle_failed':
+drivers/s390/scsi/zfcp_erp.c:126:2: warning: enumeration value 'ZFCP_ERP_ACTION_REOPEN_PORT_FORCED' not handled in switch [-Wswitch]
+  switch (want) {
+  ^~~~~~
+
+But then again, only with W=1 we would notice unhandled enum cases.
+Without the default cases and a missed unhandled enum case, the code might
+perform unforeseen things we might not want...
+
+As of today, we never run through the removed default case, so removing it
+is no functional change.  In the future, we never should run through a
+default case but introduce the necessary specific case(s) to handle new
+functionality.
+
+Signed-off-by: Steffen Maier <maier@linux.ibm.com>
+Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/s390/scsi/zfcp_erp.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
+index cc62d8cc8cfdd..d5214c4eb9ddb 100644
+--- a/drivers/s390/scsi/zfcp_erp.c
++++ b/drivers/s390/scsi/zfcp_erp.c
+@@ -178,9 +178,6 @@ static int zfcp_erp_handle_failed(int want, struct zfcp_adapter *adapter,
+                               adapter, ZFCP_STATUS_COMMON_ERP_FAILED);
+               }
+               break;
+-      default:
+-              need = 0;
+-              break;
+       }
+       return need;
+-- 
+2.20.1
+
diff --git a/queue-4.9/serial-core-allow-processing-sysrq-at-port-unlock-ti.patch b/queue-4.9/serial-core-allow-processing-sysrq-at-port-unlock-ti.patch
new file mode 100644 (file)
index 0000000..d188c64
--- /dev/null
@@ -0,0 +1,160 @@
+From dfd627f5e60a9dc755373b7c3f7b1168d81c00c2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 30 Oct 2018 15:11:04 -0700
+Subject: serial: core: Allow processing sysrq at port unlock time
+
+From: Douglas Anderson <dianders@chromium.org>
+
+[ Upstream commit d6e1935819db0c91ce4a5af82466f3ab50d17346 ]
+
+Right now serial drivers process sysrq keys deep in their character
+receiving code.  This means that they've already grabbed their
+port->lock spinlock.  This can end up getting in the way if we've go
+to do serial stuff (especially kgdb) in response to the sysrq.
+
+Serial drivers have various hacks in them to handle this.  Looking at
+'8250_port.c' you can see that the console_write() skips locking if
+we're in the sysrq handler.  Looking at 'msm_serial.c' you can see
+that the port lock is dropped around uart_handle_sysrq_char().
+
+It turns out that these hacks aren't exactly perfect.  If you have
+lockdep turned on and use something like the 8250_port hack you'll get
+a splat that looks like:
+
+  WARNING: possible circular locking dependency detected
+  [...] is trying to acquire lock:
+  ... (console_owner){-.-.}, at: console_unlock+0x2e0/0x5e4
+
+  but task is already holding lock:
+  ... (&port_lock_key){-.-.}, at: serial8250_handle_irq+0x30/0xe4
+
+  which lock already depends on the new lock.
+
+  the existing dependency chain (in reverse order) is:
+
+  -> #1 (&port_lock_key){-.-.}:
+         _raw_spin_lock_irqsave+0x58/0x70
+         serial8250_console_write+0xa8/0x250
+         univ8250_console_write+0x40/0x4c
+         console_unlock+0x528/0x5e4
+         register_console+0x2c4/0x3b0
+         uart_add_one_port+0x350/0x478
+         serial8250_register_8250_port+0x350/0x3a8
+         dw8250_probe+0x67c/0x754
+         platform_drv_probe+0x58/0xa4
+         really_probe+0x150/0x294
+         driver_probe_device+0xac/0xe8
+         __driver_attach+0x98/0xd0
+         bus_for_each_dev+0x84/0xc8
+         driver_attach+0x2c/0x34
+         bus_add_driver+0xf0/0x1ec
+         driver_register+0xb4/0x100
+         __platform_driver_register+0x60/0x6c
+         dw8250_platform_driver_init+0x20/0x28
+        ...
+
+  -> #0 (console_owner){-.-.}:
+         lock_acquire+0x1e8/0x214
+         console_unlock+0x35c/0x5e4
+         vprintk_emit+0x230/0x274
+         vprintk_default+0x7c/0x84
+         vprintk_func+0x190/0x1bc
+         printk+0x80/0xa0
+         __handle_sysrq+0x104/0x21c
+         handle_sysrq+0x30/0x3c
+         serial8250_read_char+0x15c/0x18c
+         serial8250_rx_chars+0x34/0x74
+         serial8250_handle_irq+0x9c/0xe4
+         dw8250_handle_irq+0x98/0xcc
+         serial8250_interrupt+0x50/0xe8
+         ...
+
+  other info that might help us debug this:
+
+   Possible unsafe locking scenario:
+
+         CPU0                    CPU1
+         ----                    ----
+    lock(&port_lock_key);
+                                 lock(console_owner);
+                                 lock(&port_lock_key);
+    lock(console_owner);
+
+   *** DEADLOCK ***
+
+The hack used in 'msm_serial.c' doesn't cause the above splats but it
+seems a bit ugly to unlock / lock our spinlock deep in our irq
+handler.
+
+It seems like we could defer processing the sysrq until the end of the
+interrupt handler right after we've unlocked the port.  With this
+scheme if a whole batch of sysrq characters comes in one irq then we
+won't handle them all, but that seems like it should be a fine
+compromise.
+
+Signed-off-by: Douglas Anderson <dianders@chromium.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/serial_core.h | 37 ++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 36 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
+index eb4f6456521e9..cd95b5e395a30 100644
+--- a/include/linux/serial_core.h
++++ b/include/linux/serial_core.h
+@@ -161,6 +161,7 @@ struct uart_port {
+       struct console          *cons;                  /* struct console, if any */
+ #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(SUPPORT_SYSRQ)
+       unsigned long           sysrq;                  /* sysrq timeout */
++      unsigned int            sysrq_ch;               /* char for sysrq */
+ #endif
+       /* flags must be updated while holding port mutex */
+@@ -470,8 +471,42 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
+       }
+       return 0;
+ }
++static inline int
++uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch)
++{
++      if (port->sysrq) {
++              if (ch && time_before(jiffies, port->sysrq)) {
++                      port->sysrq_ch = ch;
++                      port->sysrq = 0;
++                      return 1;
++              }
++              port->sysrq = 0;
++      }
++      return 0;
++}
++static inline void
++uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
++{
++      int sysrq_ch;
++
++      sysrq_ch = port->sysrq_ch;
++      port->sysrq_ch = 0;
++
++      spin_unlock_irqrestore(&port->lock, irqflags);
++
++      if (sysrq_ch)
++              handle_sysrq(sysrq_ch);
++}
+ #else
+-#define uart_handle_sysrq_char(port,ch) ({ (void)port; 0; })
++static inline int
++uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) { return 0; }
++static inline int
++uart_prepare_sysrq_char(struct uart_port *port, unsigned int ch) { return 0; }
++static inline void
++uart_unlock_and_check_sysrq(struct uart_port *port, unsigned long irqflags)
++{
++      spin_unlock_irqrestore(&port->lock, irqflags);
++}
+ #endif
+ /*
+-- 
+2.20.1
+
diff --git a/queue-4.9/serial-imx-fix-error-handling-in-console_setup.patch b/queue-4.9/serial-imx-fix-error-handling-in-console_setup.patch
new file mode 100644 (file)
index 0000000..9da43d7
--- /dev/null
@@ -0,0 +1,40 @@
+From 9a9b630c8eb9699070cf9b936bc1fee943d4a4af Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 14 Nov 2018 18:49:38 +0100
+Subject: serial: imx: fix error handling in console_setup
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Stefan Agner <stefan@agner.ch>
+
+[ Upstream commit 63fd4b94b948c14eeb27a3bbf50ea0f7f0593bad ]
+
+The ipg clock only needs to be unprepared in case preparing
+per clock fails. The ipg clock has already disabled at the point.
+
+Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
+Signed-off-by: Stefan Agner <stefan@agner.ch>
+Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/serial/imx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
+index 0d82be145c680..6d596c6351591 100644
+--- a/drivers/tty/serial/imx.c
++++ b/drivers/tty/serial/imx.c
+@@ -1943,7 +1943,7 @@ imx_console_setup(struct console *co, char *options)
+       retval = clk_prepare(sport->clk_per);
+       if (retval)
+-              clk_disable_unprepare(sport->clk_ipg);
++              clk_unprepare(sport->clk_ipg);
+ error_console:
+       return retval;
+-- 
+2.20.1
+
index 5fa6fb2e892c4b79a7c01f783378c2969da9c167..ac6f1fdee3ffa509a8918781a51e9f94e00dbb4a 100644 (file)
@@ -5,3 +5,70 @@ tty-serial-msm_serial-fix-flow-control.patch
 serial-pl011-fix-dma-flush_buffer.patch
 serial-serial_core-perform-null-checks-for-break_ctl-ops.patch
 serial-ifx6x60-add-missed-pm_runtime_disable.patch
+autofs-fix-a-leak-in-autofs_expire_indirect.patch
+rdma-hns-correct-the-value-of-hns_roce_hem_chunk_len.patch
+exportfs_decode_fh-negative-pinned-may-become-positi.patch
+audit_get_nd-don-t-unlock-parent-too-early.patch
+nfc-nxp-nci-fix-null-pointer-dereference-after-i2c-c.patch
+input-cyttsp4_core-fix-use-after-free-bug.patch
+alsa-pcm-fix-stream-lock-usage-in-snd_pcm_period_ela.patch
+rsxx-add-missed-destroy_workqueue-calls-in-remove.patch
+net-ep93xx_eth-fix-mismatch-of-request_mem_region-in.patch
+serial-core-allow-processing-sysrq-at-port-unlock-ti.patch
+cxgb4vf-fix-memleak-in-mac_hlist-initialization.patch
+iwlwifi-mvm-send-non-offchannel-traffic-via-ap-sta.patch
+dmaengine-xilinx_dma-fix-64-bit-simple-cdma-transfer.patch
+arm-8813-1-make-aligned-2-byte-getuser-putuser-atomi.patch
+net-mlx5-release-resource-on-error-flow.patch
+pinctrl-sh-pfc-r8a7792-fix-vin-versioned-groups.patch
+extcon-max8997-fix-lack-of-path-setting-in-usb-devic.patch
+clk-rockchip-fix-rk3188-sclk_smc-gate-data.patch
+clk-rockchip-fix-rk3188-sclk_mac_lbtest-parameter-or.patch
+arm-dts-rockchip-fix-rk3288-rock2-vcc_flash-name.patch
+dlm-fix-missing-idr_destroy-for-recover_idr.patch
+mips-sibyte-enable-zone_dma32-for-littlesur.patch
+scsi-zfcp-drop-default-switch-case-which-might-paper.patch
+pinctrl-qcom-ssbi-gpio-fix-gpio-hog-related-boot-iss.patch
+staging-iio-adt7316-fix-i2c-data-reading-set-the-dat.patch
+regulator-fix-return-value-of-_set_load-stub.patch
+iw_cxgb4-only-reconnect-with-mpav1-if-the-peer-abort.patch
+mips-octeon-octeon-platform-fix-typing.patch
+math-emu-soft-fp.h-_fp_round_zero-cast-0-to-void-to-.patch
+rtc-max8997-fix-the-returned-value-in-case-of-error-.patch
+rtc-dt-binding-abx80x-fix-resistance-scale.patch
+arm-dts-exynos-use-samsung-soc-specific-compatible-f.patch
+media-coda-fix-memory-corruption-in-case-more-than-3.patch
+media-pulse8-cec-return-0-when-invalidating-the-logi.patch
+dmaengine-coh901318-fix-a-double-lock-bug.patch
+usb-dwc3-don-t-log-probe-deferrals-but-do-log-other-.patch
+acpi-fix-acpi_find_child_device-invocation-in-acpi_p.patch
+dma-mapping-fix-return-type-of-dma_set_max_seg_size.patch
+altera-stapl-check-for-a-null-key-before-strcasecmp-.patch
+serial-imx-fix-error-handling-in-console_setup.patch
+i2c-imx-don-t-print-error-message-on-probe-defer.patch
+lockd-fix-decoding-of-test-results.patch
+dlm-null-check-before-kmem_cache_destroy-is-not-need.patch
+arm-debug-enable-uart1-for-socfpga-cyclone5.patch
+nfsd-fix-a-warning-in-__cld_pipe_upcall.patch
+arm-omap1-2-fix-soc-name-printing.patch
+net-x25-fix-called-calling-length-calculation-in-x25.patch
+net-x25-fix-null_x25_address-handling.patch
+arm-dts-mmp2-fix-the-gpio-interrupt-cell-number.patch
+arm-dts-realview-pbx-fix-duplicate-regulator-nodes.patch
+tcp-fix-off-by-one-bug-on-aborting-window-probing-so.patch
+tcp-fix-snmp-tcp-timeout-under-estimation.patch
+modpost-skip-elf-local-symbols-during-section-mismat.patch
+kbuild-fix-single-target-build-for-external-module.patch
+mtd-fix-mtd_oobavail-incoherent-returned-value.patch
+arm-dts-pxa-clean-up-usb-controller-nodes.patch
+clk-sunxi-ng-h3-h5-fix-csi_mclk-parent.patch
+arm-dts-realview-fix-some-more-duplicate-regulator-n.patch
+dlm-fix-invalid-cluster-name-warning.patch
+net-mlx4_core-fix-return-codes-of-unsupported-operat.patch
+powerpc-math-emu-update-macros-from-gcc.patch
+mips-octeon-cvmx_pko_mem_debug8-use-oldest-forward-c.patch
+nfsd-return-eperm-not-eacces-in-some-setattr-cases.patch
+tty-don-t-block-on-io-when-ldisc-change-is-pending.patch
+media-stkwebcam-bugfix-for-wrong-return-values.patch
+mlx4-use-snprintf-instead-of-complicated-strcpy.patch
+arm-dts-sunxi-fix-pmu-compatible-strings.patch
diff --git a/queue-4.9/staging-iio-adt7316-fix-i2c-data-reading-set-the-dat.patch b/queue-4.9/staging-iio-adt7316-fix-i2c-data-reading-set-the-dat.patch
new file mode 100644 (file)
index 0000000..300fe37
--- /dev/null
@@ -0,0 +1,39 @@
+From 0102b0a20444a28b6d542cefe8d514235436e58e Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 17 Nov 2018 04:19:07 +0530
+Subject: Staging: iio: adt7316: Fix i2c data reading, set the data field
+
+From: Shreeya Patel <shreeya.patel23498@gmail.com>
+
+[ Upstream commit 688cd642ba0c393344c802647848da5f0d925d0e ]
+
+adt7316_i2c_read function nowhere sets the data field.
+It is necessary to have an appropriate value for it.
+Hence, assign the value stored in 'ret' variable to data field.
+
+This is an ancient bug, and as no one seems to have noticed,
+probably no sense in applying it to stable.
+
+Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/staging/iio/addac/adt7316-i2c.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/staging/iio/addac/adt7316-i2c.c b/drivers/staging/iio/addac/adt7316-i2c.c
+index 0ccf192b9a032..5950225e45d15 100644
+--- a/drivers/staging/iio/addac/adt7316-i2c.c
++++ b/drivers/staging/iio/addac/adt7316-i2c.c
+@@ -35,6 +35,8 @@ static int adt7316_i2c_read(void *client, u8 reg, u8 *data)
+               return ret;
+       }
++      *data = ret;
++
+       return 0;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/tcp-fix-off-by-one-bug-on-aborting-window-probing-so.patch b/queue-4.9/tcp-fix-off-by-one-bug-on-aborting-window-probing-so.patch
new file mode 100644 (file)
index 0000000..830a0ab
--- /dev/null
@@ -0,0 +1,38 @@
+From dc3ac51b956b8244f7f9416b6e3395c55647d8e2 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Nov 2018 16:06:43 -0800
+Subject: tcp: fix off-by-one bug on aborting window-probing socket
+
+From: Yuchung Cheng <ycheng@google.com>
+
+[ Upstream commit 3976535af0cb9fe34a55f2ffb8d7e6b39a2f8188 ]
+
+Previously there is an off-by-one bug on determining when to abort
+a stalled window-probing socket. This patch fixes that so it is
+consistent with tcp_write_timeout().
+
+Signed-off-by: Yuchung Cheng <ycheng@google.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Neal Cardwell <ncardwell@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/tcp_timer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
+index d9e364c4863af..ad0083f7b5dd3 100644
+--- a/net/ipv4/tcp_timer.c
++++ b/net/ipv4/tcp_timer.c
+@@ -372,7 +372,7 @@ static void tcp_probe_timer(struct sock *sk)
+                       return;
+       }
+-      if (icsk->icsk_probes_out > max_probes) {
++      if (icsk->icsk_probes_out >= max_probes) {
+ abort:                tcp_write_err(sk);
+       } else {
+               /* Only send another probe if we didn't close things up. */
+-- 
+2.20.1
+
diff --git a/queue-4.9/tcp-fix-snmp-tcp-timeout-under-estimation.patch b/queue-4.9/tcp-fix-snmp-tcp-timeout-under-estimation.patch
new file mode 100644 (file)
index 0000000..680f49c
--- /dev/null
@@ -0,0 +1,62 @@
+From 25e2e0205e1c7729e300e8b3510c0c28ba746ec9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 28 Nov 2018 16:06:45 -0800
+Subject: tcp: fix SNMP TCP timeout under-estimation
+
+From: Yuchung Cheng <ycheng@google.com>
+
+[ Upstream commit e1561fe2dd69dc5dddd69bd73aa65355bdfb048b ]
+
+Previously the SNMP TCPTIMEOUTS counter has inconsistent accounting:
+1. It counts all SYN and SYN-ACK timeouts
+2. It counts timeouts in other states except recurring timeouts and
+   timeouts after fast recovery or disorder state.
+
+Such selective accounting makes analysis difficult and complicated. For
+example the monitoring system needs to collect many other SNMP counters
+to infer the total amount of timeout events. This patch makes TCPTIMEOUTS
+counter simply counts all the retransmit timeout (SYN or data or FIN).
+
+Signed-off-by: Yuchung Cheng <ycheng@google.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: Neal Cardwell <ncardwell@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/ipv4/tcp_timer.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
+index ad0083f7b5dd3..761a198ed5f30 100644
+--- a/net/ipv4/tcp_timer.c
++++ b/net/ipv4/tcp_timer.c
+@@ -478,11 +478,12 @@ void tcp_retransmit_timer(struct sock *sk)
+               goto out_reset_timer;
+       }
++      __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPTIMEOUTS);
+       if (tcp_write_timeout(sk))
+               goto out;
+       if (icsk->icsk_retransmits == 0) {
+-              int mib_idx;
++              int mib_idx = 0;
+               if (icsk->icsk_ca_state == TCP_CA_Recovery) {
+                       if (tcp_is_sack(tp))
+@@ -497,10 +498,9 @@ void tcp_retransmit_timer(struct sock *sk)
+                               mib_idx = LINUX_MIB_TCPSACKFAILURES;
+                       else
+                               mib_idx = LINUX_MIB_TCPRENOFAILURES;
+-              } else {
+-                      mib_idx = LINUX_MIB_TCPTIMEOUTS;
+               }
+-              __NET_INC_STATS(sock_net(sk), mib_idx);
++              if (mib_idx)
++                      __NET_INC_STATS(sock_net(sk), mib_idx);
+       }
+       tcp_enter_loss(sk);
+-- 
+2.20.1
+
diff --git a/queue-4.9/tty-don-t-block-on-io-when-ldisc-change-is-pending.patch b/queue-4.9/tty-don-t-block-on-io-when-ldisc-change-is-pending.patch
new file mode 100644 (file)
index 0000000..f521669
--- /dev/null
@@ -0,0 +1,161 @@
+From 2b7f03c1cccab346d2dd92a2ea032b8f0230fab3 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Thu, 1 Nov 2018 00:24:48 +0000
+Subject: tty: Don't block on IO when ldisc change is pending
+
+From: Dmitry Safonov <dima@arista.com>
+
+[ Upstream commit c96cf923a98d1b094df9f0cf97a83e118817e31b ]
+
+There might be situations where tty_ldisc_lock() has blocked, but there
+is already IO on tty and it prevents line discipline changes.
+It might theoretically turn into dead-lock.
+
+Basically, provide more priority to pending tty_ldisc_lock() than to
+servicing reads/writes over tty.
+
+User-visible issue was reported by Mikulas where on pa-risc with
+Debian 5 reboot took either 80 seconds, 3 minutes or 3:25 after proper
+locking in tty_reopen().
+
+Cc: Jiri Slaby <jslaby@suse.com>
+Reported-by: Mikulas Patocka <mpatocka@redhat.com>
+Signed-off-by: Dmitry Safonov <dima@arista.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/tty/n_hdlc.c    | 4 ++--
+ drivers/tty/n_r3964.c   | 2 +-
+ drivers/tty/n_tty.c     | 8 ++++----
+ drivers/tty/tty_ldisc.c | 7 +++++++
+ include/linux/tty.h     | 7 +++++++
+ 5 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
+index 8d6253903f24f..0c12dec110bc4 100644
+--- a/drivers/tty/n_hdlc.c
++++ b/drivers/tty/n_hdlc.c
+@@ -614,7 +614,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
+               }
+                       
+               /* no data */
+-              if (file->f_flags & O_NONBLOCK) {
++              if (tty_io_nonblock(tty, file)) {
+                       ret = -EAGAIN;
+                       break;
+               }
+@@ -681,7 +681,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
+               if (tbuf)
+                       break;
+-              if (file->f_flags & O_NONBLOCK) {
++              if (tty_io_nonblock(tty, file)) {
+                       error = -EAGAIN;
+                       break;
+               }
+diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c
+index 345111467b850..ee0e07b4a13d0 100644
+--- a/drivers/tty/n_r3964.c
++++ b/drivers/tty/n_r3964.c
+@@ -1080,7 +1080,7 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
+               pMsg = remove_msg(pInfo, pClient);
+               if (pMsg == NULL) {
+                       /* no messages available. */
+-                      if (file->f_flags & O_NONBLOCK) {
++                      if (tty_io_nonblock(tty, file)) {
+                               ret = -EAGAIN;
+                               goto unlock;
+                       }
+diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
+index 904fc9c37fdea..8214b0326b3a1 100644
+--- a/drivers/tty/n_tty.c
++++ b/drivers/tty/n_tty.c
+@@ -1704,7 +1704,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
+       down_read(&tty->termios_rwsem);
+-      while (1) {
++      do {
+               /*
+                * When PARMRK is set, each input char may take up to 3 chars
+                * in the read buf; reduce the buffer space avail by 3x
+@@ -1746,7 +1746,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
+                       fp += n;
+               count -= n;
+               rcvd += n;
+-      }
++      } while (!test_bit(TTY_LDISC_CHANGING, &tty->flags));
+       tty->receive_room = room;
+@@ -2213,7 +2213,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
+                                       break;
+                               if (!timeout)
+                                       break;
+-                              if (file->f_flags & O_NONBLOCK) {
++                              if (tty_io_nonblock(tty, file)) {
+                                       retval = -EAGAIN;
+                                       break;
+                               }
+@@ -2367,7 +2367,7 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
+               }
+               if (!nr)
+                       break;
+-              if (file->f_flags & O_NONBLOCK) {
++              if (tty_io_nonblock(tty, file)) {
+                       retval = -EAGAIN;
+                       break;
+               }
+diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
+index 3eb3f2a03bbb9..706faca834f27 100644
+--- a/drivers/tty/tty_ldisc.c
++++ b/drivers/tty/tty_ldisc.c
+@@ -348,6 +348,11 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
+ {
+       int ret;
++      /* Kindly asking blocked readers to release the read side */
++      set_bit(TTY_LDISC_CHANGING, &tty->flags);
++      wake_up_interruptible_all(&tty->read_wait);
++      wake_up_interruptible_all(&tty->write_wait);
++
+       ret = __tty_ldisc_lock(tty, timeout);
+       if (!ret)
+               return -EBUSY;
+@@ -358,6 +363,8 @@ int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout)
+ void tty_ldisc_unlock(struct tty_struct *tty)
+ {
+       clear_bit(TTY_LDISC_HALTED, &tty->flags);
++      /* Can be cleared here - ldisc_unlock will wake up writers firstly */
++      clear_bit(TTY_LDISC_CHANGING, &tty->flags);
+       __tty_ldisc_unlock(tty);
+ }
+diff --git a/include/linux/tty.h b/include/linux/tty.h
+index fe1b8623a3a1f..fe483976b1193 100644
+--- a/include/linux/tty.h
++++ b/include/linux/tty.h
+@@ -356,6 +356,7 @@ struct tty_file_private {
+ #define TTY_NO_WRITE_SPLIT    17      /* Preserve write boundaries to driver */
+ #define TTY_HUPPED            18      /* Post driver->hangup() */
+ #define TTY_HUPPING           19      /* Hangup in progress */
++#define TTY_LDISC_CHANGING    20      /* Change pending - non-block IO */
+ #define TTY_LDISC_HALTED      22      /* Line discipline is halted */
+ /* Values for tty->flow_change */
+@@ -373,6 +374,12 @@ static inline void tty_set_flow_change(struct tty_struct *tty, int val)
+       smp_mb();
+ }
++static inline bool tty_io_nonblock(struct tty_struct *tty, struct file *file)
++{
++      return file->f_flags & O_NONBLOCK ||
++              test_bit(TTY_LDISC_CHANGING, &tty->flags);
++}
++
+ static inline bool tty_io_error(struct tty_struct *tty)
+ {
+       return test_bit(TTY_IO_ERROR, &tty->flags);
+-- 
+2.20.1
+
diff --git a/queue-4.9/usb-dwc3-don-t-log-probe-deferrals-but-do-log-other-.patch b/queue-4.9/usb-dwc3-don-t-log-probe-deferrals-but-do-log-other-.patch
new file mode 100644 (file)
index 0000000..bbd10d6
--- /dev/null
@@ -0,0 +1,37 @@
+From 50c97e3573d3169ab0f44cbb70eee27ae13e7221 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 7 Nov 2018 12:40:29 -0800
+Subject: usb: dwc3: don't log probe deferrals; but do log other error codes
+
+From: Brian Norris <briannorris@chromium.org>
+
+[ Upstream commit 408d3ba006af57380fa48858b39f72fde6405031 ]
+
+It's not very useful to repeat a bunch of probe deferral errors. And
+it's also not very useful to log "failed" without telling the error
+code.
+
+Signed-off-by: Brian Norris <briannorris@chromium.org>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/usb/dwc3/core.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
+index 7154a93f01143..30bc5996a2f23 100644
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -1102,7 +1102,8 @@ static int dwc3_probe(struct platform_device *pdev)
+       ret = dwc3_core_init(dwc);
+       if (ret) {
+-              dev_err(dev, "failed to initialize core\n");
++              if (ret != -EPROBE_DEFER)
++                      dev_err(dev, "failed to initialize core: %d\n", ret);
+               goto err4;
+       }
+-- 
+2.20.1
+