commit 6dd0e32665e591e9debe3edaf73c2f8135bf047e
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Mon Apr 13 10:45:17 2020 +0200

    Linux 4.19.115

commit 39718d086d9b59bd04bc7ecd5e7eb9109d7d7402
Author: Rob Clark <robdclark@chromium.org>
Date:   Tue Jul 30 14:46:28 2019 -0700

    drm/msm: Use the correct dma_sync calls in msm_gem
    
    commit 3de433c5b38af49a5fc7602721e2ab5d39f1e69c upstream.
    
    [subject was: drm/msm: shake fist angrily at dma-mapping]
    
    So, using dma_sync_* for our cache needs works out w/ dma iommu ops, but
    it falls appart with dma direct ops.  The problem is that, depending on
    display generation, we can have either set of dma ops (mdp4 and dpu have
    iommu wired to mdss node, which maps to toplevel drm device, but mdp5
    has iommu wired up to the mdp sub-node within mdss).
    
    Fixes this splat on mdp5 devices:
    
       Unable to handle kernel paging request at virtual address ffffffff80000000
       Mem abort info:
         ESR = 0x96000144
         Exception class = DABT (current EL), IL = 32 bits
         SET = 0, FnV = 0
         EA = 0, S1PTW = 0
       Data abort info:
         ISV = 0, ISS = 0x00000144
         CM = 1, WnR = 1
       swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000810e4000
       [ffffffff80000000] pgd=0000000000000000
       Internal error: Oops: 96000144 [#1] SMP
       Modules linked in: btqcomsmd btqca bluetooth cfg80211 ecdh_generic ecc rfkill libarc4 panel_simple msm wcnss_ctrl qrtr_smd drm_kms_helper venus_enc venus_dec videobuf2_dma_sg videobuf2_memops drm venus_core ipv6 qrtr qcom_wcnss_pil v4l2_mem2mem qcom_sysmon videobuf2_v4l2 qmi_helpers videobuf2_common crct10dif_ce mdt_loader qcom_common videodev qcom_glink_smem remoteproc bmc150_accel_i2c bmc150_magn_i2c bmc150_accel_core bmc150_magn snd_soc_lpass_apq8016 snd_soc_msm8916_analog mms114 mc nf_defrag_ipv6 snd_soc_lpass_cpu snd_soc_apq8016_sbc industrialio_triggered_buffer kfifo_buf snd_soc_lpass_platform snd_soc_msm8916_digital drm_panel_orientation_quirks
       CPU: 2 PID: 33 Comm: kworker/2:1 Not tainted 5.3.0-rc2 #1
       Hardware name: Samsung Galaxy A5U (EUR) (DT)
       Workqueue: events deferred_probe_work_func
       pstate: 80000005 (Nzcv daif -PAN -UAO)
       pc : __clean_dcache_area_poc+0x20/0x38
       lr : arch_sync_dma_for_device+0x28/0x30
       sp : ffff0000115736a0
       x29: ffff0000115736a0 x28: 0000000000000001
       x27: ffff800074830800 x26: ffff000011478000
       x25: 0000000000000000 x24: 0000000000000001
       x23: ffff000011478a98 x22: ffff800009fd1c10
       x21: 0000000000000001 x20: ffff800075ad0a00
       x19: 0000000000000000 x18: ffff0000112b2000
       x17: 0000000000000000 x16: 0000000000000000
       x15: 00000000fffffff0 x14: ffff000011455d70
       x13: 0000000000000000 x12: 0000000000000028
       x11: 0000000000000001 x10: ffff00001106c000
       x9 : ffff7e0001d6b380 x8 : 0000000000001000
       x7 : ffff7e0001d6b380 x6 : ffff7e0001d6b382
       x5 : 0000000000000000 x4 : 0000000000001000
       x3 : 000000000000003f x2 : 0000000000000040
       x1 : ffffffff80001000 x0 : ffffffff80000000
       Call trace:
        __clean_dcache_area_poc+0x20/0x38
        dma_direct_sync_sg_for_device+0xb8/0xe8
        get_pages+0x22c/0x250 [msm]
        msm_gem_get_and_pin_iova+0xdc/0x168 [msm]
        ...
    
    Fixes the combination of two patches:
    
    Fixes: 0036bc73ccbe (drm/msm: stop abusing dma_map/unmap for cache)
    Fixes: 449fa54d6815 (dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device)
    Tested-by: Stephan Gerhold <stephan@gerhold.net>
    Signed-off-by: Rob Clark <robdclark@chromium.org>
    [seanpaul changed subject to something more desriptive]
    Signed-off-by: Sean Paul <seanpaul@chromium.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190730214633.17820-1-robdclark@gmail.com
    Cc: nobuhiro1.iwamatsu@toshiba.co.jp
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 329ef07f7fb83d4de62c239e376a6a0e04ff4b3c
Author: Hans Verkuil <hans.verkuil@cisco.com>
Date:   Mon Aug 27 10:07:42 2018 +0200

    drm_dp_mst_topology: fix broken drm_dp_sideband_parse_remote_dpcd_read()
    
    commit a4c30a4861c54af78c4eb8b7855524c1a96d9f80 upstream.
    
    When parsing the reply of a DP_REMOTE_DPCD_READ DPCD command the
    result is wrong due to a missing idx increment.
    
    This was never noticed since DP_REMOTE_DPCD_READ is currently not
    used, but if you enable it, then it is all wrong.
    
    Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
    Reviewed-by: Lyude Paul <lyude@redhat.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/e72ddac2-1dc0-100a-d816-9ac98ac009dd@xs4all.nl
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b0434aaec76f379a23452b40cab4b036fc94c8b7
Author: Roger Quadros <rogerq@ti.com>
Date:   Mon Aug 26 16:10:58 2019 +0300

    usb: dwc3: don't set gadget->is_otg flag
    
    commit c09b73cfac2a9317f1104169045c519c6021aa1d upstream.
    
    This reverts
    commit 6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")
    
    We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
    and are not setting gadget->otg_caps, so don't set gadget->is_otg
    flag.
    
    If we do then we end up publishing a OTG1.0 descriptor in
    the gadget descriptor which causes device enumeration to fail
    if we are connected to a host with CONFIG_USB_OTG enabled.
    
    Host side log without this patch
    
    [   96.720453] usb 1-1: new high-speed USB device number 2 using xhci-hcd
    [   96.901391] usb 1-1: Dual-Role OTG device on non-HNP port
    [   96.907552] usb 1-1: set a_alt_hnp_support failed: -32
    [   97.060447] usb 1-1: new high-speed USB device number 3 using xhci-hcd
    [   97.241378] usb 1-1: Dual-Role OTG device on non-HNP port
    [   97.247536] usb 1-1: set a_alt_hnp_support failed: -32
    [   97.253606] usb usb1-port1: attempt power cycle
    [   97.960449] usb 1-1: new high-speed USB device number 4 using xhci-hcd
    [   98.141383] usb 1-1: Dual-Role OTG device on non-HNP port
    [   98.147540] usb 1-1: set a_alt_hnp_support failed: -32
    [   98.300453] usb 1-1: new high-speed USB device number 5 using xhci-hcd
    [   98.481391] usb 1-1: Dual-Role OTG device on non-HNP port
    [   98.487545] usb 1-1: set a_alt_hnp_support failed: -32
    [   98.493532] usb usb1-port1: unable to enumerate USB device
    
    Signed-off-by: Roger Quadros <rogerq@ti.com>
    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7abfe9914d942dc62c06772c8fcf00d8b866a634
Author: Chris Lew <clew@codeaurora.org>
Date:   Fri Jul 27 17:47:27 2018 +0530

    rpmsg: glink: Remove chunk size word align warning
    
    commit f0beb4ba9b185d497c8efe7b349363700092aee0 upstream.
    
    It is possible for the chunk sizes coming from the non RPM remote procs
    to not be word aligned. Remove the alignment warning and continue to
    read from the FIFO so execution is not stalled.
    
    Signed-off-by: Chris Lew <clew@codeaurora.org>
    Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
    Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 31f7497ca521cf9a1903581145d72000d71206ea
Author: Arun KS <arunks@codeaurora.org>
Date:   Tue Apr 30 16:05:04 2019 +0530

    arm64: Fix size of __early_cpu_boot_status
    
    commit 61cf61d81e326163ce1557ceccfca76e11d0e57c upstream.
    
    __early_cpu_boot_status is of type long. Use quad
    assembler directive to allocate proper size.
    
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Arun KS <arunks@codeaurora.org>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9c23e00804f8ae79175c7d64def83334ee04587f
Author: Rob Clark <robdclark@chromium.org>
Date:   Sun Jun 30 05:47:22 2019 -0700

    drm/msm: stop abusing dma_map/unmap for cache
    
    commit 0036bc73ccbe7e600a3468bf8e8879b122252274 upstream.
    
    Recently splats like this started showing up:
    
       WARNING: CPU: 4 PID: 251 at drivers/iommu/dma-iommu.c:451 __iommu_dma_unmap+0xb8/0xc0
       Modules linked in: ath10k_snoc ath10k_core fuse msm ath mac80211 uvcvideo cfg80211 videobuf2_vmalloc videobuf2_memops vide
       CPU: 4 PID: 251 Comm: kworker/u16:4 Tainted: G        W         5.2.0-rc5-next-20190619+ #2317
       Hardware name: LENOVO 81JL/LNVNB161216, BIOS 9UCN23WW(V1.06) 10/25/2018
       Workqueue: msm msm_gem_free_work [msm]
       pstate: 80c00005 (Nzcv daif +PAN +UAO)
       pc : __iommu_dma_unmap+0xb8/0xc0
       lr : __iommu_dma_unmap+0x54/0xc0
       sp : ffff0000119abce0
       x29: ffff0000119abce0 x28: 0000000000000000
       x27: ffff8001f9946648 x26: ffff8001ec271068
       x25: 0000000000000000 x24: ffff8001ea3580a8
       x23: ffff8001f95ba010 x22: ffff80018e83ba88
       x21: ffff8001e548f000 x20: fffffffffffff000
       x19: 0000000000001000 x18: 00000000c00001fe
       x17: 0000000000000000 x16: 0000000000000000
       x15: ffff000015b70068 x14: 0000000000000005
       x13: 0003142cc1be1768 x12: 0000000000000001
       x11: ffff8001f6de9100 x10: 0000000000000009
       x9 : ffff000015b78000 x8 : 0000000000000000
       x7 : 0000000000000001 x6 : fffffffffffff000
       x5 : 0000000000000fff x4 : ffff00001065dbc8
       x3 : 000000000000000d x2 : 0000000000001000
       x1 : fffffffffffff000 x0 : 0000000000000000
       Call trace:
        __iommu_dma_unmap+0xb8/0xc0
        iommu_dma_unmap_sg+0x98/0xb8
        put_pages+0x5c/0xf0 [msm]
        msm_gem_free_work+0x10c/0x150 [msm]
        process_one_work+0x1e0/0x330
        worker_thread+0x40/0x438
        kthread+0x12c/0x130
        ret_from_fork+0x10/0x18
       ---[ end trace afc0dc5ab81a06bf ]---
    
    Not quite sure what triggered that, but we really shouldn't be abusing
    dma_{map,unmap}_sg() for cache maint.
    
    Cc: Stephen Boyd <sboyd@kernel.org>
    Tested-by: Stephen Boyd <swboyd@chromium.org>
    Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
    Signed-off-by: Rob Clark <robdclark@chromium.org>
    Signed-off-by: Sean Paul <seanpaul@chromium.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20190630124735.27786-1-robdclark@gmail.com
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aa586e25e2c4ee2aee2a6247dba0b4a144c2e594
Author: Taniya Das <tdas@codeaurora.org>
Date:   Wed May 8 23:54:53 2019 +0530

    clk: qcom: rcg: Return failure for RCG update
    
    commit 21ea4b62e1f3dc258001a68da98c9663a9dbd6c7 upstream.
    
    In case of update config failure, return -EBUSY, so that consumers could
    handle the failure gracefully.
    
    Signed-off-by: Taniya Das <tdas@codeaurora.org>
    Link: https://lkml.kernel.org/r/1557339895-21952-2-git-send-email-tdas@codeaurora.org
    Signed-off-by: Stephen Boyd <sboyd@kernel.org>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e9944eb667675fb06b126c8b359da162a8ad7ce6
Author: Qiujun Huang <hqjagain@gmail.com>
Date:   Sun Mar 29 16:56:47 2020 +0800

    fbcon: fix null-ptr-deref in fbcon_switch
    
    commit b139f8b00db4a8ea75a4174346eafa48041aa489 upstream.
    
    Set logo_shown to FBCON_LOGO_CANSHOW when the vc was deallocated.
    
    syzkaller report: https://lkml.org/lkml/2020/3/27/403
    general protection fault, probably for non-canonical address
    0xdffffc000000006c: 0000 [#1] SMP KASAN
    KASAN: null-ptr-deref in range [0x0000000000000360-0x0000000000000367]
    RIP: 0010:fbcon_switch+0x28f/0x1740
    drivers/video/fbdev/core/fbcon.c:2260
    
    Call Trace:
    redraw_screen+0x2a8/0x770 drivers/tty/vt/vt.c:1008
    vc_do_resize+0xfe7/0x1360 drivers/tty/vt/vt.c:1295
    fbcon_init+0x1221/0x1ab0 drivers/video/fbdev/core/fbcon.c:1219
    visual_init+0x305/0x5c0 drivers/tty/vt/vt.c:1062
    do_bind_con_driver+0x536/0x890 drivers/tty/vt/vt.c:3542
    do_take_over_console+0x453/0x5b0 drivers/tty/vt/vt.c:4122
    do_fbcon_takeover+0x10b/0x210 drivers/video/fbdev/core/fbcon.c:588
    fbcon_fb_registered+0x26b/0x340 drivers/video/fbdev/core/fbcon.c:3259
    do_register_framebuffer drivers/video/fbdev/core/fbmem.c:1664 [inline]
    register_framebuffer+0x56e/0x980 drivers/video/fbdev/core/fbmem.c:1832
    dlfb_usb_probe.cold+0x1743/0x1ba3 drivers/video/fbdev/udlfb.c:1735
    usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374
    
    accessing vc_cons[logo_shown].d->vc_top causes the bug.
    
    Reported-by: syzbot+732528bae351682f1f27@syzkaller.appspotmail.com
    Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
    Acked-by: Sam Ravnborg <sam@ravnborg.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200329085647.25133-1-hqjagain@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e2db80e0a7a4d9b2dfa14d84f0fa928af404cf87
Author: Avihai Horon <avihaih@mellanox.com>
Date:   Wed Mar 18 12:17:41 2020 +0200

    RDMA/cm: Update num_paths in cma_resolve_iboe_route error flow
    
    commit 987914ab841e2ec281a35b54348ab109b4c0bb4e upstream.
    
    After a successful allocation of path_rec, num_paths is set to 1, but any
    error after such allocation will leave num_paths uncleared.
    
    This causes to de-referencing a NULL pointer later on. Hence, num_paths
    needs to be set back to 0 if such an error occurs.
    
    The following crash from syzkaller revealed it.
    
      kasan: CONFIG_KASAN_INLINE enabled
      kasan: GPF could be caused by NULL-ptr deref or user memory access
      general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI
      CPU: 0 PID: 357 Comm: syz-executor060 Not tainted 4.18.0+ #311
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
      rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014
      RIP: 0010:ib_copy_path_rec_to_user+0x94/0x3e0
      Code: f1 f1 f1 f1 c7 40 0c 00 00 f4 f4 65 48 8b 04 25 28 00 00 00 48 89
      45 c8 31 c0 e8 d7 60 24 ff 48 8d 7b 4c 48 89 f8 48 c1 e8 03 <42> 0f b6
      14 30 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85
      RSP: 0018:ffff88006586f980 EFLAGS: 00010207
      RAX: 0000000000000009 RBX: 0000000000000000 RCX: 1ffff1000d5fe475
      RDX: ffff8800621e17c0 RSI: ffffffff820d45f9 RDI: 000000000000004c
      RBP: ffff88006586fa50 R08: ffffed000cb0df73 R09: ffffed000cb0df72
      R10: ffff88006586fa70 R11: ffffed000cb0df73 R12: 1ffff1000cb0df30
      R13: ffff88006586fae8 R14: dffffc0000000000 R15: ffff88006aff2200
      FS: 00000000016fc880(0000) GS:ffff88006d000000(0000)
      knlGS:0000000000000000
      CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000020000040 CR3: 0000000063fec000 CR4: 00000000000006b0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
      ? ib_copy_path_rec_from_user+0xcc0/0xcc0
      ? __mutex_unlock_slowpath+0xfc/0x670
      ? wait_for_completion+0x3b0/0x3b0
      ? ucma_query_route+0x818/0xc60
      ucma_query_route+0x818/0xc60
      ? ucma_listen+0x1b0/0x1b0
      ? sched_clock_cpu+0x18/0x1d0
      ? sched_clock_cpu+0x18/0x1d0
      ? ucma_listen+0x1b0/0x1b0
      ? ucma_write+0x292/0x460
      ucma_write+0x292/0x460
      ? ucma_close_id+0x60/0x60
      ? sched_clock_cpu+0x18/0x1d0
      ? sched_clock_cpu+0x18/0x1d0
      __vfs_write+0xf7/0x620
      ? ucma_close_id+0x60/0x60
      ? kernel_read+0x110/0x110
      ? time_hardirqs_on+0x19/0x580
      ? lock_acquire+0x18b/0x3a0
      ? finish_task_switch+0xf3/0x5d0
      ? _raw_spin_unlock_irq+0x29/0x40
      ? _raw_spin_unlock_irq+0x29/0x40
      ? finish_task_switch+0x1be/0x5d0
      ? __switch_to_asm+0x34/0x70
      ? __switch_to_asm+0x40/0x70
      ? security_file_permission+0x172/0x1e0
      vfs_write+0x192/0x460
      ksys_write+0xc6/0x1a0
      ? __ia32_sys_read+0xb0/0xb0
      ? entry_SYSCALL_64_after_hwframe+0x3e/0xbe
      ? do_syscall_64+0x1d/0x470
      do_syscall_64+0x9e/0x470
      entry_SYSCALL_64_after_hwframe+0x49/0xbe
    
    Fixes: 3c86aa70bf67 ("RDMA/cm: Add RDMA CM support for IBoE devices")
    Link: https://lore.kernel.org/r/20200318101741.47211-1-leon@kernel.org
    Signed-off-by: Avihai Horon <avihaih@mellanox.com>
    Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 78a4ad28608a530b5bd85da60307d61133e68040
Author: Qiujun Huang <hqjagain@gmail.com>
Date:   Sun Mar 8 17:45:27 2020 +0800

    Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl
    
    commit 71811cac8532b2387b3414f7cd8fe9e497482864 upstream.
    
    Needn't call 'rfcomm_dlc_put' here, because 'rfcomm_dlc_exists' didn't
    increase dlc->refcnt.
    
    Reported-by: syzbot+4496e82090657320efc6@syzkaller.appspotmail.com
    Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
    Suggested-by: Hillf Danton <hdanton@sina.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ee433d1cdee016c73707b4636c9dd4424aaaad53
Author: Jason Gunthorpe <jgg@ziepe.ca>
Date:   Thu Feb 27 16:36:51 2020 -0400

    RDMA/cma: Teach lockdep about the order of rtnl and lock
    
    commit 32ac9e4399b12d3e54d312a0e0e30ed5cd19bd4e upstream.
    
    This lock ordering only happens when bonding is enabled and a certain
    bonding related event fires. However, since it can happen this is a global
    restriction on lock ordering.
    
    Teach lockdep about the order directly and unconditionally so bugs here
    are found quickly.
    
    See https://syzkaller.appspot.com/bug?extid=55de90ab5f44172b0c90
    
    Link: https://lore.kernel.org/r/20200227203651.GA27185@ziepe.ca
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit abc4ea7f1345398261295345fd9b30243e4f4f8e
Author: Jason Gunthorpe <jgg@ziepe.ca>
Date:   Tue Feb 18 15:45:38 2020 -0400

    RDMA/ucma: Put a lock around every call to the rdma_cm layer
    
    commit 7c11910783a1ea17e88777552ef146cace607b3c upstream.
    
    The rdma_cm must be used single threaded.
    
    This appears to be a bug in the design, as it does have lots of locking
    that seems like it should allow concurrency. However, when it is all said
    and done every single place that uses the cma_exch() scheme is broken, and
    all the unlocked reads from the ucma of the cm_id data are wrong too.
    
    syzkaller has been finding endless bugs related to this.
    
    Fixing this in any elegant way is some enormous amount of work. Take a
    very big hammer and put a mutex around everything to do with the
    ucma_context at the top of every syscall.
    
    Fixes: 75216638572f ("RDMA/cma: Export rdma cm interface to userspace")
    Link: https://lore.kernel.org/r/20200218210432.GA31966@ziepe.ca
    Reported-by: syzbot+adb15cf8c2798e4e0db4@syzkaller.appspotmail.com
    Reported-by: syzbot+e5579222b6a3edd96522@syzkaller.appspotmail.com
    Reported-by: syzbot+4b628fcc748474003457@syzkaller.appspotmail.com
    Reported-by: syzbot+29ee8f76017ce6cf03da@syzkaller.appspotmail.com
    Reported-by: syzbot+6956235342b7317ec564@syzkaller.appspotmail.com
    Reported-by: syzbot+b358909d8d01556b790b@syzkaller.appspotmail.com
    Reported-by: syzbot+6b46b135602a3f3ac99e@syzkaller.appspotmail.com
    Reported-by: syzbot+8458d13b13562abf6b77@syzkaller.appspotmail.com
    Reported-by: syzbot+bd034f3fdc0402e942ed@syzkaller.appspotmail.com
    Reported-by: syzbot+c92378b32760a4eef756@syzkaller.appspotmail.com
    Reported-by: syzbot+68b44a1597636e0b342c@syzkaller.appspotmail.com
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4eeddc6229e7c10a220afae4bb63ddb69200d218
Author: Ilya Dryomov <idryomov@gmail.com>
Date:   Mon Feb 10 22:51:08 2020 +0100

    ceph: canonicalize server path in place
    
    commit b27a939e8376a3f1ed09b9c33ef44d20f18ec3d0 upstream.
    
    syzbot reported that 4fbc0c711b24 ("ceph: remove the extra slashes in
    the server path") had caused a regression where an allocation could be
    done under a spinlock -- compare_mount_options() is called by sget_fc()
    with sb_lock held.
    
    We don't really need the supplied server path, so canonicalize it
    in place and compare it directly.  To make this work, the leading
    slash is kept around and the logic in ceph_real_mount() to skip it
    is restored.  CEPH_MSG_CLIENT_SESSION now reports the same (i.e.
    canonicalized) path, with the leading slash of course.
    
    Fixes: 4fbc0c711b24 ("ceph: remove the extra slashes in the server path")
    Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Luis Henriques <lhenriques@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 420343650d3ef33289c44c9cd00e208a1c9e16d2
Author: Xiubo Li <xiubli@redhat.com>
Date:   Fri Dec 20 09:34:04 2019 -0500

    ceph: remove the extra slashes in the server path
    
    commit 4fbc0c711b2464ee1551850b85002faae0b775d5 upstream.
    
    It's possible to pass the mount helper a server path that has more
    than one contiguous slash character. For example:
    
      $ mount -t ceph 192.168.195.165:40176:/// /mnt/cephfs/
    
    In the MDS server side the extra slashes of the server path will be
    treated as snap dir, and then we can get the following debug logs:
    
      ceph:  mount opening path //
      ceph:  open_root_inode opening '//'
      ceph:  fill_trace 0000000059b8a3bc is_dentry 0 is_target 1
      ceph:  alloc_inode 00000000dc4ca00b
      ceph:  get_inode created new inode 00000000dc4ca00b 1.ffffffffffffffff ino 1
      ceph:  get_inode on 1=1.ffffffffffffffff got 00000000dc4ca00b
    
    And then when creating any new file or directory under the mount
    point, we can hit the following BUG_ON in ceph_fill_trace():
    
      BUG_ON(ceph_snap(dir) != dvino.snap);
    
    Have the client ignore the extra slashes in the server path when
    mounting. This will also canonicalize the path, so that identical mounts
    can be consilidated.
    
    1) "//mydir1///mydir//"
    2) "/mydir1/mydir"
    3) "/mydir1/mydir/"
    
    Regardless of the internal treatment of these paths, the kernel still
    stores the original string including the leading '/' for presentation
    to userland.
    
    URL: https://tracker.ceph.com/issues/42771
    Signed-off-by: Xiubo Li <xiubli@redhat.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Luis Henriques <lhenriques@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d03460035f0b017ec111dda3af7a17e282229f27
Author: Kaike Wan <kaike.wan@intel.com>
Date:   Thu Mar 26 12:38:07 2020 -0400

    IB/hfi1: Fix memory leaks in sysfs registration and unregistration
    
    commit 5c15abc4328ad696fa61e2f3604918ed0c207755 upstream.
    
    When the hfi1 driver is unloaded, kmemleak will report the following
    issue:
    
    unreferenced object 0xffff8888461a4c08 (size 8):
    comm "kworker/0:0", pid 5, jiffies 4298601264 (age 2047.134s)
    hex dump (first 8 bytes):
    73 64 6d 61 30 00 ff ff sdma0...
    backtrace:
    [<00000000311a6ef5>] kvasprintf+0x62/0xd0
    [<00000000ade94d9f>] kobject_set_name_vargs+0x1c/0x90
    [<0000000060657dbb>] kobject_init_and_add+0x5d/0xb0
    [<00000000346fe72b>] 0xffffffffa0c5ecba
    [<000000006cfc5819>] 0xffffffffa0c866b9
    [<0000000031c65580>] 0xffffffffa0c38e87
    [<00000000e9739b3f>] local_pci_probe+0x41/0x80
    [<000000006c69911d>] work_for_cpu_fn+0x16/0x20
    [<00000000601267b5>] process_one_work+0x171/0x380
    [<0000000049a0eefa>] worker_thread+0x1d1/0x3f0
    [<00000000909cf2b9>] kthread+0xf8/0x130
    [<0000000058f5f874>] ret_from_fork+0x35/0x40
    
    This patch fixes the issue by:
    
    - Releasing dd->per_sdma[i].kobject in hfi1_unregister_sysfs().
      - This will fix the memory leak.
    
    - Calling kobject_put() to unwind operations only for those entries in
       dd->per_sdma[] whose operations have succeeded (including the current
       one that has just failed) in hfi1_verbs_register_sysfs().
    
    Cc: <stable@vger.kernel.org>
    Fixes: 0cb2aa690c7e ("IB/hfi1: Add sysfs interface for affinity setup")
    Link: https://lore.kernel.org/r/20200326163807.21129.27371.stgit@awfm-01.aw.intel.com
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Kaike Wan <kaike.wan@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8e2335d85414583d7827fec5b6275d17d1cfded6
Author: Kaike Wan <kaike.wan@intel.com>
Date:   Thu Mar 26 12:38:14 2020 -0400

    IB/hfi1: Call kobject_put() when kobject_init_and_add() fails
    
    commit dfb5394f804ed4fcea1fc925be275a38d66712ab upstream.
    
    When kobject_init_and_add() returns an error in the function
    hfi1_create_port_files(), the function kobject_put() is not called for the
    corresponding kobject, which potentially leads to memory leak.
    
    This patch fixes the issue by calling kobject_put() even if
    kobject_init_and_add() fails.
    
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20200326163813.21129.44280.stgit@awfm-01.aw.intel.com
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Kaike Wan <kaike.wan@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4fbcbe65dc4d2fed56e668da54d1a7892538abed
Author: Paul Cercueil <paul@crapouillou.net>
Date:   Fri Mar 6 23:29:27 2020 +0100

    ASoC: jz4740-i2s: Fix divider written at incorrect offset in register
    
    commit 9401d5aa328e64617d87abd59af1c91cace4c3e4 upstream.
    
    The 4-bit divider value was written at offset 8, while the jz4740
    programming manual locates it at offset 0.
    
    Fixes: 26b0aad80a86 ("ASoC: jz4740: Add dynamic sampling rate support to jz4740-i2s")
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200306222931.39664-2-paul@crapouillou.net
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b3e6164647f2c5d3bcb1ca2ee597fce6d81ae39a
Author: Martin Kaiser <martin@kaiser.cx>
Date:   Thu Mar 5 21:58:20 2020 +0100

    hwrng: imx-rngc - fix an error path
    
    commit 47a1f8e8b3637ff5f7806587883d7d94068d9ee8 upstream.
    
    Make sure that the rngc interrupt is masked if the rngc self test fails.
    Self test failure means that probe fails as well. Interrupts should be
    masked in this case, regardless of the error.
    
    Cc: stable@vger.kernel.org
    Fixes: 1d5449445bd0 ("hwrng: mx-rngc - add a driver for Freescale RNGC")
    Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
    Signed-off-by: Martin Kaiser <martin@kaiser.cx>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7ab127c8e113345920fe561fef93f82b9122896f
Author: David Ahern <dsahern@kernel.org>
Date:   Wed Apr 1 21:02:25 2020 -0700

    tools/accounting/getdelays.c: fix netlink attribute length
    
    commit 4054ab64e29bb05b3dfe758fff3c38a74ba753bb upstream.
    
    A recent change to the netlink code: 6e237d099fac ("netlink: Relax attr
    validation for fixed length types") logs a warning when programs send
    messages with invalid attributes (e.g., wrong length for a u32).  Yafang
    reported this error message for tools/accounting/getdelays.c.
    
    send_cmd() is wrongly adding 1 to the attribute length.  As noted in
    include/uapi/linux/netlink.h nla_len should be NLA_HDRLEN + payload
    length, so drop the +1.
    
    Fixes: 9e06d3f9f6b1 ("per task delay accounting taskstats interface: documentation fix")
    Reported-by: Yafang Shao <laoar.shao@gmail.com>
    Signed-off-by: David Ahern <dsahern@kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Tested-by: Yafang Shao <laoar.shao@gmail.com>
    Cc: Johannes Berg <johannes@sipsolutions.net>
    Cc: Shailabh Nagar <nagar@watson.ibm.com>
    Cc: <stable@vger.kernel.org>
    Link: http://lkml.kernel.org/r/20200327173111.63922-1-dsahern@kernel.org
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fe60e0dd50297ca080ee16e4ff0bc9d2fee5f9bd
Author: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Date:   Thu Mar 5 13:24:01 2020 -0800

    usb: dwc3: gadget: Wrap around when skip TRBs
    
    commit 2dedea035ae82c5af0595637a6eda4655532b21e upstream.
    
    When skipping TRBs, we need to account for wrapping around the ring
    buffer and not modifying some invalid TRBs. Without this fix, dwc3 won't
    be able to check for available TRBs.
    
    Cc: stable <stable@vger.kernel.org>
    Fixes: 7746a8dfb3f9 ("usb: dwc3: gadget: extract dwc3_gadget_ep_skip_trbs()")
    Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
    Signed-off-by: Felipe Balbi <balbi@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 259f9d9a290e89fca1537b736c0d6cb133b42d40
Author: Jason A. Donenfeld <Jason@zx2c4.com>
Date:   Fri Feb 21 21:10:37 2020 +0100

    random: always use batched entropy for get_random_u{32,64}
    
    commit 69efea712f5b0489e67d07565aad5c94e09a3e52 upstream.
    
    It turns out that RDRAND is pretty slow. Comparing these two
    constructions:
    
      for (i = 0; i < CHACHA_BLOCK_SIZE; i += sizeof(ret))
        arch_get_random_long(&ret);
    
    and
    
      long buf[CHACHA_BLOCK_SIZE / sizeof(long)];
      extract_crng((u8 *)buf);
    
    it amortizes out to 352 cycles per long for the top one and 107 cycles
    per long for the bottom one, on Coffee Lake Refresh, Intel Core i9-9880H.
    
    And importantly, the top one has the drawback of not benefiting from the
    real rng, whereas the bottom one has all the nice benefits of using our
    own chacha rng. As get_random_u{32,64} gets used in more places (perhaps
    beyond what it was originally intended for when it was introduced as
    get_random_{int,long} back in the md5 monstrosity era), it seems like it
    might be a good thing to strengthen its posture a tiny bit. Doing this
    should only be stronger and not any weaker because that pool is already
    initialized with a bunch of rdrand data (when available). This way, we
    get the benefits of the hardware rng as well as our own rng.
    
    Another benefit of this is that we no longer hit pitfalls of the recent
    stream of AMD bugs in RDRAND. One often used code pattern for various
    things is:
    
      do {
            val = get_random_u32();
      } while (hash_table_contains_key(val));
    
    That recent AMD bug rendered that pattern useless, whereas we're really
    very certain that chacha20 output will give pretty distributed numbers,
    no matter what.
    
    So, this simplification seems better both from a security perspective
    and from a performance perspective.
    
    Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20200221201037.30231-1-Jason@zx2c4.com
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b12448912c5e3c38f5baa58fb1f8912a1926a542
Author: Petr Machata <petrm@mellanox.com>
Date:   Sun Apr 5 09:50:22 2020 +0300

    mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE
    
    [ Upstream commit ccfc569347f870830e7c7cf854679a06cf9c45b5 ]
    
    The handler for FLOW_ACTION_VLAN_MANGLE ends by returning whatever the
    lower-level function that it calls returns. If there are more actions lined
    up after this action, those are never offloaded. Fix by only bailing out
    when the called function returns an error.
    
    Fixes: a150201a70da ("mlxsw: spectrum: Add support for vlan modify TC action")
    Signed-off-by: Petr Machata <petrm@mellanox.com>
    Reviewed-by: Jiri Pirko <jiri@mellanox.com>
    Signed-off-by: Ido Schimmel <idosch@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b774578329afb238ccd504477731129aa15e9ec2
Author: Richard Palethorpe <rpalethorpe@suse.com>
Date:   Wed Apr 1 12:06:39 2020 +0200

    slcan: Don't transmit uninitialized stack data in padding
    
    [ Upstream commit b9258a2cece4ec1f020715fe3554bc2e360f6264 ]
    
    struct can_frame contains some padding which is not explicitly zeroed in
    slc_bump. This uninitialized data will then be transmitted if the stack
    initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).
    
    This commit just zeroes the whole struct including the padding.
    
    Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
    Fixes: a1044e36e457 ("can: add slcan driver for serial/USB-serial CAN adapters")
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Cc: linux-can@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: security@kernel.org
    Cc: wg@grandegger.com
    Cc: mkl@pengutronix.de
    Cc: davem@davemloft.net
    Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2b421960553495c4582605e408841a0f5229c2e1
Author: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Date:   Fri Apr 3 10:23:29 2020 +0800

    net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting
    
    [ Upstream commit 3e1221acf6a8f8595b5ce354bab4327a69d54d18 ]
    
    Commit 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address
    entries") cleared the unused mac address entries, but introduced an
    out-of bounds mac address register programming bug -- After setting
    the secondary unicast mac addresses, the "reg" value has reached
    netdev_uc_count() + 1, thus we should only clear address entries
    if (addr < perfect_addr_number)
    
    Fixes: 9463c4455900 ("net: stmmac: dwmac1000: Clear unused address entries")
    Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1c61c869d12bf38c70490afcbeb84ac6c5ab8bd6
Author: Oleksij Rempel <linux@rempel-privat.de>
Date:   Fri Apr 3 09:53:25 2020 +0200

    net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers
    
    [ Upstream commit 6110dff776f7fa65c35850ef65b41d3b39e2fac2 ]
    
    After the power-down bit is cleared, the chip internally triggers a
    global reset. According to the KSZ9031 documentation, we have to wait at
    least 1ms for the reset to finish.
    
    If the chip is accessed during reset, read will return 0xffff, while
    write will be ignored. Depending on the system performance and MDIO bus
    speed, we may or may not run in to this issue.
    
    This bug was discovered on an iMX6QP system with KSZ9031 PHY and
    attached PHY interrupt line. If IRQ was used, the link status update was
    lost. In polling mode, the link status update was always correct.
    
    The investigation showed, that during a read-modify-write access, the
    read returned 0xffff (while the chip was still in reset) and
    corresponding write hit the chip _after_ reset and triggered (due to the
    0xffff) another reset in an undocumented bit (register 0x1f, bit 1),
    resulting in the next write being lost due to the new reset cycle.
    
    This patch fixes the issue by adding a 1...2 ms sleep after the
    genphy_resume().
    
    Fixes: 836384d2501d ("net: phy: micrel: Add specific suspend")
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 824f3d0139d848fff92caee01980c48780a4d1aa
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Sun Apr 5 13:00:30 2020 -0700

    net: dsa: bcm_sf2: Ensure correct sub-node is parsed
    
    [ Upstream commit afa3b592953bfaecfb4f2f335ec5f935cff56804 ]
    
    When the bcm_sf2 was converted into a proper platform device driver and
    used the new dsa_register_switch() interface, we would still be parsing
    the legacy DSA node that contained all the port information since the
    platform firmware has intentionally maintained backward and forward
    compatibility to client programs. Ensure that we do parse the correct
    node, which is "ports" per the revised DSA binding.
    
    Fixes: d9338023fb8e ("net: dsa: bcm_sf2: Make it a real platform device driver")
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 41c6a1ecc9ed3586b2c6c4caf5fb2485660d3a51
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Sat Apr 4 14:35:17 2020 -0700

    net: dsa: bcm_sf2: Do not register slave MDIO bus with OF
    
    [ Upstream commit 536fab5bf5826404534a6c271f622ad2930d9119 ]
    
    We were registering our slave MDIO bus with OF and doing so with
    assigning the newly created slave_mii_bus of_node to the master MDIO bus
    controller node. This is a bad thing to do for a number of reasons:
    
    - we are completely lying about the slave MII bus is arranged and yet we
      still want to control which MDIO devices it probes. It was attempted
      before to play tricks with the bus_mask to perform that:
      https://www.spinics.net/lists/netdev/msg429420.html but the approach
      was rightfully rejected
    
    - the device_node reference counting is messed up and we are effectively
      doing a double probe on the devices we already probed using the
      master, this messes up all resources reference counts (such as clocks)
    
    The proper fix for this as indicated by David in his reply to the
    thread above is to use a platform data style registration so as to
    control exactly which devices we probe:
    https://www.spinics.net/lists/netdev/msg430083.html
    
    By using mdiobus_register(), our slave_mii_bus->phy_mask value is used
    as intended, and all the PHY addresses that must be redirected towards
    our slave MDIO bus is happening while other addresses get redirected
    towards the master MDIO bus.
    
    Fixes: 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus")
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: Vivien Didelot <vivien.didelot@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7a5f4bd6868cc21ea9d4471265d662f7c487c3fc
Author: Jarod Wilson <jarod@redhat.com>
Date:   Mon Mar 30 11:22:19 2020 -0400

    ipv6: don't auto-add link-local address to lag ports
    
    [ Upstream commit 744fdc8233f6aa9582ce08a51ca06e59796a3196 ]
    
    Bonding slave and team port devices should not have link-local addresses
    automatically added to them, as it can interfere with openvswitch being
    able to properly add tc ingress.
    
    Basic reproducer, courtesy of Marcelo:
    
    $ ip link add name bond0 type bond
    $ ip link set dev ens2f0np0 master bond0
    $ ip link set dev ens2f1np2 master bond0
    $ ip link set dev bond0 up
    $ ip a s
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: ens2f0np0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc
    mq master bond0 state UP group default qlen 1000
        link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
    5: ens2f1np2: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
    mq master bond0 state DOWN group default qlen 1000
        link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
    11: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc
    noqueue state UP group default qlen 1000
        link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
        inet6 fe80::20f:53ff:fe2f:ea40/64 scope link
           valid_lft forever preferred_lft forever
    
    (above trimmed to relevant entries, obviously)
    
    $ sysctl net.ipv6.conf.ens2f0np0.addr_gen_mode=0
    net.ipv6.conf.ens2f0np0.addr_gen_mode = 0
    $ sysctl net.ipv6.conf.ens2f1np2.addr_gen_mode=0
    net.ipv6.conf.ens2f1np2.addr_gen_mode = 0
    
    $ ip a l ens2f0np0
    2: ens2f0np0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc
    mq master bond0 state UP group default qlen 1000
        link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
        inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative
           valid_lft forever preferred_lft forever
    $ ip a l ens2f1np2
    5: ens2f1np2: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc
    mq master bond0 state DOWN group default qlen 1000
        link/ether 00:0f:53:2f:ea:40 brd ff:ff:ff:ff:ff:ff
        inet6 fe80::20f:53ff:fe2f:ea40/64 scope link tentative
           valid_lft forever preferred_lft forever
    
    Looks like addrconf_sysctl_addr_gen_mode() bypasses the original "is
    this a slave interface?" check added by commit c2edacf80e15, and
    results in an address getting added, while w/the proposed patch added,
    no address gets added. This simply adds the same gating check to another
    code path, and thus should prevent the same devices from erroneously
    obtaining an ipv6 link-local address.
    
    Fixes: d35a00b8e33d ("net/ipv6: allow sysctl to change link-local address generation mode")
    Reported-by: Moshe Levi <moshele@mellanox.com>
    CC: Stephen Hemminger <stephen@networkplumber.org>
    CC: Marcelo Ricardo Leitner <mleitner@redhat.com>
    CC: netdev@vger.kernel.org
    Signed-off-by: Jarod Wilson <jarod@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fa138035f104ae14651ee3217d81fc16cd3aba4d
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Wed Apr 1 21:10:58 2020 -0700

    mm: mempolicy: require at least one nodeid for MPOL_PREFERRED
    
    commit aa9f7d5172fac9bf1f09e678c35e287a40a7b7dd upstream.
    
    Using an empty (malformed) nodelist that is not caught during mount option
    parsing leads to a stack-out-of-bounds access.
    
    The option string that was used was: "mpol=prefer:,".  However,
    MPOL_PREFERRED requires a single node number, which is not being provided
    here.
    
    Add a check that 'nodes' is not empty after parsing for MPOL_PREFERRED's
    nodeid.
    
    Fixes: 095f1fc4ebf3 ("mempolicy: rework shmem mpol parsing and display")
    Reported-by: Entropy Moe <3ntr0py1337@gmail.com>
    Reported-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Tested-by: syzbot+b055b1a6b2b958707a21@syzkaller.appspotmail.com
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Link: http://lkml.kernel.org/r/89526377-7eb6-b662-e1d8-4430928abde9@infradead.org
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 652f722240acace2b32124f7482965fd23fb5147
Author: Sam Protsenko <semen.protsenko@linaro.org>
Date:   Fri Nov 2 15:47:53 2018 -0700

    include/linux/notifier.h: SRCU: fix ctags
    
    commit 94e297c50b529f5d01cfd1dbc808d61e95180ab7 upstream.
    
    ctags indexing ("make tags" command) throws this warning:
    
        ctags: Warning: include/linux/notifier.h:125:
        null expansion of name pattern "\1"
    
    This is the result of DEFINE_PER_CPU() macro expansion.  Fix that by
    getting rid of line break.
    
    Similar fix was already done in commit 25528213fe9f ("tags: Fix
    DEFINE_PER_CPU expansions"), but this one probably wasn't noticed.
    
    Link: http://lkml.kernel.org/r/20181030202808.28027-1-semen.protsenko@linaro.org
    Fixes: 9c80172b902d ("kernel/SRCU: provide a static initializer")
    Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
    Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 442d7668a54d27b60033e5c4bc73303c21b0f52e
Author: Miklos Szeredi <mszeredi@redhat.com>
Date:   Mon Oct 15 15:43:06 2018 +0200

    bitops: protect variables in set_mask_bits() macro
    
    commit 18127429a854e7607b859484880b8e26cee9ddab upstream.
    
    Unprotected naming of local variables within the set_mask_bits() can easily
    lead to using the wrong scope.
    
    Noticed this when "set_mask_bits(&foo->bar, 0, mask)" behaved as no-op.
    
    Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
    Fixes: 00a1a053ebe5 ("ext4: atomically set inode->i_flags in ext4_set_inode_flags()")
    Cc: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bf498d6b8d6017c7e1c7908190fa57508f823268
Author: Daniel Jordan <daniel.m.jordan@oracle.com>
Date:   Tue Dec 3 14:31:11 2019 -0500

    padata: always acquire cpu_hotplug_lock before pinst->lock
    
    commit 38228e8848cd7dd86ccb90406af32de0cad24be3 upstream.
    
    lockdep complains when padata's paths to update cpumasks via CPU hotplug
    and sysfs are both taken:
    
      # echo 0 > /sys/devices/system/cpu/cpu1/online
      # echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask
    
      ======================================================
      WARNING: possible circular locking dependency detected
      5.4.0-rc8-padata-cpuhp-v3+ #1 Not tainted
      ------------------------------------------------------
      bash/205 is trying to acquire lock:
      ffffffff8286bcd0 (cpu_hotplug_lock.rw_sem){++++}, at: padata_set_cpumask+0x2b/0x120
    
      but task is already holding lock:
      ffff8880001abfa0 (&pinst->lock){+.+.}, at: padata_set_cpumask+0x26/0x120
    
      which lock already depends on the new lock.
    
    padata doesn't take cpu_hotplug_lock and pinst->lock in a consistent
    order.  Which should be first?  CPU hotplug calls into padata with
    cpu_hotplug_lock already held, so it should have priority.
    
    Fixes: 6751fb3c0e0c ("padata: Use get_online_cpus/put_online_cpus")
    Signed-off-by: Daniel Jordan <daniel.m.jordan@oracle.com>
    Cc: Eric Biggers <ebiggers@kernel.org>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Steffen Klassert <steffen.klassert@secunet.com>
    Cc: linux-crypto@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b1cb7f2bc9b4f776ae1ab9583802b1bca34d215a
Author: Amritha Nambiar <amritha.nambiar@intel.com>
Date:   Mon Feb 24 10:56:00 2020 -0800

    net: Fix Tx hash bound checking
    
    commit 6e11d1578fba8d09d03a286740ffcf336d53928c upstream.
    
    Fixes the lower and upper bounds when there are multiple TCs and
    traffic is on the the same TC on the same device.
    
    The lower bound is represented by 'qoffset' and the upper limit for
    hash value is 'qcount + qoffset'. This gives a clean Rx to Tx queue
    mapping when there are multiple TCs, as the queue indices for upper TCs
    will be offset by 'qoffset'.
    
    v2: Fixed commit description based on comments.
    
    Fixes: 1b837d489e06 ("net: Revoke export for __skb_tx_hash, update it to just be static skb_tx_hash")
    Fixes: eadec877ce9c ("net: Add support for subordinate traffic classes to netdev_pick_tx")
    Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
    Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
    Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e9de0d1bc101fcc49296c0ae8e62fc950907d788
Author: David Howells <dhowells@redhat.com>
Date:   Fri Mar 13 17:30:27 2020 +0000

    rxrpc: Fix sendmsg(MSG_WAITALL) handling
    
    commit 498b577660f08cef5d9e78e0ed6dcd4c0939e98c upstream.
    
    Fix the handling of sendmsg() with MSG_WAITALL for userspace to round the
    timeout for when a signal occurs up to at least two jiffies as a 1 jiffy
    timeout may end up being effectively 0 if jiffies wraps at the wrong time.
    
    Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals")
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f40ff192cacdbb16bba75290764981613bb8a00d
Author: Geoffrey Allott <geoffrey@allott.email>
Date:   Thu Mar 19 14:00:48 2020 +0000

    ALSA: hda/ca0132 - Add Recon3Di quirk to handle integrated sound on EVGA X99 Classified motherboard
    
    commit e9097e47e349b747dee50f935216de0ffb662962 upstream.
    
    I have a system which has an EVGA X99 Classified motherboard. The pin
    assignments for the HD Audio controller are not correct under Linux.
    Windows 10 works fine and informs me that it's using the Recon3Di
    driver, and on Linux, `cat
    /sys/class/sound/card0/device/subsystem_{vendor,device}` yields
    
    0x3842
    0x1038
    
    This patch adds a corresponding entry to the quirk list.
    
    Signed-off-by: Geoffrey Allott <geoffrey@allott.email>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/a6cd56b678c00ce2db3685e4278919f2584f8244.camel@allott.email
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ec025feb393eda07f60c39d7d7c8d58524a1b4e2
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sun Feb 23 16:32:08 2020 +0100

    power: supply: axp288_charger: Add special handling for HP Pavilion x2 10
    
    commit 9c80662a74cd2a5d1113f5c69d027face963a556 upstream.
    
    Some HP Pavilion x2 10 models use an AXP288 for charging and fuel-gauge.
    We use a native power_supply / PMIC driver in this case, because on most
    models with an AXP288 the ACPI AC / Battery code is either completely
    missing or relies on custom / proprietary ACPI OpRegions which Linux
    does not implement.
    
    The native drivers mostly work fine, but there are 2 problems:
    
    1. These model uses a Type-C connector for charging which the AXP288 does
    not support. As long as a Type-A charger (which uses the USB data pins for
    charger type detection) is used everything is fine. But if a Type-C
    charger is used (such as the charger shipped with the device) then the
    charger is not recognized.
    
    So we end up slowly discharging the device even though a charger is
    connected, because we are limiting the current from the charger to 500mA.
    To make things worse this happens with the device's official charger.
    
    Looking at the ACPI tables HP has "solved" the problem of the AXP288 not
    being able to recognize Type-C chargers by simply always programming the
    input-current-limit at 3000mA and relying on a Vhold setting of 4.7V
    (normally 4.4V) to limit the current intake if the charger cannot handle
    this.
    
    2. If no charger is connected when the machine boots then it boots with the
    vbus-path disabled. On other devices this is done when a 5V boost converter
    is active to avoid the PMIC trying to charge from the 5V boost output.
    This is done when an OTG host cable is inserted and the ID pin on the
    micro-B receptacle is pulled low, the ID pin has an ACPI event handler
    associated with it which re-enables the vbus-path when the ID pin is pulled
    high when the OTG cable is removed. The Type-C connector has no ID pin,
    there is no ID pin handler and there appears to be no 5V boost converter,
    so we end up not charging because the vbus-path is disabled, until we
    unplug the charger which automatically clears the vbus-path disable bit and
    then on the second plug-in of the adapter we start charging.
    
    The HP Pavilion x2 10 models with an AXP288 do have mostly working ACPI
    AC / Battery code which does not rely on custom / proprietary ACPI
    OpRegions. So one possible solution would be to blacklist the AXP288
    native power_supply drivers and add the HP Pavilion x2 10 with AXP288
    DMI ids to the list of devices which should use the ACPI AC / Battery
    code even though they have an AXP288 PMIC. This would require changes to
    4 files: drivers/acpi/ac.c, drivers/power/supply/axp288_charger.c,
    drivers/acpi/battery.c and drivers/power/supply/axp288_fuel_gauge.c.
    
    Beside needing adding the same DMI matches to 4 different files, this
    approach also triggers problem 2. from above, but then when suspended,
    during suspend the machine will not wakeup because the vbus path is
    disabled by the AML code when not charging, so the Vbus low-to-high
    IRQ is not triggered, the CPU never wakes up and the device does not
    charge even though the user likely things it is charging, esp. since
    the charge status LED is directly coupled to an adapter being plugged
    in and does not reflect actual charging.
    
    This could be worked by enabling vbus-path explicitly from say the
    axp288_charger driver's suspend handler.
    
    So neither situation is ideal, in both cased we need to explicitly enable
    the vbus-path to work around different variants of problem 2 above, this
    requires a quirk in the axp288_charger code.
    
    If we go the route of using the ACPI AC / Battery drivers then we need
    modifications to 3 other drivers; and we need to partially disable the
    axp288_charger code, while at the same time keeping it around to enable
    vbus-path on suspend.
    
    OTOH we can copy the hardcoding of 3A input-current-limit (we never touch
    Vhold, so that would stay at 4.7V) to the axp288_charger code, which needs
    changes regardless, then we concentrate all special handling of this
    interesting device model in the axp288_charger code. That is what this
    commit does.
    
    Cc: stable@vger.kernel.org
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1791098
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4d115a4b1452ea6522e65186c623874eb05e24b4
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Mar 23 22:59:39 2020 +0100

    extcon: axp288: Add wakeup support
    
    commit 9c94553099efb2ba873cbdddfd416a8a09d0e5f1 upstream.
    
    On devices with an AXP288, we need to wakeup from suspend when a charger
    is plugged in, so that we can do charger-type detection and so that the
    axp288-charger driver, which listens for our extcon events, can configure
    the input-current-limit accordingly.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d93096e0ec2e5ad4fc1ed3d468c1ff13e9dedef6
Author: Alexander Usyskin <alexander.usyskin@intel.com>
Date:   Tue Mar 24 23:07:30 2020 +0200

    mei: me: add cedar fork device ids
    
    commit 99397d33b763dc554d118aaa38cc5abc6ce985de upstream.
    
    Add Cedar Fork (CDF) device ids, those belongs to the cannon point family.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
    Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
    Link: https://lore.kernel.org/r/20200324210730.17672-1-tomas.winkler@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80adb710a1ad05233a847ecea9bcd3d2a48f24bf
Author: Eugene Syromiatnikov <esyr@redhat.com>
Date:   Tue Mar 24 05:22:13 2020 +0100

    coresight: do not use the BIT() macro in the UAPI header
    
    commit 9b6eaaf3db5e5888df7bca7fed7752a90f7fd871 upstream.
    
    The BIT() macro definition is not available for the UAPI headers
    (moreover, it can be defined differently in the user space); replace
    its usage with the _BITUL() macro that is defined in <linux/const.h>.
    
    Fixes: 237483aa5cf4 ("coresight: stm: adding driver for CoreSight STM component")
    Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
    Cc: stable <stable@vger.kernel.org>
    Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
    Link: https://lore.kernel.org/r/20200324042213.GA10452@asgard.redhat.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a2953989e5af2ca11f74b433fb0aadb2bff2dd88
Author: Kishon Vijay Abraham I <kishon@ti.com>
Date:   Tue Mar 17 15:31:54 2020 +0530

    misc: pci_endpoint_test: Avoid using module parameter to determine irqtype
    
    commit b2ba9225e0313b1de631a44b7b48c109032bffec upstream.
    
    commit e03327122e2c ("pci_endpoint_test: Add 2 ioctl commands")
    uses module parameter 'irqtype' in pci_endpoint_test_set_irq()
    to check if IRQ vectors of a particular type (MSI or MSI-X or
    LEGACY) is already allocated. However with multi-function devices,
    'irqtype' will not correctly reflect the IRQ type of the PCI device.
    
    Fix it here by adding 'irqtype' for each PCI device to show the
    IRQ type of a particular PCI device.
    
    Fixes: e03327122e2c ("pci_endpoint_test: Add 2 ioctl commands")
    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: stable@vger.kernel.org # v4.19+
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5efa263c7385eacb9c1b8ed55e81dc613c4e3b82
Author: Kishon Vijay Abraham I <kishon@ti.com>
Date:   Tue Mar 17 15:31:57 2020 +0530

    misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
    
    commit 6b443e5c80b67a7b8a85b33d052d655ef9064e90 upstream.
    
    Adding more than 10 pci-endpoint-test devices results in
    "kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
    try to register things with the same name in the same directory". This
    is because commit 2c156ac71c6b ("misc: Add host side PCI driver for PCI
    test function device") limited the length of the "name" to 20 characters.
    Change the length of the name to 24 in order to support upto 10000
    pci-endpoint-test devices.
    
    Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device")
    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
    Cc: stable@vger.kernel.org # v4.14+
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f61711d182e1bf5cd9364df794de872eb9df735f
Author: YueHaibing <yuehaibing@huawei.com>
Date:   Thu Mar 26 11:26:18 2020 +0800

    misc: rtsx: set correct pcr_ops for rts522A
    
    commit 10cea23b6aae15e8324f4101d785687f2c514fe5 upstream.
    
    rts522a should use rts522a_pcr_ops, which is
    diffrent with rts5227 in phy/hw init setting.
    
    Fixes: ce6a5acc9387 ("mfd: rtsx: Add support for rts522A")
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Cc: stable <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20200326032618.20472-1-yuehaibing@huawei.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 432da4ae44d0b64cdebe463f2b40e2a039706213
Author: Sean Young <sean@mess.org>
Date:   Thu Jun 13 04:49:26 2019 -0400

    media: rc: IR signal for Panasonic air conditioner too long
    
    commit 5c4c8b4a999019f19e770cb55cbacb89c95897bd upstream.
    
    The IR signal to control the Panasonic ACXA75C00600 air conditioner has
    439 pulse/spaces. Increase limit to make it possible to transmit signal.
    
    Reported-by: Takashi Kanamaru <neuralassembly@gmail.com>
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3c62781195f6d74508383dbe394679cbbe8417ab
Author: Lucas Stach <l.stach@pengutronix.de>
Date:   Fri Jul 5 19:17:23 2019 +0200

    drm/etnaviv: replace MMU flush marker with flush sequence
    
    commit 4900dda90af2cb13bc1d4c12ce94b98acc8fe64e upstream.
    
    If a MMU is shared between multiple GPUs, all of them need to flush their
    TLBs, so a single marker that gets reset on the first flush won't do.
    Replace the flush marker with a sequence number, so that it's possible to
    check if the TLB is in sync with the current page table state for each GPU.
    
    Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
    Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
    Reviewed-by: Guido Günther <agx@sigxcpu.org>
    Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b3f9211797b59ef185c4a944d6d53a4ab7cda7a9
Author: Len Brown <len.brown@intel.com>
Date:   Thu Mar 19 18:26:05 2020 -0400

    tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks
    
    [ Upstream commit 1f81c5efc020314b2db30d77efe228b7e117750d ]
    
    Some Chromebook BIOS' do not export an ACPI LPIT, which is how
    Linux finds the residency counter for CPU and SYSTEM low power states,
    that is exports in /sys/devices/system/cpu/cpuidle/*residency_us
    
    When these sysfs attributes are missing, check the debugfs attrubte
    from the pmc_core driver, which accesses the same counter value.
    
    Signed-off-by: Len Brown <len.brown@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 97101ebd9cb40b6326e3a8301ee4f26eca5b4924
Author: Len Brown <len.brown@intel.com>
Date:   Thu Mar 19 18:33:12 2020 -0400

    tools/power turbostat: Fix gcc build warnings
    
    [ Upstream commit d8d005ba6afa502ca37ced5782f672c4d2fc1515 ]
    
    Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size
            [-Wstringop-truncation]
    
    reduce param to strncpy, to guarantee that a null byte is always copied
    into destination buffer.
    
    Signed-off-by: Len Brown <len.brown@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 7b9d4492808eb3c3ba43f6391b138101a7e9e42e
Author: James Zhu <James.Zhu@amd.com>
Date:   Wed Mar 18 17:09:05 2020 -0400

    drm/amdgpu: fix typo for vcn1 idle check
    
    [ Upstream commit acfc62dc68770aa665cc606891f6df7d6d1e52c0 ]
    
    fix typo for vcn1 idle check
    
    Signed-off-by: James Zhu <James.Zhu@amd.com>
    Reviewed-by: Leo Liu <leo.liu@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit fc145ab2e915341427bb7b453c377531e07b57a6
Author: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Date:   Mon Mar 16 14:25:19 2020 +0300

    initramfs: restore default compression behavior
    
    [ Upstream commit 785d74ec3bbf26ac7f6e92e6e96a259aec0f107a ]
    
    Even though INITRAMFS_SOURCE kconfig option isn't set in most of
    defconfigs it is used (set) extensively by various build systems.
    Commit f26661e12765 ("initramfs: make initramfs compression choice
    non-optional") has changed default compression mode. Previously we
    compress initramfs using available compression algorithm. Now
    we don't use any compression at all by default.
    It significantly increases the image size in case of build system
    chooses embedded initramfs. Initially I faced with this issue while
    using buildroot.
    
    As of today it's not possible to set preferred compression mode
    in target defconfig as this option depends on INITRAMFS_SOURCE
    being set. Modification of all build systems either doesn't look
    like good option.
    
    Let's instead rewrite initramfs compression mode choices list
    the way that "INITRAMFS_COMPRESSION_NONE" will be the last option
    in the list. In that case it will be chosen only if all other
    options (which implements any compression) are not available.
    
    Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 236c445eb3529aa7c976f8812513c3cb26d77e27
Author: Gerd Hoffmann <kraxel@redhat.com>
Date:   Fri Mar 13 09:41:52 2020 +0100

    drm/bochs: downgrade pci_request_region failure from error to warning
    
    [ Upstream commit 8c34cd1a7f089dc03933289c5d4a4d1489549828 ]
    
    Shutdown of firmware framebuffer has a bunch of problems.  Because
    of this the framebuffer region might still be reserved even after
    drm_fb_helper_remove_conflicting_pci_framebuffers() returned.
    
    Don't consider pci_request_region() failure for the framebuffer
    region as fatal error to workaround this issue.
    
    Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Acked-by: Sam Ravnborg <sam@ravnborg.org>
    Link: http://patchwork.freedesktop.org/patch/msgid/20200313084152.2734-1-kraxel@redhat.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a9049fd69bc4fdcc48ec3a638f1f470938354984
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Fri Feb 28 22:36:07 2020 +0100

    drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017
    
    [ Upstream commit dec9de2ada523b344eb2428abfedf9d6cd0a0029 ]
    
    This fixes a problem found on the MacBookPro 2017 Retina panel:
    
    The panel reports 10 bpc color depth in its EDID, and the
    firmware chooses link settings at boot which support enough
    bandwidth for 10 bpc (324000 kbit/sec aka LINK_RATE_RBR2
    aka 0xc), but the DP_MAX_LINK_RATE dpcd register only reports
    2.7 Gbps (multiplier value 0xa) as possible, in direct
    contradiction of what the firmware successfully set up.
    
    This restricts the panel to 8 bpc, not providing the full
    color depth of the panel on Linux <= 5.5. Additionally, commit
    '4a8ca46bae8a ("drm/amd/display: Default max bpc to 16 for eDP")'
    introduced into Linux 5.6-rc1 will unclamp panel depth to
    its full 10 bpc, thereby requiring a eDP bandwidth for all
    modes that exceeds the bandwidth available and causes all modes
    to fail validation -> No modes for the laptop panel -> failure
    to set any mode -> Panel goes dark.
    
    This patch adds a quirk specific to the MBP 2017 15" Retina
    panel to override reported max link rate to the correct maximum
    of 0xc = LINK_RATE_RBR2 to fix the darkness and reduced display
    precision.
    
    Please apply for Linux 5.6+ to avoid regressing Apple MBP panel
    support.
    
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 412b7023b8c25a578aa9ca2565d67f489cc3ab02
Author: Prabhath Sajeepa <psajeepa@purestorage.com>
Date:   Mon Mar 9 15:07:53 2020 -0600

    nvme-rdma: Avoid double freeing of async event data
    
    [ Upstream commit 9134ae2a2546cb96abddcd4469a79c77ee3a4480 ]
    
    The timeout of identify cmd, which is invoked as part of admin queue
    creation, can result in freeing of async event data both in
    nvme_rdma_timeout handler and error handling path of
    nvme_rdma_configure_admin queue thus causing NULL pointer reference.
    Call Trace:
     ? nvme_rdma_setup_ctrl+0x223/0x800 [nvme_rdma]
     nvme_rdma_create_ctrl+0x2ba/0x3f7 [nvme_rdma]
     nvmf_dev_write+0xa54/0xcc6 [nvme_fabrics]
     __vfs_write+0x1b/0x40
     vfs_write+0xb2/0x1b0
     ksys_write+0x61/0xd0
     __x64_sys_write+0x1a/0x20
     do_syscall_64+0x60/0x1e0
     entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    Reviewed-by: Roland Dreier <roland@purestorage.com>
    Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Prabhath Sajeepa <psajeepa@purestorage.com>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit e2ed7b117f3fe6aa0237568dcb69ed7f39cb4979
Author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date:   Thu Mar 26 20:47:46 2020 -0300

    sctp: fix possibly using a bad saddr with a given dst
    
    [ Upstream commit 582eea230536a6f104097dd46205822005d5fe3a ]
    
    Under certain circumstances, depending on the order of addresses on the
    interfaces, it could be that sctp_v[46]_get_dst() would return a dst
    with a mismatched struct flowi.
    
    For example, if when walking through the bind addresses and the first
    one is not a match, it saves the dst as a fallback (added in
    410f03831c07), but not the flowi. Then if the next one is also not a
    match, the previous dst will be returned but with the flowi information
    for the 2nd address, which is wrong.
    
    The fix is to use a locally stored flowi that can be used for such
    attempts, and copy it to the parameter only in case it is a possible
    match, together with the corresponding dst entry.
    
    The patch updates IPv6 code mostly just to be in sync. Even though the issue
    is also present there, it fallback is not expected to work with IPv6.
    
    Fixes: 410f03831c07 ("sctp: add routing output fallback")
    Reported-by: Jin Meng <meng.a.jin@nokia-sbell.com>
    Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Tested-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6ce6aea362d46781d4f5f03cfda16f0a395445d2
Author: Qiujun Huang <hqjagain@gmail.com>
Date:   Fri Mar 27 11:07:51 2020 +0800

    sctp: fix refcount bug in sctp_wfree
    
    [ Upstream commit 5c3e82fe159622e46e91458c1a6509c321a62820 ]
    
    We should iterate over the datamsgs to move
    all chunks(skbs) to newsk.
    
    The following case cause the bug:
    for the trouble SKB, it was in outq->transmitted list
    
    sctp_outq_sack
            sctp_check_transmitted
                    SKB was moved to outq->sacked list
            then throw away the sack queue
                    SKB was deleted from outq->sacked
    (but it was held by datamsg at sctp_datamsg_to_asoc
    So, sctp_wfree was not called here)
    
    then migrate happened
    
            sctp_for_each_tx_datachunk(
            sctp_clear_owner_w);
            sctp_assoc_migrate();
            sctp_for_each_tx_datachunk(
            sctp_set_owner_w);
    SKB was not in the outq, and was not changed to newsk
    
    finally
    
    __sctp_outq_teardown
            sctp_chunk_put (for another skb)
                    sctp_datamsg_put
                            __kfree_skb(msg->frag_list)
                                    sctp_wfree (for SKB)
            SKB->sk was still oldsk (skb->sk != asoc->base.sk).
    
    Reported-and-tested-by: syzbot+cea71eec5d6de256d54d@syzkaller.appspotmail.com
    Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
    Acked-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 48dee02237117c0758410fa4989ce71bdb6cf184
Author: William Dauchy <w.dauchy@criteo.com>
Date:   Fri Mar 27 19:56:39 2020 +0100

    net, ip_tunnel: fix interface lookup with no key
    
    [ Upstream commit 25629fdaff2ff509dd0b3f5ff93d70a75e79e0a1 ]
    
    when creating a new ipip interface with no local/remote configuration,
    the lookup is done with TUNNEL_NO_KEY flag, making it impossible to
    match the new interface (only possible match being fallback or metada
    case interface); e.g: `ip link add tunl1 type ipip dev eth0`
    
    To fix this case, adding a flag check before the key comparison so we
    permit to match an interface with no local/remote config; it also avoids
    breaking possible userland tools relying on TUNNEL_NO_KEY flag and
    uninitialised key.
    
    context being on my side, I'm creating an extra ipip interface attached
    to the physical one, and moving it to a dedicated namespace.
    
    Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
    Signed-off-by: William Dauchy <w.dauchy@criteo.com>
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6f2239a1ad0c965d9faeb5d175f8c6c163b4fa57
Author: Qian Cai <cai@lca.pw>
Date:   Wed Mar 25 18:01:00 2020 -0400

    ipv4: fix a RCU-list lock in fib_triestat_seq_show
    
    [ Upstream commit fbe4e0c1b298b4665ee6915266c9d6c5b934ef4a ]
    
    fib_triestat_seq_show() calls hlist_for_each_entry_rcu(tb, head,
    tb_hlist) without rcu_read_lock() will trigger a warning,
    
     net/ipv4/fib_trie.c:2579 RCU-list traversed in non-reader section!!
    
     other info that might help us debug this:
    
     rcu_scheduler_active = 2, debug_locks = 1
     1 lock held by proc01/115277:
      #0: c0000014507acf00 (&p->lock){+.+.}-{3:3}, at: seq_read+0x58/0x670
    
     Call Trace:
      dump_stack+0xf4/0x164 (unreliable)
      lockdep_rcu_suspicious+0x140/0x164
      fib_triestat_seq_show+0x750/0x880
      seq_read+0x1a0/0x670
      proc_reg_read+0x10c/0x1b0
      __vfs_read+0x3c/0x70
      vfs_read+0xac/0x170
      ksys_read+0x7c/0x140
      system_call+0x5c/0x68
    
    Fix it by adding a pair of rcu_read_lock/unlock() and use
    cond_resched_rcu() to avoid the situation where walking of a large
    number of items  may prevent scheduling for a long time.
    
    Signed-off-by: Qian Cai <cai@lca.pw>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>