The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 77b6ec01c29aade01701aa30bf1469acc7f2be76 Mon Sep 17 00:00:00 2001
From: Tom Rix <trix(a)redhat.com>
Date: Tue, 5 Jan 2021 12:21:26 -0800
Subject: [PATCH] cifs: check pointer before freeing
clang static analysis reports this problem
dfs_cache.c:591:2: warning: Argument to kfree() is a constant address
(18446744073709551614), which is not memory allocated by malloc()
kfree(vi);
^~~~~~~~~
In dfs_cache_del_vol() the volume info pointer 'vi' being freed
is the return of a call to find_vol(). The large constant address
is find_vol() returning an error.
Add an error check to dfs_cache_del_vol() similar to the one done
in dfs_cache_update_vol().
Fixes: 54be1f6c1c37 ("cifs: Add DFS cache routines")
Signed-off-by: Tom Rix <trix(a)redhat.com>
Reviewed-by: Nathan Chancellor <natechancellor(a)gmail.com>
CC: <stable(a)vger.kernel.org> # v5.0+
Signed-off-by: Steve French <stfrench(a)microsoft.com>
diff --git a/fs/cifs/dfs_cache.c b/fs/cifs/dfs_cache.c
index 6ad6ba5f6ebe..0fdb0de7ff86 100644
--- a/fs/cifs/dfs_cache.c
+++ b/fs/cifs/dfs_cache.c
@@ -1260,7 +1260,8 @@ void dfs_cache_del_vol(const char *fullpath)
vi = find_vol(fullpath);
spin_unlock(&vol_list_lock);
- kref_put(&vi->refcnt, vol_release);
+ if (!IS_ERR(vi))
+ kref_put(&vi->refcnt, vol_release);
}
/**
This is the start of the stable review cycle for the 4.19.169 release.
There are 43 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 20 Jan 2021 11:33:23 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.169-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.169-rc1
Olaf Hering <olaf(a)aepfle.de>
kbuild: enforce -Werror=return-type
Dinghao Liu <dinghao.liu(a)zju.edu.cn>
netfilter: nf_nat: Fix memleak in nf_nat_init
Jesper Dangaard Brouer <brouer(a)redhat.com>
netfilter: conntrack: fix reading nf_conntrack_buckets
Geert Uytterhoeven <geert+renesas(a)glider.be>
ALSA: fireface: Fix integer overflow in transmit_midi_msg()
Geert Uytterhoeven <geert+renesas(a)glider.be>
ALSA: firewire-tascam: Fix integer overflow in midi_port_work()
Mike Snitzer <snitzer(a)redhat.com>
dm: eliminate potential source of excessive kernel log noise
j.nixdorf(a)avm.de <j.nixdorf(a)avm.de>
net: sunrpc: interpret the return value of kstrtou32 correctly
Jann Horn <jannh(a)google.com>
mm, slub: consider rest of partial list if acquire_slab() fails
Mark Bloch <mbloch(a)nvidia.com>
RDMA/mlx5: Fix wrong free of blue flame register on error
Dinghao Liu <dinghao.liu(a)zju.edu.cn>
RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp
Jan Kara <jack(a)suse.cz>
ext4: fix superblock checksum failure when setting password salt
Trond Myklebust <trond.myklebust(a)hammerspace.com>
NFS: nfs_igrab_and_active must first reference the superblock
Trond Myklebust <trond.myklebust(a)hammerspace.com>
NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
Trond Myklebust <trond.myklebust(a)hammerspace.com>
pNFS: Mark layout for return if return-on-close was not sent
Dave Wysochanski <dwysocha(a)redhat.com>
NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock
Dan Carpenter <dan.carpenter(a)oracle.com>
ASoC: Intel: fix error code cnl_set_dsp_D0()
Jerome Brunet <jbrunet(a)baylibre.com>
ASoC: meson: axg-tdm-interface: fix loopback
Al Viro <viro(a)zeniv.linux.org.uk>
dump_common_audit_data(): fix racy accesses to ->d_name
Roberto Sassu <roberto.sassu(a)huawei.com>
ima: Remove __init annotation from ima_pcrread()
Arnd Bergmann <arnd(a)arndb.de>
ARM: picoxcell: fix missing interrupt-parent properties
Craig Tatlor <ctatlor97(a)gmail.com>
drm/msm: Call msm_init_vram before binding the gpu
Shawn Guo <shawn.guo(a)linaro.org>
ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI
Michael Ellerman <mpe(a)ellerman.id.au>
net: ethernet: fs_enet: Add missing MODULE_LICENSE
Arnd Bergmann <arnd(a)arndb.de>
misdn: dsp: select CONFIG_BITREVERSE
Randy Dunlap <rdunlap(a)infradead.org>
arch/arc: add copy_user_page() to <asm/page.h> to fix build error on ARC
Jan Kara <jack(a)suse.cz>
bfq: Fix computation of shallow depth
Rasmus Villemoes <rasmus.villemoes(a)prevas.dk>
ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram
Filipe Manana <fdmanana(a)suse.com>
btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan
Masahiro Yamada <masahiroy(a)kernel.org>
ARC: build: add boot_targets to PHONY
Masahiro Yamada <masahiroy(a)kernel.org>
ARC: build: add uImage.lzma to the top-level target
Masahiro Yamada <masahiroy(a)kernel.org>
ARC: build: remove non-existing bootpImage from KBUILD_IMAGE
yangerkun <yangerkun(a)huawei.com>
ext4: fix bug for rename with RENAME_WHITEOUT
Leon Schuermann <leon(a)is.currently.online>
r8152: Add Lenovo Powered USB-C Travel Hub
Mikulas Patocka <mpatocka(a)redhat.com>
dm integrity: fix the maximum number of arguments
Akilesh Kailash <akailash(a)google.com>
dm snapshot: flush merged data before committing metadata
Miaohe Lin <linmiaohe(a)huawei.com>
mm/hugetlb: fix potential missing huge page size info
Dexuan Cui <decui(a)microsoft.com>
ACPI: scan: Harden acpi_device_add() against device ID overflows
Alexander Lobakin <alobakin(a)pm.me>
MIPS: relocatable: fix possible boot hangup with KASLR enabled
Al Viro <viro(a)zeniv.linux.org.uk>
MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps
Paul Cercueil <paul(a)crapouillou.net>
MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
Masami Hiramatsu <mhiramat(a)kernel.org>
tracing/kprobes: Do the notrace functions check without kprobes on ftrace
Wei Liu <wei.liu(a)kernel.org>
x86/hyperv: check cpu mask after interrupt has been disabled
Thomas Hebb <tommyhebb(a)gmail.com>
ASoC: dapm: remove widget from dirty list on free
-------------
Diffstat:
Makefile | 6 +++---
arch/arc/Makefile | 9 ++------
arch/arc/include/asm/page.h | 1 +
arch/arm/boot/dts/picoxcell-pc3x2.dtsi | 4 ++++
arch/mips/boot/compressed/decompress.c | 3 ++-
arch/mips/kernel/binfmt_elfn32.c | 7 +++++++
arch/mips/kernel/binfmt_elfo32.c | 7 +++++++
arch/mips/kernel/relocate.c | 10 +++++++--
arch/x86/hyperv/mmu.c | 12 ++++++++---
block/bfq-iosched.c | 8 ++++----
drivers/acpi/internal.h | 2 +-
drivers/acpi/scan.c | 15 +++++++++++++-
drivers/gpu/drm/msm/msm_drv.c | 8 ++++----
drivers/infiniband/hw/mlx5/main.c | 2 +-
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 3 +++
drivers/isdn/mISDN/Kconfig | 1 +
drivers/md/dm-integrity.c | 2 +-
drivers/md/dm-snap.c | 24 ++++++++++++++++++++++
drivers/md/dm.c | 2 +-
.../net/ethernet/freescale/fs_enet/mii-bitbang.c | 1 +
drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 1 +
drivers/net/ethernet/freescale/ucc_geth.h | 9 +++++++-
drivers/net/usb/cdc_ether.c | 7 +++++++
drivers/net/usb/r8152.c | 1 +
fs/btrfs/qgroup.c | 13 +++++++++---
fs/btrfs/super.c | 8 ++++++++
fs/ext4/ioctl.c | 3 +++
fs/ext4/namei.c | 16 ++++++++-------
fs/nfs/internal.h | 12 ++++++-----
fs/nfs/nfs4proc.c | 2 +-
fs/nfs/pnfs.c | 7 +++++++
include/linux/acpi.h | 7 +++++++
kernel/trace/Kconfig | 2 +-
kernel/trace/trace_kprobe.c | 2 +-
mm/hugetlb.c | 2 +-
mm/slub.c | 2 +-
net/netfilter/nf_conntrack_standalone.c | 3 +++
net/netfilter/nf_nat_core.c | 1 +
net/sunrpc/addr.c | 2 +-
security/integrity/ima/ima_crypto.c | 2 +-
security/lsm_audit.c | 7 +++++--
sound/firewire/fireface/ff-transaction.c | 2 +-
sound/firewire/tascam/tascam-transaction.c | 2 +-
sound/soc/intel/skylake/cnl-sst.c | 1 +
sound/soc/meson/axg-tdm-interface.c | 14 ++++++++++++-
sound/soc/soc-dapm.c | 1 +
46 files changed, 199 insertions(+), 57 deletions(-)
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 698222457465ce343443be81c5512edda86e5914 Mon Sep 17 00:00:00 2001
From: Al Viro <viro(a)zeniv.linux.org.uk>
Date: Thu, 24 Dec 2020 19:44:38 +0000
Subject: [PATCH] MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps
Patches that introduced NT_FILE and NT_SIGINFO notes back in 2012
had taken care of native (fs/binfmt_elf.c) and compat (fs/compat_binfmt_elf.c)
coredumps; unfortunately, compat on mips (which does not go through the
usual compat_binfmt_elf.c) had not been noticed.
As the result, both N32 and O32 coredumps on 64bit mips kernels
have those sections malformed enough to confuse the living hell out of
all gdb and readelf versions (up to and including the tip of binutils-gdb.git).
Longer term solution is to make both O32 and N32 compat use the
regular compat_binfmt_elf.c, but that's too much for backports. The minimal
solution is to do in arch/mips/kernel/binfmt_elf[on]32.c the same thing
those patches have done in fs/compat_binfmt_elf.c
Cc: stable(a)kernel.org # v3.7+
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend(a)alpha.franken.de>
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
index 6ee3f7218c67..c4441416e96b 100644
--- a/arch/mips/kernel/binfmt_elfn32.c
+++ b/arch/mips/kernel/binfmt_elfn32.c
@@ -103,4 +103,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32
+/*
+ * Some data types as stored in coredump.
+ */
+#define user_long_t compat_long_t
+#define user_siginfo_t compat_siginfo_t
+#define copy_siginfo_to_external copy_siginfo_to_external32
+
#include "../../../fs/binfmt_elf.c"
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
index 6dd103d3cebb..7b2a23f48c1a 100644
--- a/arch/mips/kernel/binfmt_elfo32.c
+++ b/arch/mips/kernel/binfmt_elfo32.c
@@ -106,4 +106,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32
+/*
+ * Some data types as stored in coredump.
+ */
+#define user_long_t compat_long_t
+#define user_siginfo_t compat_siginfo_t
+#define copy_siginfo_to_external copy_siginfo_to_external32
+
#include "../../../fs/binfmt_elf.c"
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 698222457465ce343443be81c5512edda86e5914 Mon Sep 17 00:00:00 2001
From: Al Viro <viro(a)zeniv.linux.org.uk>
Date: Thu, 24 Dec 2020 19:44:38 +0000
Subject: [PATCH] MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps
Patches that introduced NT_FILE and NT_SIGINFO notes back in 2012
had taken care of native (fs/binfmt_elf.c) and compat (fs/compat_binfmt_elf.c)
coredumps; unfortunately, compat on mips (which does not go through the
usual compat_binfmt_elf.c) had not been noticed.
As the result, both N32 and O32 coredumps on 64bit mips kernels
have those sections malformed enough to confuse the living hell out of
all gdb and readelf versions (up to and including the tip of binutils-gdb.git).
Longer term solution is to make both O32 and N32 compat use the
regular compat_binfmt_elf.c, but that's too much for backports. The minimal
solution is to do in arch/mips/kernel/binfmt_elf[on]32.c the same thing
those patches have done in fs/compat_binfmt_elf.c
Cc: stable(a)kernel.org # v3.7+
Signed-off-by: Al Viro <viro(a)zeniv.linux.org.uk>
Signed-off-by: Thomas Bogendoerfer <tsbogend(a)alpha.franken.de>
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
index 6ee3f7218c67..c4441416e96b 100644
--- a/arch/mips/kernel/binfmt_elfn32.c
+++ b/arch/mips/kernel/binfmt_elfn32.c
@@ -103,4 +103,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32
+/*
+ * Some data types as stored in coredump.
+ */
+#define user_long_t compat_long_t
+#define user_siginfo_t compat_siginfo_t
+#define copy_siginfo_to_external copy_siginfo_to_external32
+
#include "../../../fs/binfmt_elf.c"
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
index 6dd103d3cebb..7b2a23f48c1a 100644
--- a/arch/mips/kernel/binfmt_elfo32.c
+++ b/arch/mips/kernel/binfmt_elfo32.c
@@ -106,4 +106,11 @@ jiffies_to_old_timeval32(unsigned long jiffies, struct old_timeval32 *value)
#undef ns_to_kernel_old_timeval
#define ns_to_kernel_old_timeval ns_to_old_timeval32
+/*
+ * Some data types as stored in coredump.
+ */
+#define user_long_t compat_long_t
+#define user_siginfo_t compat_siginfo_t
+#define copy_siginfo_to_external copy_siginfo_to_external32
+
#include "../../../fs/binfmt_elf.c"
The use of PHY_REFCLK_USE_PAD introduced a regression for apq8064
devices. It was tested that while apq doesn't require the padding, ipq
SoC must use it or the kernel hangs on boot.
Fixes: de3c4bf6489 ("PCI: qcom: Add support for tx term offset for rev 2.1.0")
Reported-by: Ilia Mirkin <imirkin(a)alum.mit.edu>
Signed-off-by: Ilia Mirkin <imirkin(a)alum.mit.edu>
Signed-off-by: Ansuel Smith <ansuelsmth(a)gmail.com>
Cc: stable(a)vger.kernel.org # v4.19+
---
drivers/pci/controller/dwc/pcie-qcom.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 3aac77a295ba..dad6e9ce66ba 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -387,7 +387,9 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
/* enable external reference clock */
val = readl(pcie->parf + PCIE20_PARF_PHY_REFCLK);
- val &= ~PHY_REFCLK_USE_PAD;
+ /* USE_PAD is required only for ipq806x */
+ if (!of_device_is_compatible(node, "qcom,pcie-apq8064"))
+ val &= ~PHY_REFCLK_USE_PAD;
val |= PHY_REFCLK_SSP_EN;
writel(val, pcie->parf + PCIE20_PARF_PHY_REFCLK);
--
2.27.0