2019-05-23 19:43:27

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 000/139] 5.0.19-stable review

This is the start of the stable review cycle for the 5.0.19 release.
There are 139 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 Sat 25 May 2019 06:14:53 PM UTC.
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/v5.x/stable-review/patch-5.0.19-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <[email protected]>
Linux 5.0.19-rc1

Daniel Borkmann <[email protected]>
bpf, lru: avoid messing with eviction heuristics upon syscall lookup

Daniel Borkmann <[email protected]>
bpf: add map_lookup_elem_sys_only for lookups from syscall side

Chenbo Feng <[email protected]>
bpf: relax inode permission check for retrieving bpf program

John Garry <[email protected]>
driver core: Postpone DMA tear-down until after devres release for probe failure

Nigel Croxon <[email protected]>
md/raid: raid5 preserve the writeback action after the parity check

Song Liu <[email protected]>
Revert "Don't jump to compute_result state from check_result state"

Jiri Olsa <[email protected]>
perf/x86/intel: Fix race in intel_pmu_disable_event()

Leo Yan <[email protected]>
perf cs-etm: Always allocate memory for cs_etm_queue::prev_packet

Arnaldo Carvalho de Melo <[email protected]>
perf bench numa: Add define for RUSAGE_THREAD if not present

Wolfram Sang <[email protected]>
i2c: designware: ratelimit 'transfer when suspended' errors

Al Viro <[email protected]>
ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour

Vitaly Kuznetsov <[email protected]>
KVM: selftests: make hyperv_cpuid test pass on AMD

Paolo Bonzini <[email protected]>
KVM: fix KVM_CLEAR_DIRTY_LOG for memory slots of unaligned size

Gary Hook <[email protected]>
x86/mm/mem_encrypt: Disable all instrumentation for early SME setup

Tobin C. Harding <[email protected]>
sched/cpufreq: Fix kobject memleak

Luca Coelho <[email protected]>
iwlwifi: mvm: check for length correctness in iwl_mvm_create_skb()

Bjørn Mork <[email protected]>
qmi_wwan: new Wistron, ZTE and D-Link devices

Peter Zijlstra <[email protected]>
bpf: Fix preempt_enable_no_resched() abuse

Alban Crequy <[email protected]>
tools: bpftool: fix infinite loop in map create

Andrey Smirnov <[email protected]>
power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG

Andrew Jones <[email protected]>
KVM: arm/arm64: Ensure vcpu target is unset on reset failure

Kangjie Lu <[email protected]>
net: ieee802154: fix missing checks for regmap_update_bits

Bhagavathi Perumal S <[email protected]>
mac80211: Fix kernel panic due to use of txq after free

Vitaly Kuznetsov <[email protected]>
x86: kvm: hyper-v: deal with buggy TLB flush requests from WS2012

Logan Gunthorpe <[email protected]>
PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored

Al Viro <[email protected]>
apparmorfs: fix use-after-free on symlink traversal

Al Viro <[email protected]>
securityfs: fix use-after-free on symlink traversal

Tony Lindgren <[email protected]>
power: supply: cpcap-battery: Fix division by zero

Alexey Kardashevskiy <[email protected]>
KVM: PPC: Book3S: Protect memslots while validating user address

Suraj Jitindar Singh <[email protected]>
KVM: PPC: Book3S HV: Perserve PSSCR FAKE_SUSPEND bit on guest exit

Jernej Skrabec <[email protected]>
clk: sunxi-ng: nkmp: Avoid GENMASK(-1, 0)

Vineet Gupta <[email protected]>
ARC: PAE40: don't panic and instead turn off hw ioc

Steffen Klassert <[email protected]>
xfrm4: Fix uninitialized memory read in _decode_session4

Martin Willi <[email protected]>
xfrm: Honor original L3 slave device in xfrmi policy lookup

Sabrina Dubroca <[email protected]>
esp4: add length check for UDP encapsulation

Cong Wang <[email protected]>
xfrm: clean up xfrm protocol checks

Jeremy Sowden <[email protected]>
vti4: ipip tunnel deregistration fixes.

Su Yanjun <[email protected]>
xfrm6_tunnel: Fix potential panic when unloading xfrm6_tunnel module

Myungho Jung <[email protected]>
xfrm: Reset secpath in xfrm failure

YueHaibing <[email protected]>
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink

Kirill Smelkov <[email protected]>
fuse: Add FOPEN_STREAM to use stream_open()

Martin Wilck <[email protected]>
dm mpath: always free attached_handler_name in parse_path()

Mikulas Patocka <[email protected]>
dm integrity: correctly calculate the size of metadata area

Milan Broz <[email protected]>
dm crypt: move detailed message into debug level

Mikulas Patocka <[email protected]>
dm delay: fix a crash when invalid device is specified

Damien Le Moal <[email protected]>
dm zoned: Fix zone report handling

Nikos Tsironis <[email protected]>
dm cache metadata: Fix loading discard bitset

Stefan Mätje <[email protected]>
PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum

Stefan Mätje <[email protected]>
PCI: Factor out pcie_retrain_link() function

Kazufumi Ikeda <[email protected]>
PCI: rcar: Add the initialization of PCIe link in resume_noirq()

Jisheng Zhang <[email protected]>
PCI/AER: Change pci_aer_init() stub to return void

Jean-Philippe Brucker <[email protected]>
PCI: Init PCIe feature bits for managed host bridge alloc

Lyude Paul <[email protected]>
PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary

James Prestwood <[email protected]>
PCI: Mark Atheros AR9462 to avoid bus reset

Nikolai Kostrigin <[email protected]>
PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken

Yifeng Li <[email protected]>
fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting

Yifeng Li <[email protected]>
fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display

Yifeng Li <[email protected]>
fbdev: sm712fb: fix support for 1024x768-16 mode

Yifeng Li <[email protected]>
fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM

Yifeng Li <[email protected]>
fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA

Yifeng Li <[email protected]>
fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F

Yifeng Li <[email protected]>
fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75

Yifeng Li <[email protected]>
fbdev: sm712fb: fix brightness control on reboot, don't set SR30

Ard Biesheuvel <[email protected]>
fbdev/efifb: Ignore framebuffer memmap entries that lack any memory types

Dave Hansen <[email protected]>
x86/mpx, mm/core: Fix recursive munmap() corruption

Nathan Chancellor <[email protected]>
objtool: Allow AR to be overridden with HOSTAR

Florian Fainelli <[email protected]>
MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled

Adrian Hunter <[email protected]>
perf intel-pt: Fix sample timestamp wrt non-taken branches

Adrian Hunter <[email protected]>
perf intel-pt: Fix improved sample timestamp

Adrian Hunter <[email protected]>
perf intel-pt: Fix instructions sampling rate

Dmitry Osipenko <[email protected]>
memory: tegra: Fix integer overflow on tick value calculation

Masami Hiramatsu <[email protected]>
tracing: probeevent: Fix to make the type of $comm string

Elazar Leibovich <[email protected]>
tracing: Fix partial reading of trace event's id file

Peter Zijlstra <[email protected]>
ftrace/x86_64: Emulate call function while updating in breakpoint handler

Peter Zijlstra <[email protected]>
x86_64: Allow breakpoints to emulate call instructions

Josh Poimboeuf <[email protected]>
x86_64: Add gap to int3 to allow for call emulation

Jeff Layton <[email protected]>
ceph: flush dirty inodes before proceeding with remount

Dmitry Osipenko <[email protected]>
iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114

Chris Packham <[email protected]>
gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6

Amir Goldstein <[email protected]>
ovl: fix missing upper fs freeze protection on copy up for ioctl

Liu Bo <[email protected]>
fuse: honor RLIMIT_FSIZE in fuse_file_fallocate

Miklos Szeredi <[email protected]>
fuse: fix writepages on 32bit

Mikulas Patocka <[email protected]>
udlfb: introduce a rendering mutex

Mikulas Patocka <[email protected]>
udlfb: fix sleeping inside spinlock

Mikulas Patocka <[email protected]>
udlfb: delete the unused parameter for dlfb_handle_damage

Jonas Karlman <[email protected]>
clk: rockchip: fix wrong clock definitions for rk3328

Owen Chen <[email protected]>
clk: mediatek: Disable tuner_en before change PLL rate

Dmitry Osipenko <[email protected]>
clk: tegra: Fix PLLM programming on Tegra124+ when PMC overrides divider

Leo Yan <[email protected]>
clk: hi3660: Mark clk_gate_ufs_subsys as critical

Olga Kornievskaia <[email protected]>
PNFS fallback to MDS if no deviceid found

ZhangXiaoxu <[email protected]>
NFS4: Fix v4.0 client state corruption when mount

Leon Romanovsky <[email protected]>
RDMA/ipoib: Allow user space differentiate between valid dev_port

Jason Gunthorpe <[email protected]>
RDMA/mlx5: Use get_zeroed_page() for clock_info

Steve Longerbeam <[email protected]>
media: imx: Clear fwnode link struct for each endpoint iteration

Steve Longerbeam <[email protected]>
media: imx: csi: Allow unknown nearest upstream entities

Janusz Krzysztofik <[email protected]>
media: ov6650: Fix sensor possibly not detected on probe

Colin Ian King <[email protected]>
phy: ti-pipe3: fix missing bit-wise or operator when assigning val

Christoph Probst <[email protected]>
cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level()

Hans de Goede <[email protected]>
brcmfmac: Add DMI nvram filename quirk for ACEPC T8 and T11 mini PCs

Phong Tran <[email protected]>
of: fix clang -Wunsequenced for be32_to_cpu()

Pan Bian <[email protected]>
p54: drop device reference count if fails to enable device

Alexander Shishkin <[email protected]>
intel_th: msu: Fix single mode with IOMMU

Al Viro <[email protected]>
dcache: sort the freeing-without-RCU-delay mess for good.

Christoph Hellwig <[email protected]>
md: add a missing endianness conversion in check_sb_changes

Yufen Yu <[email protected]>
md: add mddev->pers to avoid potential NULL pointer dereference

NeilBrown <[email protected]>
md: batch flush requests.

NeilBrown <[email protected]>
Revert "MD: fix lock contention for flush bios"

Paul Moore <[email protected]>
proc: prevent changes to overridden credentials

Hou Tao <[email protected]>
brd: re-enable __GFP_HIGHMEM in brd_insert_page()

Alexander Shishkin <[email protected]>
stm class: Fix channel bitmap on 32-bit systems

Tingwei Zhang <[email protected]>
stm class: Fix channel free in stm output free path

Helge Deller <[email protected]>
parisc: Rename LEVEL to PA_ASM_LEVEL to avoid name clash with DRBD code

Helge Deller <[email protected]>
parisc: Use PA_ASM_LEVEL in boot code

Helge Deller <[email protected]>
parisc: Allow live-patching of __meminit functions

Helge Deller <[email protected]>
parisc: Add memory barrier to asm pdc and sync instructions

Helge Deller <[email protected]>
parisc: Skip registering LED when running in QEMU

John David Anglin <[email protected]>
parisc: Add memory clobber to TLB purges

Helge Deller <[email protected]>
parisc: Export running_on_qemu symbol for modules

Steve Twiss <[email protected]>
regulator: core: fix error path for regulator_set_voltage_unlocked

Ming Lei <[email protected]>
blk-mq: free hw queue's resource in hctx's release handler

Ira Weiny <[email protected]>
mm/gup: Remove the 'write' parameter from gup_fast_permitted()

Saeed Mahameed <[email protected]>
net/mlx5e: Fix ethtool rxfh commands when CONFIG_MLX5_EN_RXNFC is disabled

Saeed Mahameed <[email protected]>
net/mlx5: Imply MLXFW in mlx5_core

Dmytro Linkin <[email protected]>
net/mlx5e: Additional check for flow destination comparison

Dmytro Linkin <[email protected]>
net/mlx5e: Add missing ethtool driver info for representors

Jorge E. Moreira <[email protected]>
vsock/virtio: Initialize core virtio vsock before registering the driver

Junwei Hu <[email protected]>
tipc: fix modprobe tipc failed after switch order of device registration

Stefano Garzarella <[email protected]>
vsock/virtio: free packets during the socket release

Junwei Hu <[email protected]>
tipc: switch order of device registration to fix a crash

Sabrina Dubroca <[email protected]>
rtnetlink: always put IFLA_LINK for links with a link-netnsid

YueHaibing <[email protected]>
ppp: deflate: Fix possible crash in deflate_init

Pieter Jansen van Vuuren <[email protected]>
nfp: flower: add rcu locks when accessing netdev for tunnels

Daniele Palmas <[email protected]>
net: usb: qmi_wwan: add Telit 0x1260 and 0x1261 compositions

Willem de Bruijn <[email protected]>
net: test nouarg before dereferencing zerocopy pointers

Yunjian Wang <[email protected]>
net/mlx4_core: Change the error print to info print

Eric Dumazet <[email protected]>
net: avoid weird emergency message

Florian Fainelli <[email protected]>
net: Always descend into dsa/

Eric Dumazet <[email protected]>
ipv6: prevent possible fib6 leaks

Wei Wang <[email protected]>
ipv6: fix src addr routing with the exception table


-------------

Diffstat:

Documentation/filesystems/porting | 5 +
Documentation/virtual/kvm/api.txt | 5 +-
Makefile | 4 +-
arch/arc/mm/cache.c | 31 +--
arch/mips/kernel/perf_event_mipsxx.c | 21 +-
arch/parisc/boot/compressed/head.S | 6 +-
arch/parisc/include/asm/assembly.h | 6 +-
arch/parisc/include/asm/cache.h | 10 +-
arch/parisc/kernel/head.S | 4 +-
arch/parisc/kernel/process.c | 1 +
arch/parisc/kernel/syscall.S | 2 +-
arch/parisc/mm/init.c | 2 +-
arch/powerpc/include/asm/mmu_context.h | 1 -
arch/powerpc/kvm/book3s_64_vio.c | 6 +-
arch/powerpc/kvm/book3s_hv.c | 4 +-
arch/um/include/asm/mmu_context.h | 1 -
arch/unicore32/include/asm/mmu_context.h | 1 -
arch/x86/entry/entry_64.S | 18 +-
arch/x86/events/intel/core.c | 10 +-
arch/x86/include/asm/mmu_context.h | 6 +-
arch/x86/include/asm/mpx.h | 15 +-
arch/x86/include/asm/pgtable_64.h | 3 +-
arch/x86/include/asm/text-patching.h | 28 +++
arch/x86/kernel/ftrace.c | 32 ++-
arch/x86/kvm/hyperv.c | 11 +-
arch/x86/lib/Makefile | 12 +
arch/x86/mm/mpx.c | 10 +-
block/blk-core.c | 2 +-
block/blk-mq-sysfs.c | 6 +
block/blk-mq.c | 8 +-
block/blk-mq.h | 2 +-
drivers/base/dd.c | 5 +-
drivers/block/brd.c | 7 +-
drivers/clk/hisilicon/clk-hi3660.c | 6 +-
drivers/clk/mediatek/clk-pll.c | 48 ++--
drivers/clk/rockchip/clk-rk3328.c | 18 +-
drivers/clk/sunxi-ng/ccu_nkmp.c | 18 +-
drivers/clk/tegra/clk-pll.c | 4 +-
drivers/hwtracing/intel_th/msu.c | 35 ++-
drivers/hwtracing/stm/core.c | 9 +-
drivers/i2c/busses/i2c-designware-master.c | 3 +-
drivers/infiniband/hw/mlx5/main.c | 5 +-
drivers/infiniband/ulp/ipoib/ipoib_main.c | 13 +-
drivers/iommu/tegra-smmu.c | 25 ++-
drivers/md/dm-cache-metadata.c | 9 +-
drivers/md/dm-crypt.c | 9 +-
drivers/md/dm-delay.c | 3 +-
drivers/md/dm-integrity.c | 4 +-
drivers/md/dm-mpath.c | 2 +-
drivers/md/dm-zoned-metadata.c | 5 +
drivers/md/md.c | 180 +++++++--------
drivers/md/md.h | 25 +--
drivers/md/raid5.c | 29 ++-
drivers/media/i2c/ov6650.c | 2 +
drivers/memory/tegra/mc.c | 2 +-
drivers/net/Makefile | 2 +-
drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 18 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 19 +-
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 +
.../net/ethernet/mellanox/mlx5/core/lib/clock.c | 30 +--
.../ethernet/netronome/nfp/flower/tunnel_conf.c | 17 +-
drivers/net/ieee802154/mcr20a.c | 6 +
drivers/net/ppp/ppp_deflate.c | 20 +-
drivers/net/usb/qmi_wwan.c | 12 +
.../net/wireless/broadcom/brcm80211/brcmfmac/dmi.c | 26 +++
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 28 ++-
drivers/net/wireless/intersil/p54/p54pci.c | 3 +-
drivers/parisc/led.c | 3 +
drivers/pci/controller/pcie-rcar.c | 21 ++
drivers/pci/pci.c | 19 +-
drivers/pci/pci.h | 2 +-
drivers/pci/pcie/aspm.c | 49 +++--
drivers/pci/probe.c | 23 +-
drivers/pci/quirks.c | 77 +++++++
drivers/phy/ti/phy-ti-pipe3.c | 2 +-
drivers/power/supply/cpcap-battery.c | 3 +
drivers/power/supply/power_supply_sysfs.c | 6 -
drivers/regulator/core.c | 11 +-
drivers/staging/media/imx/imx-media-csi.c | 18 +-
drivers/staging/media/imx/imx-media-of.c | 15 +-
drivers/video/fbdev/efifb.c | 8 +-
drivers/video/fbdev/sm712.h | 12 +-
drivers/video/fbdev/sm712fb.c | 242 +++++++++++++++++----
drivers/video/fbdev/udlfb.c | 114 ++++++++--
fs/ceph/super.c | 7 +
fs/cifs/smb2ops.c | 14 +-
fs/dcache.c | 24 +-
fs/fuse/file.c | 13 +-
fs/nfs/filelayout/filelayout.c | 2 +-
fs/nfs/nfs4state.c | 4 +
fs/nsfs.c | 3 +-
fs/overlayfs/copy_up.c | 6 +-
fs/overlayfs/file.c | 5 +-
fs/overlayfs/overlayfs.h | 2 +-
fs/proc/base.c | 5 +
fs/ufs/util.h | 2 +-
include/asm-generic/mm_hooks.h | 1 -
include/linux/bpf.h | 3 +-
include/linux/dcache.h | 2 +-
include/linux/mlx5/driver.h | 1 -
include/linux/of.h | 4 +-
include/linux/pci.h | 2 +
include/linux/skbuff.h | 9 +-
include/net/ip6_fib.h | 3 +-
include/net/xfrm.h | 20 +-
include/uapi/linux/fuse.h | 2 +
include/video/udlfb.h | 7 +
kernel/bpf/hashtab.c | 23 +-
kernel/bpf/inode.c | 2 +-
kernel/bpf/syscall.c | 5 +-
kernel/sched/cpufreq_schedutil.c | 1 +
kernel/trace/trace_events.c | 3 -
kernel/trace/trace_probe.c | 13 +-
lib/Makefile | 11 +
mm/gup.c | 6 +-
mm/mmap.c | 15 +-
net/core/dev.c | 2 +-
net/core/rtnetlink.c | 16 +-
net/ipv4/esp4.c | 20 +-
net/ipv4/esp4_offload.c | 8 +-
net/ipv4/ip_vti.c | 5 +-
net/ipv4/xfrm4_policy.c | 24 +-
net/ipv6/esp6_offload.c | 8 +-
net/ipv6/ip6_fib.c | 12 +-
net/ipv6/route.c | 58 +++--
net/ipv6/xfrm6_tunnel.c | 6 +-
net/key/af_key.c | 4 +-
net/mac80211/iface.c | 3 +
net/tipc/core.c | 14 +-
net/vmw_vsock/virtio_transport.c | 13 +-
net/vmw_vsock/virtio_transport_common.c | 7 +
net/xfrm/xfrm_interface.c | 17 +-
net/xfrm/xfrm_policy.c | 2 +-
net/xfrm/xfrm_state.c | 2 +-
net/xfrm/xfrm_user.c | 16 +-
scripts/gcc-plugins/arm_ssp_per_task_plugin.c | 2 +-
security/apparmor/apparmorfs.c | 13 +-
security/inode.c | 13 +-
tools/bpf/bpftool/map.c | 3 +
tools/objtool/Makefile | 3 +-
tools/perf/bench/numa.c | 4 +
tools/perf/util/cs-etm.c | 8 +-
.../perf/util/intel-pt-decoder/intel-pt-decoder.c | 31 ++-
tools/testing/selftests/kvm/dirty_log_test.c | 9 +-
tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 9 +-
virt/kvm/arm/arm.c | 11 +-
virt/kvm/kvm_main.c | 7 +-
149 files changed, 1467 insertions(+), 653 deletions(-)



2019-05-23 19:43:40

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 002/139] ipv6: prevent possible fib6 leaks

From: Eric Dumazet <[email protected]>

[ Upstream commit 61fb0d01680771f72cc9d39783fb2c122aaad51e ]

At ipv6 route dismantle, fib6_drop_pcpu_from() is responsible
for finding all percpu routes and set their ->from pointer
to NULL, so that fib6_ref can reach its expected value (1).

The problem right now is that other cpus can still catch the
route being deleted, since there is no rcu grace period
between the route deletion and call to fib6_drop_pcpu_from()

This can leak the fib6 and associated resources, since no
notifier will take care of removing the last reference(s).

I decided to add another boolean (fib6_destroying) instead
of reusing/renaming exception_bucket_flushed to ease stable backports,
and properly document the memory barriers used to implement this fix.

This patch has been co-developped with Wei Wang.

Fixes: 93531c674315 ("net/ipv6: separate handling of FIB entries from dst based routes")
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: syzbot <[email protected]>
Cc: Wei Wang <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Martin Lau <[email protected]>
Acked-by: Wei Wang <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
include/net/ip6_fib.h | 3 ++-
net/ipv6/ip6_fib.c | 12 +++++++++---
net/ipv6/route.c | 7 +++++++
3 files changed, 18 insertions(+), 4 deletions(-)

--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -171,7 +171,8 @@ struct fib6_info {
dst_nocount:1,
dst_nopolicy:1,
dst_host:1,
- unused:3;
+ fib6_destroying:1,
+ unused:2;

struct fib6_nh fib6_nh;
struct rcu_head rcu;
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -909,6 +909,12 @@ static void fib6_drop_pcpu_from(struct f
{
int cpu;

+ /* Make sure rt6_make_pcpu_route() wont add other percpu routes
+ * while we are cleaning them here.
+ */
+ f6i->fib6_destroying = 1;
+ mb(); /* paired with the cmpxchg() in rt6_make_pcpu_route() */
+
/* release the reference to this fib entry from
* all of its cached pcpu routes
*/
@@ -932,6 +938,9 @@ static void fib6_purge_rt(struct fib6_in
{
struct fib6_table *table = rt->fib6_table;

+ if (rt->rt6i_pcpu)
+ fib6_drop_pcpu_from(rt, table);
+
if (atomic_read(&rt->fib6_ref) != 1) {
/* This route is used as dummy address holder in some split
* nodes. It is not leaked, but it still holds other resources,
@@ -953,9 +962,6 @@ static void fib6_purge_rt(struct fib6_in
fn = rcu_dereference_protected(fn->parent,
lockdep_is_held(&table->tb6_lock));
}
-
- if (rt->rt6i_pcpu)
- fib6_drop_pcpu_from(rt, table);
}
}

--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1260,6 +1260,13 @@ static struct rt6_info *rt6_make_pcpu_ro
prev = cmpxchg(p, NULL, pcpu_rt);
BUG_ON(prev);

+ if (rt->fib6_destroying) {
+ struct fib6_info *from;
+
+ from = xchg((__force struct fib6_info **)&pcpu_rt->from, NULL);
+ fib6_info_release(from);
+ }
+
return pcpu_rt;
}



2019-05-23 19:44:00

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 019/139] mm/gup: Remove the write parameter from gup_fast_permitted()

From: Ira Weiny <[email protected]>

commit ad8cfb9c42ef83ecf4079bc7d77e6557648e952b upstream.

The 'write' parameter is unused in gup_fast_permitted() so remove it.

Signed-off-by: Ira Weiny <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Cc: Justin Forbes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
arch/x86/include/asm/pgtable_64.h | 3 +--
mm/gup.c | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)

--- a/arch/x86/include/asm/pgtable_64.h
+++ b/arch/x86/include/asm/pgtable_64.h
@@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsign
extern void init_extra_mapping_wb(unsigned long phys, unsigned long size);

#define gup_fast_permitted gup_fast_permitted
-static inline bool gup_fast_permitted(unsigned long start, int nr_pages,
- int write)
+static inline bool gup_fast_permitted(unsigned long start, int nr_pages)
{
unsigned long len, end;

--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1811,7 +1811,7 @@ static void gup_pgd_range(unsigned long
* Check if it's allowed to use __get_user_pages_fast() for the range, or
* we need to fall back to the slow version:
*/
-bool gup_fast_permitted(unsigned long start, int nr_pages, int write)
+bool gup_fast_permitted(unsigned long start, int nr_pages)
{
unsigned long len, end;

@@ -1853,7 +1853,7 @@ int __get_user_pages_fast(unsigned long
* block IPIs that come from THPs splitting.
*/

- if (gup_fast_permitted(start, nr_pages, write)) {
+ if (gup_fast_permitted(start, nr_pages)) {
local_irq_save(flags);
gup_pgd_range(start, end, write, pages, &nr);
local_irq_restore(flags);
@@ -1895,7 +1895,7 @@ int get_user_pages_fast(unsigned long st
if (unlikely(!access_ok((void __user *)start, len)))
return -EFAULT;

- if (gup_fast_permitted(start, nr_pages, write)) {
+ if (gup_fast_permitted(start, nr_pages)) {
local_irq_disable();
gup_pgd_range(addr, end, write, pages, &nr);
local_irq_enable();


2019-05-23 19:44:04

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 030/139] stm class: Fix channel bitmap on 32-bit systems

From: Alexander Shishkin <[email protected]>

commit 51e0f227812ed81a368de54157ebe14396b4be03 upstream.

Commit 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace
Module devices") naively calculates the channel bitmap size in 64-bit
chunks regardless of the size of underlying unsigned long, making the
bitmap half as big on a 32-bit system. This leads to an out of bounds
access with the upper half of the bitmap.

Fix this by using BITS_TO_LONGS. While at it, convert to using
struct_size() for the total size calculation of the master struct.

Signed-off-by: Alexander Shishkin <[email protected]>
Fixes: 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices")
Reported-by: Mulu He <[email protected]>
Cc: [email protected] # v4.4+
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
drivers/hwtracing/stm/core.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- a/drivers/hwtracing/stm/core.c
+++ b/drivers/hwtracing/stm/core.c
@@ -166,11 +166,10 @@ stm_master(struct stm_device *stm, unsig
static int stp_master_alloc(struct stm_device *stm, unsigned int idx)
{
struct stp_master *master;
- size_t size;

- size = ALIGN(stm->data->sw_nchannels, 8) / 8;
- size += sizeof(struct stp_master);
- master = kzalloc(size, GFP_ATOMIC);
+ master = kzalloc(struct_size(master, chan_map,
+ BITS_TO_LONGS(stm->data->sw_nchannels)),
+ GFP_ATOMIC);
if (!master)
return -ENOMEM;



2019-05-23 19:44:13

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 016/139] net/mlx5e: Additional check for flow destination comparison

From: Dmytro Linkin <[email protected]>

[ Upstream commit c979c445a88e1c9dd7d8f90838c10456ae4ecd09 ]

Flow destination comparison has an inaccuracy: code see no
difference between same vf ports, which belong to different pfs.

Example: If start ping from VF0 (PF1) to VF1 (PF1) and mirror
all traffic to VF0 (PF2), icmp reply to VF0 (PF1) and mirrored
flow to VF0 (PF2) would be determined as same destination. It lead
to creating flow handler with rule nodes, which not added to node
tree. When later driver try to delete this flow rules we got
kernel crash.

Add comparison of vhca_id field to avoid this.

Fixes: 1228e912c934 ("net/mlx5: Consider encapsulation properties when comparing destinations")
Signed-off-by: Dmytro Linkin <[email protected]>
Reviewed-by: Roi Dayan <[email protected]>
Reviewed-by: Vlad Buslov <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -1375,6 +1375,8 @@ static bool mlx5_flow_dests_cmp(struct m
if ((d1->type == MLX5_FLOW_DESTINATION_TYPE_VPORT &&
d1->vport.num == d2->vport.num &&
d1->vport.flags == d2->vport.flags &&
+ ((d1->vport.flags & MLX5_FLOW_DEST_VPORT_VHCA_ID) ?
+ (d1->vport.vhca_id == d2->vport.vhca_id) : true) &&
((d1->vport.flags & MLX5_FLOW_DEST_VPORT_REFORMAT_ID) ?
(d1->vport.reformat_id == d2->vport.reformat_id) : true)) ||
(d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE &&


2019-05-23 19:44:15

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 026/139] parisc: Allow live-patching of __meminit functions

From: Helge Deller <[email protected]>

commit d19a12906e5e558c0f6b6cfece7b7caf1012ef95 upstream.

When making the text sections writeable with set_kernel_text_rw(1),
include all text sections including those in the __init section.
Otherwise functions marked with __meminit will stay read-only.

Signed-off-by: Helge Deller <[email protected]>
Cc: <[email protected]> # 4.20+
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
arch/parisc/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -512,7 +512,7 @@ static void __init map_pages(unsigned lo

void __init set_kernel_text_rw(int enable_read_write)
{
- unsigned long start = (unsigned long) _text;
+ unsigned long start = (unsigned long) __init_begin;
unsigned long end = (unsigned long) &data_start;

map_pages(start, __pa(start), end-start,


2019-05-23 19:44:21

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 5.0 031/139] brd: re-enable __GFP_HIGHMEM in brd_insert_page()

From: Hou Tao <[email protected]>

commit f6b50160a06d4a0d6a3999ab0c5aec4f52dba248 upstream.

__GFP_HIGHMEM is disabled if dax is enabled on brd, however
dax support for brd has been removed since commit (7a862fbbdec6
"brd: remove dax support"), so restore __GFP_HIGHMEM in
brd_insert_page().

Also remove the no longer applicable comments about DAX and highmem.

Cc: [email protected]
Fixes: 7a862fbbdec6 ("brd: remove dax support")
Signed-off-by: Hou Tao <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
drivers/block/brd.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -96,13 +96,8 @@ static struct page *brd_insert_page(stru
/*
* Must use NOIO because we don't want to recurse back into the
* block or filesystem layers from page reclaim.
- *
- * Cannot support DAX and highmem, because our ->direct_access
- * routine for DAX must return memory that is always addressable.
- * If DAX was reworked to use pfns and kmap throughout, this
- * restriction might be able to be lifted.
*/
- gfp_flags = GFP_NOIO | __GFP_ZERO;
+ gfp_flags = GFP_NOIO | __GFP_ZERO | __GFP_HIGHMEM;
page = alloc_page(gfp_flags);
if (!page)
return NULL;


2019-05-24 03:10:21

by kernelci.org bot

[permalink] [raw]
Subject: Re: [PATCH 5.0 000/139] 5.0.19-stable review

stable-rc/linux-5.0.y boot: 133 boots: 0 failed, 118 passed with 14 offline, 1 untried/unknown (v5.0.18-140-gc7802929531b)

Full Boot Summary: https://kernelci.org/boot/all/job/stable-rc/branch/linux-5.0.y/kernel/v5.0.18-140-gc7802929531b/
Full Build Summary: https://kernelci.org/build/stable-rc/branch/linux-5.0.y/kernel/v5.0.18-140-gc7802929531b/

Tree: stable-rc
Branch: linux-5.0.y
Git Describe: v5.0.18-140-gc7802929531b
Git Commit: c7802929531b3fd886283d78a4f91f1e522cbdf2
Git URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
Tested: 74 unique boards, 24 SoC families, 14 builds out of 208

Offline Platforms:

arm:

sama5_defconfig:
gcc-8
at91-sama5d4_xplained: 1 offline lab
at91-sama5d4ek: 1 offline lab

multi_v7_defconfig:
gcc-8
alpine-db: 1 offline lab
at91-sama5d4_xplained: 1 offline lab
at91-sama5d4ek: 1 offline lab
stih410-b2120: 1 offline lab
sun5i-r8-chip: 1 offline lab
tegra124-jetson-tk1: 1 offline lab

tegra_defconfig:
gcc-8
tegra124-jetson-tk1: 1 offline lab

sunxi_defconfig:
gcc-8
sun5i-r8-chip: 1 offline lab

bcm2835_defconfig:
gcc-8
bcm2835-rpi-b: 1 offline lab

arm64:

defconfig:
gcc-8
apq8016-sbc: 1 offline lab
juno-r2: 1 offline lab
mt7622-rfb1: 1 offline lab

---
For more info write to <[email protected]>

2019-05-24 08:55:04

by Naresh Kamboju

[permalink] [raw]
Subject: Re: [PATCH 5.0 000/139] 5.0.19-stable review

On Fri, 24 May 2019 at 00:50, Greg Kroah-Hartman
<[email protected]> wrote:
>
> This is the start of the stable review cycle for the 5.0.19 release.
> There are 139 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 Sat 25 May 2019 06:14:53 PM UTC.
> 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/v5.x/stable-review/patch-5.0.19-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.

Summary
------------------------------------------------------------------------

kernel: 5.0.19-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.0.y
git commit: c7802929531b3fd886283d78a4f91f1e522cbdf2
git describe: v5.0.18-140-gc7802929531b
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.0-oe/build/v5.0.18-140-gc7802929531b


No regressions (compared to build v5.0.18)

No fixes (compared to build v5.0.18)

Ran 23203 total tests in the following environments and test suites.

Environments
--------------
- dragonboard-410c
- i386
- juno-r2
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86

Test Suites
-----------
* build
* install-android-platform-tools-r2600
* kselftest
* libgpiod
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-cpuhotplug-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-timers-tests
* perf
* spectre-meltdown-checker-test
* v4l2-compliance
* ltp-fs-tests
* ltp-open-posix-tests
* kvm-unit-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none

--
Linaro LKFT
https://lkft.linaro.org

2019-05-24 11:08:13

by Jon Hunter

[permalink] [raw]
Subject: Re: [PATCH 5.0 000/139] 5.0.19-stable review


On 23/05/2019 20:04, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.0.19 release.
> There are 139 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 Sat 25 May 2019 06:14:53 PM UTC.
> 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/v5.x/stable-review/patch-5.0.19-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h

All tests are passing for Tegra ...

Test results for stable-v5.0:
12 builds: 12 pass, 0 fail
22 boots: 22 pass, 0 fail
32 tests: 32 pass, 0 fail

Linux version: 5.0.19-rc1-gc780292
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04

Cheers
Jon

--
nvpublic

2019-05-24 18:56:06

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH 5.0 000/139] 5.0.19-stable review

On 5/23/19 1:04 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.0.19 release.
> There are 139 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 Sat 25 May 2019 06:14:53 PM UTC.
> 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/v5.x/stable-review/patch-5.0.19-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah