commit 38cbdc4e3d0bd01bfb3ec16081bbf7dadfafd659
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Nov 24 13:39:15 2020 +0100

    Linux 5.9.11
    
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Guenter Roeck <linux@roeck-us.net>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Link: https://lore.kernel.org/r/20201123121835.580259631@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c68a9ca7ca33f1020cca97e4e935c2154bec37c7
Author: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Date:   Sat Nov 21 22:17:15 2020 -0800

    mm/userfaultfd: do not access vma->vm_mm after calling handle_userfault()
    
    commit bfe8cc1db02ab243c62780f17fc57f65bde0afe1 upstream.
    
    Alexander reported a syzkaller / KASAN finding on s390, see below for
    complete output.
    
    In do_huge_pmd_anonymous_page(), the pre-allocated pagetable will be
    freed in some cases.  In the case of userfaultfd_missing(), this will
    happen after calling handle_userfault(), which might have released the
    mmap_lock.  Therefore, the following pte_free(vma->vm_mm, pgtable) will
    access an unstable vma->vm_mm, which could have been freed or re-used
    already.
    
    For all architectures other than s390 this will go w/o any negative
    impact, because pte_free() simply frees the page and ignores the
    passed-in mm.  The implementation for SPARC32 would also access
    mm->page_table_lock for pte_free(), but there is no THP support in
    SPARC32, so the buggy code path will not be used there.
    
    For s390, the mm->context.pgtable_list is being used to maintain the 2K
    pagetable fragments, and operating on an already freed or even re-used
    mm could result in various more or less subtle bugs due to list /
    pagetable corruption.
    
    Fix this by calling pte_free() before handle_userfault(), similar to how
    it is already done in __do_huge_pmd_anonymous_page() for the WRITE /
    non-huge_zero_page case.
    
    Commit 6b251fc96cf2c ("userfaultfd: call handle_userfault() for
    userfaultfd_missing() faults") actually introduced both, the
    do_huge_pmd_anonymous_page() and also __do_huge_pmd_anonymous_page()
    changes wrt to calling handle_userfault(), but only in the latter case
    it put the pte_free() before calling handle_userfault().
    
      BUG: KASAN: use-after-free in do_huge_pmd_anonymous_page+0xcda/0xd90 mm/huge_memory.c:744
      Read of size 8 at addr 00000000962d6988 by task syz-executor.0/9334
    
      CPU: 1 PID: 9334 Comm: syz-executor.0 Not tainted 5.10.0-rc1-syzkaller-07083-g4c9720875573 #0
      Hardware name: IBM 3906 M04 701 (KVM/Linux)
      Call Trace:
        do_huge_pmd_anonymous_page+0xcda/0xd90 mm/huge_memory.c:744
        create_huge_pmd mm/memory.c:4256 [inline]
        __handle_mm_fault+0xe6e/0x1068 mm/memory.c:4480
        handle_mm_fault+0x288/0x748 mm/memory.c:4607
        do_exception+0x394/0xae0 arch/s390/mm/fault.c:479
        do_dat_exception+0x34/0x80 arch/s390/mm/fault.c:567
        pgm_check_handler+0x1da/0x22c arch/s390/kernel/entry.S:706
        copy_from_user_mvcos arch/s390/lib/uaccess.c:111 [inline]
        raw_copy_from_user+0x3a/0x88 arch/s390/lib/uaccess.c:174
        _copy_from_user+0x48/0xa8 lib/usercopy.c:16
        copy_from_user include/linux/uaccess.h:192 [inline]
        __do_sys_sigaltstack kernel/signal.c:4064 [inline]
        __s390x_sys_sigaltstack+0xc8/0x240 kernel/signal.c:4060
        system_call+0xe0/0x28c arch/s390/kernel/entry.S:415
    
      Allocated by task 9334:
        slab_alloc_node mm/slub.c:2891 [inline]
        slab_alloc mm/slub.c:2899 [inline]
        kmem_cache_alloc+0x118/0x348 mm/slub.c:2904
        vm_area_dup+0x9c/0x2b8 kernel/fork.c:356
        __split_vma+0xba/0x560 mm/mmap.c:2742
        split_vma+0xca/0x108 mm/mmap.c:2800
        mlock_fixup+0x4ae/0x600 mm/mlock.c:550
        apply_vma_lock_flags+0x2c6/0x398 mm/mlock.c:619
        do_mlock+0x1aa/0x718 mm/mlock.c:711
        __do_sys_mlock2 mm/mlock.c:738 [inline]
        __s390x_sys_mlock2+0x86/0xa8 mm/mlock.c:728
        system_call+0xe0/0x28c arch/s390/kernel/entry.S:415
    
      Freed by task 9333:
        slab_free mm/slub.c:3142 [inline]
        kmem_cache_free+0x7c/0x4b8 mm/slub.c:3158
        __vma_adjust+0x7b2/0x2508 mm/mmap.c:960
        vma_merge+0x87e/0xce0 mm/mmap.c:1209
        userfaultfd_release+0x412/0x6b8 fs/userfaultfd.c:868
        __fput+0x22c/0x7a8 fs/file_table.c:281
        task_work_run+0x200/0x320 kernel/task_work.c:151
        tracehook_notify_resume include/linux/tracehook.h:188 [inline]
        do_notify_resume+0x100/0x148 arch/s390/kernel/signal.c:538
        system_call+0xe6/0x28c arch/s390/kernel/entry.S:416
    
      The buggy address belongs to the object at 00000000962d6948 which belongs to the cache vm_area_struct of size 200
      The buggy address is located 64 bytes inside of 200-byte region [00000000962d6948, 00000000962d6a10)
      The buggy address belongs to the page: page:00000000313a09fe refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x962d6 flags: 0x3ffff00000000200(slab)
      raw: 3ffff00000000200 000040000257e080 0000000c0000000c 000000008020ba00
      raw: 0000000000000000 000f001e00000000 ffffffff00000001 0000000096959501
      page dumped because: kasan: bad access detected
      page->mem_cgroup:0000000096959501
    
      Memory state around the buggy address:
       00000000962d6880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       00000000962d6900: 00 fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
      >00000000962d6980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                            ^
       00000000962d6a00: fb fb fc fc fc fc fc fc fc fc 00 00 00 00 00 00
       00000000962d6a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ==================================================================
    
    Fixes: 6b251fc96cf2c ("userfaultfd: call handle_userfault() for userfaultfd_missing() faults")
    Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
    Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: <stable@vger.kernel.org>    [4.3+]
    Link: https://lkml.kernel.org/r/20201110190329.11920-1-gerald.schaefer@linux.ibm.com
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 64b9a62e51dd0b8fa05636c303f002d9b702d604
Author: Muchun Song <songmuchun@bytedance.com>
Date:   Sat Nov 21 22:17:12 2020 -0800

    mm: memcg/slab: fix root memcg vmstats
    
    commit 8faeb1ffd79593c9cd8a2a80ecdda371e3b826cb upstream.
    
    If we reparent the slab objects to the root memcg, when we free the slab
    object, we need to update the per-memcg vmstats to keep it correct for
    the root memcg.  Now this at least affects the vmstat of
    NR_KERNEL_STACK_KB for !CONFIG_VMAP_STACK when the thread stack size is
    smaller than the PAGE_SIZE.
    
    David said:
     "I assume that without this fix that the root memcg's vmstat would
      always be inflated if we reparented"
    
    Fixes: ec9f02384f60 ("mm: workingset: fix vmstat counters for shadow nodes")
    Signed-off-by: Muchun Song <songmuchun@bytedance.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Reviewed-by: Shakeel Butt <shakeelb@google.com>
    Acked-by: Roman Gushchin <guro@fb.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Acked-by: David Rientjes <rientjes@google.com>
    Cc: Michal Hocko <mhocko@kernel.org>
    Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
    Cc: Christopher Lameter <cl@linux.com>
    Cc: Pekka Enberg <penberg@kernel.org>
    Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
    Cc: Roman Gushchin <guro@fb.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Yafang Shao <laoar.shao@gmail.com>
    Cc: Chris Down <chris@chrisdown.name>
    Cc: <stable@vger.kernel.org>    [5.3+]
    Link: https://lkml.kernel.org/r/20201110031015.15715-1-songmuchun@bytedance.com
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9906d7a4839606307ca6bf072fd9a9d17f5daeac
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date:   Sat Nov 21 22:17:08 2020 -0800

    mm: fix readahead_page_batch for retry entries
    
    commit 4349a83a3190c1d4414371161b0f4a4c3ccd3f9d upstream.
    
    Both btrfs and fuse have reported faults caused by seeing a retry entry
    instead of the page they were looking for.  This was caused by a missing
    check in the iterator.
    
    As can be seen in the below panic log, the accessing 0x402 causes a
    panic.  In the xarray.h, 0x402 means RETRY_ENTRY.
    
      BUG: kernel NULL pointer dereference, address: 0000000000000402
      CPU: 14 PID: 306003 Comm: as Not tainted 5.9.0-1-amd64 #1 Debian 5.9.1-1
      Hardware name: Lenovo ThinkSystem SR665/7D2VCTO1WW, BIOS D8E106Q-1.01 05/30/2020
      RIP: 0010:fuse_readahead+0x152/0x470 [fuse]
      Code: 41 8b 57 18 4c 8d 54 10 ff 4c 89 d6 48 8d 7c 24 10 e8 d2 e3 28 f9 48 85 c0 0f 84 fe 00 00 00 44 89 f2 49 89 04 d4 44 8d 72 01 <48> 8b 10 41 8b 4f 1c 48 c1 ea 10 83 e2 01 80 fa 01 19 d2 81 e2 01
      RSP: 0018:ffffad99ceaebc50 EFLAGS: 00010246
      RAX: 0000000000000402 RBX: 0000000000000001 RCX: 0000000000000002
      RDX: 0000000000000000 RSI: ffff94c5af90bd98 RDI: ffffad99ceaebc60
      RBP: ffff94ddc1749a00 R08: 0000000000000402 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000100 R12: ffff94de6c429ce0
      R13: ffff94de6c4d3700 R14: 0000000000000001 R15: ffffad99ceaebd68
      FS:  00007f228c5c7040(0000) GS:ffff94de8ed80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000402 CR3: 0000001dbd9b4000 CR4: 0000000000350ee0
      Call Trace:
        read_pages+0x83/0x270
        page_cache_readahead_unbounded+0x197/0x230
        generic_file_buffered_read+0x57a/0xa20
        new_sync_read+0x112/0x1a0
        vfs_read+0xf8/0x180
        ksys_read+0x5f/0xe0
        do_syscall_64+0x33/0x80
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    Fixes: 042124cc64c3 ("mm: add new readahead_control API")
    Reported-by: David Sterba <dsterba@suse.com>
    Reported-by: Wonhyuk Yang <vvghjk1234@gmail.com>
    Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Cc: <stable@vger.kernel.org>
    Link: https://lkml.kernel.org/r/20201103142852.8543-1-willy@infradead.org
    Link: https://lkml.kernel.org/r/20201103124349.16722-1-vvghjk1234@gmail.com
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38d3e20ff427d5b3dc47e3312728bb05dac8b8f4
Author: Jens Axboe <axboe@kernel.dk>
Date:   Mon Nov 16 13:36:24 2020 -0700

    mm: never attempt async page lock if we've transferred data already
    
    commit 0abed7c69b956d135cb6d320c350b2adb213e7d8 upstream.
    
    We catch the case where we enter generic_file_buffered_read() with data
    already transferred, but we also need to be careful not to allow an async
    page lock if we're looping transferring data. If not, we could be
    returning -EIOCBQUEUED instead of the transferred amount, and it could
    result in double waitqueue additions as well.
    
    Cc: stable@vger.kernel.org # v5.9
    Fixes: 1a0a7853b901 ("mm: support async buffered reads in generic_file_buffered_read()")
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3261603426ec2c7e147abad6db95aac5261728d6
Author: Chen Yu <yu.c.chen@intel.com>
Date:   Fri Nov 13 09:59:23 2020 +0800

    x86/microcode/intel: Check patch signature before saving microcode for early loading
    
    commit 1a371e67dc77125736cc56d3a0893f06b75855b6 upstream.
    
    Currently, scan_microcode() leverages microcode_matches() to check
    if the microcode matches the CPU by comparing the family and model.
    However, the processor stepping and flags of the microcode signature
    should also be considered when saving a microcode patch for early
    update.
    
    Use find_matching_signature() in scan_microcode() and get rid of the
    now-unused microcode_matches() which is a good cleanup in itself.
    
    Complete the verification of the patch being saved for early loading in
    save_microcode_patch() directly. This needs to be done there too because
    save_mc_for_early() will call save_microcode_patch() too.
    
    The second reason why this needs to be done is because the loader still
    tries to support, at least hypothetically, mixed-steppings systems and
    thus adds all patches to the cache that belong to the same CPU model
    albeit with different steppings.
    
    For example:
    
      microcode: CPU: sig=0x906ec, pf=0x2, rev=0xd6
      microcode: mc_saved[0]: sig=0x906e9, pf=0x2a, rev=0xd6, total size=0x19400, date = 2020-04-23
      microcode: mc_saved[1]: sig=0x906ea, pf=0x22, rev=0xd6, total size=0x19000, date = 2020-04-27
      microcode: mc_saved[2]: sig=0x906eb, pf=0x2, rev=0xd6, total size=0x19400, date = 2020-04-23
      microcode: mc_saved[3]: sig=0x906ec, pf=0x22, rev=0xd6, total size=0x19000, date = 2020-04-27
      microcode: mc_saved[4]: sig=0x906ed, pf=0x22, rev=0xd6, total size=0x19400, date = 2020-04-23
    
    The patch which is being saved for early loading, however, can only be
    the one which fits the CPU this runs on so do the signature verification
    before saving.
    
     [ bp: Do signature verification in save_microcode_patch()
           and rewrite commit message. ]
    
    Fixes: ec400ddeff20 ("x86/microcode_intel_early.c: Early update ucode on Intel's CPU")
    Signed-off-by: Chen Yu <yu.c.chen@intel.com>
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Cc: stable@vger.kernel.org
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=208535
    Link: https://lkml.kernel.org/r/20201113015923.13960-1-yu.c.chen@intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8427c141593e8f8e2a707a516db49e6d0992b18d
Author: Amir Goldstein <amir73il@gmail.com>
Date:   Sun Nov 8 12:59:06 2020 +0200

    fanotify: fix logic of reporting name info with watched parent
    
    commit 7372e79c9eb9d7034e498721eb2861ae4fdbc618 upstream.
    
    The victim inode's parent and name info is required when an event
    needs to be delivered to a group interested in filename info OR
    when the inode's parent is interested in an event on its children.
    
    Let us call the first condition 'parent_needed' and the second
    condition 'parent_interested'.
    
    In fsnotify_parent(), the condition where the inode's parent is
    interested in some events on its children, but not necessarily
    interested the specific event is called 'parent_watched'.
    
    fsnotify_parent() tests the condition (!parent_watched && !parent_needed)
    for sending the event without parent and name info, which is correct.
    
    It then wrongly assumes that parent_watched implies !parent_needed
    and tests the condition (parent_watched && !parent_interested)
    for sending the event without parent and name info, which is wrong,
    because parent may still be needed by some group.
    
    For example, after initializing a group with FAN_REPORT_DFID_NAME and
    adding a FAN_MARK_MOUNT with FAN_OPEN mask, open events on non-directory
    children of "testdir" are delivered with file name info.
    
    After adding another mark to the same group on the parent "testdir"
    with FAN_CLOSE|FAN_EVENT_ON_CHILD mask, open events on non-directory
    children of "testdir" are no longer delivered with file name info.
    
    Fix the logic and use auxiliary variables to clarify the conditions.
    
    Fixes: 9b93f33105f5 ("fsnotify: send event with parent/name info to sb/mount/non-dir marks")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201108105906.8493-1-amir73il@gmail.com
    Signed-off-by: Amir Goldstein <amir73il@gmail.com>
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0908acfc4a7f3a97228b73d46965923993005ace
Author: Mickaël Salaün <mic@linux.microsoft.com>
Date:   Fri Oct 30 13:38:49 2020 +0100

    seccomp: Set PF_SUPERPRIV when checking capability
    
    commit fb14528e443646dd3fd02df4437fcf5265b66baa upstream.
    
    Replace the use of security_capable(current_cred(), ...) with
    ns_capable_noaudit() which set PF_SUPERPRIV.
    
    Since commit 98f368e9e263 ("kernel: Add noaudit variant of
    ns_capable()"), a new ns_capable_noaudit() helper is available.  Let's
    use it!
    
    Cc: Jann Horn <jannh@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Tyler Hicks <tyhicks@linux.microsoft.com>
    Cc: Will Drewry <wad@chromium.org>
    Cc: stable@vger.kernel.org
    Fixes: e2cfabdfd075 ("seccomp: add system call filtering using BPF")
    Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
    Reviewed-by: Jann Horn <jannh@google.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20201030123849.770769-3-mic@digikod.net
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5fa8f26a72908a4631131fd7099e8b1c9607a32d
Author: Mickaël Salaün <mic@linux.microsoft.com>
Date:   Fri Oct 30 13:38:48 2020 +0100

    ptrace: Set PF_SUPERPRIV when checking capability
    
    commit cf23705244c947151179f929774fabf71e239eee upstream.
    
    Commit 69f594a38967 ("ptrace: do not audit capability check when outputing
    /proc/pid/stat") replaced the use of ns_capable() with
    has_ns_capability{,_noaudit}() which doesn't set PF_SUPERPRIV.
    
    Commit 6b3ad6649a4c ("ptrace: reintroduce usage of subjective credentials in
    ptrace_has_cap()") replaced has_ns_capability{,_noaudit}() with
    security_capable(), which doesn't set PF_SUPERPRIV neither.
    
    Since commit 98f368e9e263 ("kernel: Add noaudit variant of ns_capable()"), a
    new ns_capable_noaudit() helper is available.  Let's use it!
    
    As a result, the signature of ptrace_has_cap() is restored to its original one.
    
    Cc: Christian Brauner <christian.brauner@ubuntu.com>
    Cc: Eric Paris <eparis@redhat.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Serge E. Hallyn <serge@hallyn.com>
    Cc: Tyler Hicks <tyhicks@linux.microsoft.com>
    Cc: stable@vger.kernel.org
    Fixes: 6b3ad6649a4c ("ptrace: reintroduce usage of subjective credentials in ptrace_has_cap()")
    Fixes: 69f594a38967 ("ptrace: do not audit capability check when outputing /proc/pid/stat")
    Signed-off-by: Mickaël Salaün <mic@linux.microsoft.com>
    Reviewed-by: Jann Horn <jannh@google.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Link: https://lore.kernel.org/r/20201030123849.770769-2-mic@digikod.net
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 52fb03b1369e53a55264a03fc1dd4eb637f3f67c
Author: Christoph Hellwig <hch@lst.de>
Date:   Sat Nov 14 19:12:46 2020 +0100

    blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats
    
    commit b7131ee0bac5e5df73e4098e77bbddb3a31d06ff upstream.
    
    disk_get_part needs to be paired with a disk_put_part.
    
    Cc: stable@vger.kernel.org
    Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat")
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 74b00ca221d2bd20c16bd82d4f711d04cb044714
Author: Manish Narani <manish.narani@xilinx.com>
Date:   Mon Nov 16 14:02:45 2020 +0530

    mmc: sdhci-of-arasan: Issue DLL reset explicitly
    
    commit d06d60d52ec0b0eef702dd3e7b4699f0b589ad0f upstream.
    
    In the current implementation DLL reset will be issued for
    each ITAP and OTAP setting inside ATF, this is creating issues
    in some scenarios and this sequence is not inline with the TRM.
    To fix the issue, DLL reset should be removed from the ATF and
    host driver will request it explicitly.
    This patch update host driver to explicitly request for DLL reset
    before ITAP (assert DLL) and after OTAP (release DLL) settings.
    
    Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
    Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
    Signed-off-by: Manish Narani <manish.narani@xilinx.com>
    Acked-by: Michal Simek <michal.simek@xilinx.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-4-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ac571d62fccb765c2bbc19280c593aca17d7317c
Author: Manish Narani <manish.narani@xilinx.com>
Date:   Mon Nov 16 14:02:44 2020 +0530

    mmc: sdhci-of-arasan: Use Mask writes for Tap delays
    
    commit d338c6d01dc614cad253d6c042501fa0eb242d5c upstream.
    
    Mask the ITAP and OTAP delay bits before updating with the new
    tap value for Versal platform.
    
    Fixes: 1a470721c8f5 ("sdhci: arasan: Add support for Versal Tap Delays")
    Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
    Signed-off-by: Manish Narani <manish.narani@xilinx.com>
    Acked-by: Michal Simek <michal.simek@xilinx.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-3-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fbbe94e5c743a8ea31c0fefe49f36775c17dc08b
Author: Manish Narani <manish.narani@xilinx.com>
Date:   Mon Nov 16 14:02:43 2020 +0530

    mmc: sdhci-of-arasan: Allow configuring zero tap values
    
    commit 9e9534329306fcd7ea1b84f14860a3c04ebe7f1a upstream.
    
    Allow configuring the Output and Input tap values with zero to avoid
    failures in some cases (one of them is SD boot mode) where the output
    and input tap values may be already set to non-zero.
    
    Fixes: a5c8b2ae2e51 ("mmc: sdhci-of-arasan: Add support for ZynqMP Platform Tap Delays Setup")
    Signed-off-by: Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
    Signed-off-by: Manish Narani <manish.narani@xilinx.com>
    Acked-by: Michal Simek <michal.simek@xilinx.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1605515565-117562-2-git-send-email-manish.narani@xilinx.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fd49156dc81b7934c67fff0cc99741336c2b22be
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Thu Nov 12 15:36:56 2020 +0200

    mmc: sdhci-pci: Prefer SDR25 timing for High Speed mode for BYT-based Intel controllers
    
    commit 60d53566100abde4acc5504b524bc97f89015690 upstream.
    
    A UHS setting of SDR25 can give better results for High Speed mode.
    This is because there is no setting corresponding to high speed.  Currently
    SDHCI sets no value, which means zero which is also the setting for SDR12.
    There was an attempt to change this in sdhci.c but it caused problems for
    some drivers, so it was reverted and the change was made to sdhci-brcmstb
    in commit 2fefc7c5f7d16e ("mmc: sdhci-brcmstb: Fix incorrect switch to HS
    mode").  Several other drivers also do this.
    
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: stable@vger.kernel.org # v5.4+
    Link: https://lore.kernel.org/r/20201112133656.20317-1-adrian.hunter@intel.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d5111454e0fdc6750c98d72f3facf180c313414b
Author: Jens Axboe <axboe@kernel.dk>
Date:   Tue Nov 17 07:59:16 2020 -0700

    io_uring: don't double complete failed reissue request
    
    commit c993df5a688975bf9ce899706ca13d2bc8d6be25 upstream.
    
    Zorro reports that an xfstest test case is failing, and it turns out that
    for the reissue path we can potentially issue a double completion on the
    request for the failure path. There's an issue around the retry as well,
    but for now, at least just make sure that we handle the error path
    correctly.
    
    Cc: stable@vger.kernel.org
    Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources")
    Reported-by: Zorro Lang <zlang@redhat.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 95799d5ce7206e23ed1d15ab63510799cebe1283
Author: Rodrigo Vivi <rodrigo.vivi@intel.com>
Date:   Wed Nov 11 09:09:36 2020 -0500

    drm/i915/tgl: Fix Media power gate sequence.
    
    commit 85a12d7eb8fe449cf38f1aa9ead5ca744729a98f upstream.
    
    Some media power gates are disabled by default. commit 5d86923060fc
    ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating")
    tried to enable it, but it duplicated an existent register.
    So, the main PG setup sequences ended up overwriting it.
    
    So, let's now merge this to the main PG setup sequence.
    
    v2: (Chris): s/BIT/REG_BIT, remove useless comment,
                 remove useless =0, use the right gt,
                 remove rc6 sequence doubt from commit message.
    
    Fixes: 5d86923060fc ("drm/i915/tgl: Enable VD HCP/MFX sub-pipe power gating")
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Cc: stable@vger.kernel.org#v5.5+
    Cc: Dale B Stimson <dale.b.stimson@intel.com>
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Link: https://patchwork.freedesktop.org/patch/msgid/20201111072859.1186070-1-rodrigo.vivi@intel.com
    (cherry picked from commit 695dc55b573985569259e18f8e6261a77924342b)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 15c1bb50a1306bf05ca49095172109c578fb95f6
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Nov 10 23:04:47 2020 +0200

    drm/i915: Handle max_bpc==16
    
    commit d2e3fce9ddafe689c6f7cb355f23560637e30b9d upstream.
    
    EDID can declare the maximum supported bpc up to 16,
    and apparently there are displays that do so. Currently
    we assume 12 bpc is tha max. Fix the assumption and
    toss in a MISSING_CASE() for any other value we don't
    expect to see.
    
    This fixes modesets with a display with EDID max bpc > 12.
    Previously any modeset would just silently fail on platforms
    that didn't otherwise limit this via the max_bpc property.
    In particular we don't add the max_bpc property to HDMI
    ports on gmch platforms, and thus we would see the raw
    max_bpc coming from the EDID.
    
    I suppose we could already adjust this to also allow 16bpc,
    but seeing as no current platform supports that there is
    little point.
    
    Cc: stable@vger.kernel.org
    Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2632
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20201110210447.27454-1-ville.syrjala@linux.intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    (cherry picked from commit 2ca5a7b85b0c2b97ef08afbd7799b022e29f192e)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 02c879bb80cffb0925614a8e55d840c6f89adb6a
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Fri Nov 13 02:21:19 2020 -0500

    drm/amd/display: Add missing pflip irq for dcn2.0
    
    commit 728321e53045d2668bf2b8627a8d61bc2c480d3b upstream.
    
    If we have more than 4 displays we will run
    into dummy irq calls or flip timout issues.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aab158bb1368ba98f8d30978a1154a1c530d8638
Author: Chris Co <chrco@microsoft.com>
Date:   Tue Nov 10 19:01:18 2020 +0000

    Drivers: hv: vmbus: Allow cleanup of VMBUS_CONNECT_CPU if disconnected
    
    commit 92e4dc8b05663d6539b1b8375f3b1cf7b204cfe9 upstream.
    
    When invoking kexec() on a Linux guest running on a Hyper-V host, the
    kernel panics.
    
        RIP: 0010:cpuhp_issue_call+0x137/0x140
        Call Trace:
        __cpuhp_remove_state_cpuslocked+0x99/0x100
        __cpuhp_remove_state+0x1c/0x30
        hv_kexec_handler+0x23/0x30 [hv_vmbus]
        hv_machine_shutdown+0x1e/0x30
        machine_shutdown+0x10/0x20
        kernel_kexec+0x6d/0x96
        __do_sys_reboot+0x1ef/0x230
        __x64_sys_reboot+0x1d/0x20
        do_syscall_64+0x6b/0x3d8
        entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    This was due to hv_synic_cleanup() callback returning -EBUSY to
    cpuhp_issue_call() when tearing down the VMBUS_CONNECT_CPU, even
    if the vmbus_connection.conn_state = DISCONNECTED. hv_synic_cleanup()
    should succeed in the case where vmbus_connection.conn_state
    is DISCONNECTED.
    
    Fix is to add an extra condition to test for
    vmbus_connection.conn_state == CONNECTED on the VMBUS_CONNECT_CPU and
    only return early if true. This way the kexec() path can still shut
    everything down while preserving the initial behavior of preventing
    CPU offlining on the VMBUS_CONNECT_CPU while the VM is running.
    
    Fixes: 8a857c55420f29 ("Drivers: hv: vmbus: Always handle the VMBus messages on CPU0")
    Signed-off-by: Chris Co <chrco@microsoft.com>
    Reviewed-by: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201110190118.15596-1-chrco@linux.microsoft.com
    Signed-off-by: Wei Liu <wei.liu@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e1e6000f2834ae6a0a5f06ed39dd5ac46c258a97
Author: Stefan Haberland <sth@linux.ibm.com>
Date:   Mon Nov 16 16:23:47 2020 +0100

    s390/dasd: fix null pointer dereference for ERP requests
    
    commit 6f117cb854a44a79898d844e6ae3fd23bd94e786 upstream.
    
    When requeueing all requests on the device request queue to the blocklayer
    we might get to an ERP (error recovery) request that is a copy of an
    original CQR.
    
    Those requests do not have blocklayer request information or a pointer to
    the dasd_queue set. When trying to access those data it will lead to a
    null pointer dereference in dasd_requeue_all_requests().
    
    Fix by checking if the request is an ERP request that can simply be
    ignored. The blocklayer request will be requeued by the original CQR that
    is on the device queue right behind the ERP request.
    
    Fixes: 9487cfd3430d ("s390/dasd: fix handling of internal requests")
    Cc: <stable@vger.kernel.org> #4.16
    Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
    Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 382bb0bed97cbc161749df0fce4d06fd39c1046d
Author: Thomas Richter <tmricht@linux.ibm.com>
Date:   Wed Nov 11 16:26:25 2020 +0100

    s390/cpum_sf.c: fix file permission for cpum_sfb_size
    
    commit 78d732e1f326f74f240d416af9484928303d9951 upstream.
    
    This file is installed by the s390 CPU Measurement sampling
    facility device driver to export supported minimum and
    maximum sample buffer sizes.
    This file is read by lscpumf tool to display the details
    of the device driver capabilities. The lscpumf tool might
    be invoked by a non-root user. In this case it does not
    print anything because the file contents can not be read.
    
    Fix this by allowing read access for all users. Reading
    the file contents is ok, changing the file contents is
    left to the root user only.
    
    For further reference and details see:
     [1] https://github.com/ibm-s390-tools/s390-tools/issues/97
    
    Fixes: 69f239ed335a ("s390/cpum_sf: Dynamically extend the sampling buffer if overflows occur")
    Cc: <stable@vger.kernel.org> # 3.14
    Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
    Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
    Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d21f8e25cabfa7e37d91c7eceb89f915d1556d4e
Author: Heiko Carstens <hca@linux.ibm.com>
Date:   Tue Nov 3 16:55:43 2020 +0100

    s390: fix system call exit path
    
    commit ce9dfafe29bed86fe3cda330ac6072ce84e1ff81 upstream.
    
    The system call exit path is running with interrupts enabled while
    checking for TIF/PIF/CIF bits which require special handling. If all
    bits have been checked interrupts are disabled and the kernel exits to
    user space.
    The problem is that after checking all bits and before interrupts are
    disabled bits can be set already again, due to interrupt handling.
    
    This means that the kernel can exit to user space with some
    TIF/PIF/CIF bits set, which should never happen. E.g. TIF_NEED_RESCHED
    might be set, which might lead to additional latencies, since that bit
    will only be recognized with next exit to user space.
    
    Fix this by checking the corresponding bits only when interrupts are
    disabled.
    
    Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S")
    Cc: <stable@vger.kernel.org> # 5.8
    Acked-by: Sven Schnelle <svens@linux.ibm.com>
    Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 34349f92ed91f2e28430b4652da17f60c2b4d31f
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Nov 12 11:22:04 2020 +0100

    mac80211: free sta in sta_info_insert_finish() on errors
    
    commit 7bc40aedf24d31d8bea80e1161e996ef4299fb10 upstream.
    
    If sta_info_insert_finish() fails, we currently keep the station
    around and free it only in the caller, but there's only one such
    caller and it always frees it immediately.
    
    As syzbot found, another consequence of this split is that we can
    put things that sleep only into __cleanup_single_sta() and not in
    sta_info_free(), but this is the only place that requires such of
    sta_info_free() now.
    
    Change this to free the station in sta_info_insert_finish(), in
    which case we can still sleep. This will also let us unify the
    cleanup code later.
    
    Cc: stable@vger.kernel.org
    Fixes: dcd479e10a05 ("mac80211: always wind down STA state")
    Reported-by: syzbot+32c6c38c4812d22f2f0b@syzkaller.appspotmail.com
    Reported-by: syzbot+4c81fe92e372d26c4246@syzkaller.appspotmail.com
    Reported-by: syzbot+6a7fe9faf0d1d61bc24a@syzkaller.appspotmail.com
    Reported-by: syzbot+abed06851c5ffe010921@syzkaller.appspotmail.com
    Reported-by: syzbot+b7aeb9318541a1c709f1@syzkaller.appspotmail.com
    Reported-by: syzbot+d5a9416c6cafe53b5dd0@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/r/20201112112201.ee6b397b9453.I9c31d667a0ea2151441cc64ed6613d36c18a48e0@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8ab8b465d07d3d0d2e9a38b8801704aba61036e1
Author: Felix Fietkau <nbd@nbd.name>
Date:   Wed Nov 11 19:33:59 2020 +0100

    mac80211: minstrel: fix tx status processing corner case
    
    commit b2911a84396f72149dce310a3b64d8948212c1b3 upstream.
    
    Some drivers fill the status rate list without setting the rate index after
    the final rate to -1. minstrel_ht already deals with this, but minstrel
    doesn't, which causes it to get stuck at the lowest rate on these drivers.
    
    Fix this by checking the count as well.
    
    Cc: stable@vger.kernel.org
    Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm")
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Link: https://lore.kernel.org/r/20201111183359.43528-3-nbd@nbd.name
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6e13d4cf38b3b4887582982b0c1e324c748400ee
Author: Felix Fietkau <nbd@nbd.name>
Date:   Wed Nov 11 19:33:58 2020 +0100

    mac80211: minstrel: remove deferred sampling code
    
    commit 4fe40b8e1566dad04c87fbf299049a1d0d4bd58d upstream.
    
    Deferring sampling attempts to the second stage has some bad interactions
    with drivers that process the rate table in hardware and use the probe flag
    to indicate probing packets (e.g. most mt76 drivers). On affected drivers
    it can lead to probing not working at all.
    
    If the link conditions turn worse, it might not be such a good idea to
    do a lot of sampling for lower rates in this case.
    
    Fix this by simply skipping the sample attempt instead of deferring it,
    but keep the checks that would allow it to be sampled if it was skipped
    too often, but only if it has less than 95% success probability.
    
    Also ensure that IEEE80211_TX_CTL_RATE_CTRL_PROBE is set for all probing
    packets.
    
    Cc: stable@vger.kernel.org
    Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm")
    Signed-off-by: Felix Fietkau <nbd@nbd.name>
    Link: https://lore.kernel.org/r/20201111183359.43528-2-nbd@nbd.name
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit eab927f0844cbc2335ceb46cd922658065ec084b
Author: Max Filippov <jcmvbkbc@gmail.com>
Date:   Mon Nov 16 01:38:59 2020 -0800

    xtensa: disable preemption around cache alias management calls
    
    commit 3a860d165eb5f4d7cf0bf81ef6a5b5c5e1754422 upstream.
    
    Although cache alias management calls set up and tear down TLB entries
    and fast_second_level_miss is able to restore TLB entry should it be
    evicted they absolutely cannot preempt each other because they use the
    same TLBTEMP area for different purposes.
    Disable preemption around all cache alias management calls to enforce
    that.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5c3508517c7e68e93f65d7d8aa48b7aed2c0ed82
Author: Max Filippov <jcmvbkbc@gmail.com>
Date:   Mon Nov 16 01:25:56 2020 -0800

    xtensa: fix TLBTEMP area placement
    
    commit 481535c5b41d191b22775a6873de5ec0e1cdced1 upstream.
    
    fast_second_level_miss handler for the TLBTEMP area has an assumption
    that page table directory entry for the TLBTEMP address range is 0. For
    it to be true the TLBTEMP area must be aligned to 4MB boundary and not
    share its 4MB region with anything that may use a page table. This is
    not true currently: TLBTEMP shares space with vmalloc space which
    results in the following kinds of runtime errors when
    fast_second_level_miss loads page table directory entry for the vmalloc
    space instead of fixing up the TLBTEMP area:
    
     Unable to handle kernel paging request at virtual address c7ff0e00
      pc = d0009275, ra = 90009478
     Oops: sig: 9 [#1] PREEMPT
     CPU: 1 PID: 61 Comm: kworker/u9:2 Not tainted 5.10.0-rc3-next-20201110-00007-g1fe4962fa983-dirty #58
     Workqueue: xprtiod xs_stream_data_receive_workfn
     a00: 90009478 d11e1dc0 c7ff0e00 00000020 c7ff0000 00000001 7f8b8107 00000000
     a08: 900c5992 d11e1d90 d0cc88b8 5506e97c 00000000 5506e97c d06c8074 d11e1d90
     pc: d0009275, ps: 00060310, depc: 00000014, excvaddr: c7ff0e00
     lbeg: d0009275, lend: d0009287 lcount: 00000003, sar: 00000010
     Call Trace:
       xs_stream_data_receive_workfn+0x43c/0x770
       process_one_work+0x1a1/0x324
       worker_thread+0x1cc/0x3c0
       kthread+0x10d/0x124
       ret_from_kernel_thread+0xc/0x18
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 17cf09e12c76592cf5802f2d3e420d826286291e
Author: Bob Peterson <rpeterso@redhat.com>
Date:   Wed Nov 18 08:54:31 2020 -0500

    gfs2: Fix regression in freeze_go_sync
    
    commit 20b329129009caf1c646152abe09b697227e1c37 upstream.
    
    Patch 541656d3a513 ("gfs2: freeze should work on read-only mounts") changed
    the check for glock state in function freeze_go_sync() from "gl->gl_state
    == LM_ST_SHARED" to "gl->gl_req == LM_ST_EXCLUSIVE".  That's wrong and it
    regressed gfs2's freeze/thaw mechanism because it caused only the freezing
    node (which requests the glock in EX) to queue freeze work.
    
    All nodes go through this go_sync code path during the freeze to drop their
    SHared hold on the freeze glock, allowing the freezing node to acquire it
    in EXclusive mode. But all the nodes must freeze access to the file system
    locally, so they ALL must queue freeze work. The freeze_work calls
    freeze_func, which makes a request to reacquire the freeze glock in SH,
    effectively blocking until the thaw from the EX holder. Once thawed, the
    freezing node drops its EX hold on the freeze glock, then the (blocked)
    freeze_func reacquires the freeze glock in SH again (on all nodes, including
    the freezer) so all nodes go back to a thawed state.
    
    This patch changes the check back to gl_state == LM_ST_SHARED like it was
    prior to 541656d3a513.
    
    Fixes: 541656d3a513 ("gfs2: freeze should work on read-only mounts")
    Cc: stable@vger.kernel.org # v5.8+
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 78e4b7590f8d8812b7188f8490d24f8e6aeb32cd
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date:   Fri Nov 13 01:20:28 2020 +0100

    regulator: workaround self-referent regulators
    
    commit f5c042b23f7429e5c2ac987b01a31c69059a978b upstream.
    
    Workaround regulators whose supply name happens to be the same as its
    own name. This fixes boards that used to work before the early supply
    resolving was removed. The error message is left in place so that
    offending drivers can be detected.
    
    Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator")
    Cc: stable@vger.kernel.org
    Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> # stpmic1
    Link: https://lore.kernel.org/r/d703acde2a93100c3c7a81059d716c50ad1b1f52.1605226675.git.mirq-linux@rere.qmqm.pl
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 18bb2f43f424af4e60e42814d23c85378976f593
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date:   Fri Nov 13 01:20:28 2020 +0100

    regulator: avoid resolve_supply() infinite recursion
    
    commit 4b639e254d3d4f15ee4ff2b890a447204cfbeea9 upstream.
    
    When a regulator's name equals its supply's name the
    regulator_resolve_supply() recurses indefinitely. Add a check
    so that debugging the problem is easier. The "fixed" commit
    just exposed the problem.
    
    Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator")
    Cc: stable@vger.kernel.org
    Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> # stpmic1
    Link: https://lore.kernel.org/r/c6171057cfc0896f950c4d8cb82df0f9f1b89ad9.1605226675.git.mirq-linux@rere.qmqm.pl
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 435f4ba3d3b8fdbb8054a6e416a1c76d1b3d74fd
Author: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date:   Fri Nov 13 01:20:27 2020 +0100

    regulator: fix memory leak with repeated set_machine_constraints()
    
    commit 57a6ad482af256b2a13de14194fb8f67c1a65f10 upstream.
    
    Fixed commit introduced a possible second call to
    set_machine_constraints() and that allocates memory for
    rdev->constraints. Move the allocation to the caller so
    it's easier to manage and done once.
    
    Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator")
    Cc: stable@vger.kernel.org
    Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
    Tested-by: Ahmad Fatoum <a.fatoum@pengutronix.de> # stpmic1
    Link: https://lore.kernel.org/r/78c3d4016cebc08d441aad18cb924b4e4d9cf9df.1605226675.git.mirq-linux@rere.qmqm.pl
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6cb608e1ef1965fcfc4be2244482b4a272c1af62
Author: Sean Nyekjaer <sean@geanix.com>
Date:   Tue Nov 10 18:41:13 2020 +0100

    regulator: pfuze100: limit pfuze-support-disable-sw to pfuze{100,200}
    
    commit 365ec8b61689bd64d6a61e129e0319bf71336407 upstream.
    
    Limit the fsl,pfuze-support-disable-sw to the pfuze100 and pfuze200
    variants.
    When enabling fsl,pfuze-support-disable-sw and using a pfuze3000 or
    pfuze3001, the driver would choose pfuze100_sw_disable_regulator_ops
    instead of the newly introduced and correct pfuze3000_sw_regulator_ops.
    
    Signed-off-by: Sean Nyekjaer <sean@geanix.com>
    Fixes: 6f1cf5257acc ("regualtor: pfuze100: correct sw1a/sw2 on pfuze3000")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20201110174113.2066534-1-sean@geanix.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2f07978ad4a83b4d1db4c64f6f8e256127f8b2f0
Author: Lukas Wunner <lukas@wunner.de>
Date:   Wed Nov 11 20:07:30 2020 +0100

    spi: bcm2835aux: Fix use-after-free on unbind
    
    commit e13ee6cc4781edaf8c7321bee19217e3702ed481 upstream.
    
    bcm2835aux_spi_remove() accesses the driver's private data after calling
    spi_unregister_master() even though that function releases the last
    reference on the spi_master and thereby frees the private data.
    
    Fix by switching over to the new devm_spi_alloc_master() helper which
    keeps the private data accessible until the driver has unbound.
    
    Fixes: b9dd3f6d4172 ("spi: bcm2835aux: Fix controller unregister order")
    Signed-off-by: Lukas Wunner <lukas@wunner.de>
    Cc: <stable@vger.kernel.org> # v4.4+: 123456789abc: spi: Introduce device-managed SPI controller allocation
    Cc: <stable@vger.kernel.org> # v4.4+: b9dd3f6d4172: spi: bcm2835aux: Fix controller unregister order
    Cc: <stable@vger.kernel.org> # v4.4+
    Link: https://lore.kernel.org/r/b290b06357d0c0bdee9cecc539b840a90630f101.1605121038.git.lukas@wunner.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e456c812a6a03e3c8fcabd7354b4ea261db65f1c
Author: Lukas Wunner <lukas@wunner.de>
Date:   Mon Nov 16 09:23:10 2020 +0100

    spi: npcm-fiu: Don't leak SPI master in probe error path
    
    commit 04a9cd51d3f3308a98cbc6adc07acb12fbade011 upstream.
    
    If the calls to of_match_device(), of_alias_get_id(),
    devm_ioremap_resource(), devm_regmap_init_mmio() or devm_clk_get()
    fail on probe of the NPCM FIU SPI driver, the spi_controller struct is
    erroneously not freed.
    
    Fix by switching over to the new devm_spi_alloc_master() helper.
    
    Fixes: ace55c411b11 ("spi: npcm-fiu: add NPCM FIU controller driver")
    Signed-off-by: Lukas Wunner <lukas@wunner.de>
    Cc: <stable@vger.kernel.org> # v5.4+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation
    Cc: <stable@vger.kernel.org> # v5.4+
    Cc: Tomer Maimon <tmaimon77@gmail.com>
    Link: https://lore.kernel.org/r/a420c23a363a3bc9aa684c6e790c32a8af106d17.1605512876.git.lukas@wunner.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bd1a5b2307279029faaddbecf2f2ac25eaef8dc6
Author: Lukas Wunner <lukas@wunner.de>
Date:   Wed Nov 11 20:07:10 2020 +0100

    spi: Introduce device-managed SPI controller allocation
    
    commit 5e844cc37a5cbaa460e68f9a989d321d63088a89 upstream.
    
    SPI driver probing currently comprises two steps, whereas removal
    comprises only one step:
    
        spi_alloc_master()
        spi_register_controller()
    
        spi_unregister_controller()
    
    That's because spi_unregister_controller() calls device_unregister()
    instead of device_del(), thereby releasing the reference on the
    spi_controller which was obtained by spi_alloc_master().
    
    An SPI driver's private data is contained in the same memory allocation
    as the spi_controller struct.  Thus, once spi_unregister_controller()
    has been called, the private data is inaccessible.  But some drivers
    need to access it after spi_unregister_controller() to perform further
    teardown steps.
    
    Introduce devm_spi_alloc_master() and devm_spi_alloc_slave(), which
    release a reference on the spi_controller struct only after the driver
    has unbound, thereby keeping the memory allocation accessible.  Change
    spi_unregister_controller() to not release a reference if the
    spi_controller was allocated by one of these new devm functions.
    
    The present commit is small enough to be backportable to stable.
    It allows fixing drivers which use the private data in their ->remove()
    hook after it's been freed.  It also allows fixing drivers which neglect
    to release a reference on the spi_controller in the probe error path.
    
    Long-term, most SPI drivers shall be moved over to the devm functions
    introduced herein.  The few that can't shall be changed in a treewide
    commit to explicitly release the last reference on the controller.
    That commit shall amend spi_unregister_controller() to no longer release
    a reference, thereby completing the migration.
    
    As a result, the behaviour will be less surprising and more consistent
    with subsystems such as IIO, which also includes the private data in the
    allocation of the generic iio_dev struct, but calls device_del() in
    iio_device_unregister().
    
    Signed-off-by: Lukas Wunner <lukas@wunner.de>
    Link: https://lore.kernel.org/r/272bae2ef08abd21388c98e23729886663d19192.1605121038.git.lukas@wunner.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3a4c53ea3bbd502d8850f21110daf6afab86df7b
Author: Lukas Wunner <lukas@wunner.de>
Date:   Sun Nov 8 23:41:00 2020 +0100

    spi: lpspi: Fix use-after-free on unbind
    
    commit 4def49da620c84a682d9361d6bef0a97eed46fe0 upstream.
    
    Normally the last reference on an spi_controller is released by
    spi_unregister_controller().  In the case of the i.MX lpspi driver,
    the spi_controller is registered with devm_spi_register_controller(),
    so spi_unregister_controller() is invoked automatically after the driver
    has unbound.
    
    However the driver already releases the last reference in
    fsl_lpspi_remove() through a gratuitous call to spi_master_put(),
    causing a use-after-free when spi_unregister_controller() is
    subsequently invoked by the devres framework.
    
    Fix by dropping the superfluous spi_master_put().
    
    Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
    Signed-off-by: Lukas Wunner <lukas@wunner.de>
    Cc: <stable@vger.kernel.org> # v5.2+
    Cc: Han Xu <han.xu@nxp.com>
    Link: https://lore.kernel.org/r/ab3c0b18bd820501a12c85e440006e09ec0e275f.1604874488.git.lukas@wunner.de
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 842e6bcd87ac91a34c930def28b1276a9caa2d6e
Author: Dinh Nguyen <dinguyen@kernel.org>
Date:   Sun Nov 1 14:02:56 2020 -0600

    arm64: dts: agilex/stratix10: Fix qspi node compatible
    
    commit f126b6702e7354d6247a36f20b9172457af5c15a upstream.
    
    The QSPI flash node needs to have the required "jedec,spi-nor"
    in the compatible string.
    
    Fixes: 0cb140d07fc7 ("arm64: dts: stratix10: Add QSPI support for Stratix10")
    Cc: stable@vger.kernel.org
    Suggested-by: Vignesh Raghavendra <vigneshr@ti.com>
    Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 872859bab9edafaf7b1df2f0ef72b2851f7ed13c
Author: Zheng Zengkai <zhengzengkai@huawei.com>
Date:   Wed Nov 11 20:44:26 2020 +0800

    serial: ar933x_uart: disable clk on error handling path in probe
    
    commit 425af483523b76bc78e14674a430579d38b2a593 upstream.
    
    ar933x_uart_probe() does not invoke clk_disable_unprepare()
    on one error handling path. This patch fixes that.
    
    Fixes: 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
    Link: https://lore.kernel.org/r/20201111124426.42638-1-zhengzengkai@huawei.com
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9b757a62ae4fba89b08c2d9eef231efcd2404320
Author: Olivier Moysan <olivier.moysan@st.com>
Date:   Wed Oct 21 10:53:13 2020 +0200

    iio: adc: stm32-adc: fix a regression when using dma and irq
    
    commit 695e2f5c289bb7f8b85351dcfa35fa236e0200a4 upstream.
    
    Since overrun interrupt support has been added, there's a regression when
    two ADCs are used at the same time, with:
    - an ADC configured to use IRQs. EOCIE bit is set. The handler is normally
      called in this case.
    - an ADC configured to use DMA. EOCIE bit isn't set. EOC triggers the DMA
      request. It's then automatically cleared by DMA read. But the handler
      gets called due to status bit is temporarily set (IRQ triggered by the
      other ADC).
    
    This is a regression as similar issue had been fixed earlier by
    commit dcb10920179a ("iio: adc: stm32-adc:
    fix a race when using several adcs with dma and irq").
    Issue is that stm32_adc_eoc_enabled() returns non-zero value (always)
    since OVR bit has been added and enabled for both DMA and IRQ case.
    
    Remove OVR mask in IER register, and rely only on CSR status for overrun.
    To avoid subsequent calls to interrupt routine on overrun, CSR OVR bit has
    to be cleared. CSR OVR bit cannot be cleared directly by software.
    To do this ADC must be stopped first, and OVR bit in ADC ISR has
    to be cleared.
    Also add a check in ADC IRQ handler to report spurious IRQs.
    
    Fixes: cc06e67d8fa5 ("iio: adc: stm32-adc: Add check on overrun interrupt")
    Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
    Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
    Cc: <Stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201021085313.5335-1-olivier.moysan@st.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6793714533c5faeca7a2416391db7a11f221033c
Author: Paul Cercueil <paul@crapouillou.net>
Date:   Wed Nov 4 19:28:43 2020 +0000

    iio/adc: ingenic: Fix battery VREF for JZ4770 SoC
    
    commit c91ebcc578e09783cfa4d85c1b437790f140f29a upstream.
    
    The reference voltage for the battery is clearly marked as 1.2V in the
    programming manual. With this fixed, the battery channel now returns
    correct values.
    
    Fixes: a515d6488505 ("IIO: Ingenic JZ47xx: Add support for JZ4770 SoC ADC.")
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Acked-by: Artur Rojek <contact@artur-rojek.eu>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201104192843.67187-1-paul@crapouillou.net
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9f19ff43d7ef86f5e7817daa963ee15448ac4750
Author: Paul Cercueil <paul@crapouillou.net>
Date:   Tue Nov 3 20:12:38 2020 +0000

    iio/adc: ingenic: Fix AUX/VBAT readings when touchscreen is used
    
    commit 6d6aa2907d59ddd3c0ebb2b93e1ddc84e474485b upstream.
    
    When the command feature of the ADC is used, it is possible to program
    the ADC, and specify at each step what input should be processed, and in
    comparison to what reference.
    
    This broke the AUX and battery readings when the touchscreen was
    enabled, most likely because the CMD feature would change the VREF all
    the time.
    
    Now, when AUX or battery are read, we temporarily disable the CMD
    feature, which means that we won't get touchscreen readings in that time
    frame. But it now gives correct values for AUX / battery, and the
    touchscreen isn't disabled for long enough to be an actual issue.
    
    Fixes: b96952f498db ("IIO: Ingenic JZ47xx: Add touchscreen mode.")
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Acked-by: Artur Rojek <contact@artur-rojek.eu>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201103201238.161083-1-paul@crapouillou.net
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e58dcc098260d9fd089161e3afe2039bbeda75c6
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Sun Nov 1 17:21:18 2020 +0100

    iio: imu: st_lsm6dsx: set 10ms as min shub slave timeout
    
    commit fe0b980ffd1dd8b10c09f82385514819ba2a661d upstream.
    
    Set 10ms as minimum i2c slave configuration timeout since st_lsm6dsx
    relies on accel ODR for i2c master clock and at high sample rates
    (e.g. 833Hz or 416Hz) the slave sensor occasionally may need more cycles
    than i2c master timeout (2s/833Hz + 1 ~ 3ms) to apply the configuration
    resulting in an uncomplete slave configuration and a constant reading
    from the i2c slave connected to st_lsm6dsx i2c master.
    
    Fixes: 8f9a5249e3d9 ("iio: imu: st_lsm6dsx: enable 833Hz sample frequency for tagged sensors")
    Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Cc: <Stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/a69c8236bf16a1569966815ed71710af2722ed7d.1604247274.git.lorenzo@kernel.org
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3fc7b9b8055fb50752ff9ed55b85aafd6086a32f
Author: Gwendal Grignou <gwendal@chromium.org>
Date:   Tue Jun 30 08:37:30 2020 -0700

    iio: cros_ec: Use default frequencies when EC returns invalid information
    
    commit 56e4f2dda23c6d39d327944faa89efaa4eb290d1 upstream.
    
    Minimal and maximal frequencies supported by a sensor is queried.
    On some older machines, these frequencies are not returned properly and
    the EC returns 0 instead.
    When returned maximal frequency is 0, ignore the information and use
    default frequencies instead.
    
    Fixes: ae7b02ad2f32 ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs")
    Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
    Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
    Link: https://lore.kernel.org/r/20200630153730.3302889-1-gwendal@chromium.org
    CC: <Stable@vger.kernel.org>
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fb9488a9bd0bdf728db98d04f470e86d2fa20f5c
Author: Fabien Parent <fparent@baylibre.com>
Date:   Sun Oct 18 21:46:44 2020 +0200

    iio: adc: mediatek: fix unset field
    
    commit 15207a92e019803d62687455d8aa2ff9eb3dc82c upstream.
    
    dev_comp field is used in a couple of places but it is never set. This
    results in kernel oops when dereferencing a NULL pointer. Set the
    `dev_comp` field correctly in the probe function.
    
    Fixes: 6d97024dce23 ("iio: adc: mediatek: mt6577-auxadc, add mt6765 support")
    Signed-off-by: Fabien Parent <fparent@baylibre.com>
    Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
    Cc: <Stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201018194644.3366846-1-fparent@baylibre.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7070a5cdde56da81887c9fca44cf40bcab1e6028
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Nov 10 14:38:35 2020 +0100

    iio: accel: kxcjk1013: Add support for KIOX010A ACPI DSM for setting tablet-mode
    
    commit e5b1032a656e9aa4c7a4df77cb9156a2a651a5f9 upstream.
    
    Some 360 degree hinges (yoga) style 2-in-1 devices use 2 KXCJ91008-s
    to allow the OS to determine the angle between the display and the base
    of the device, so that the OS can determine if the 2-in-1 is in laptop
    or in tablet-mode.
    
    On Windows both accelerometers are read by a special HingeAngleService
    process; and this process calls a DSM (Device Specific Method) on the
    ACPI KIOX010A device node for the sensor in the display, to let the
    embedded-controller (EC) know about the mode so that it can disable the
    kbd and touchpad to avoid spurious input while folded into tablet-mode.
    
    This notifying of the EC is problematic because sometimes the EC comes up
    thinking that device is in tablet-mode and the kbd and touchpad do not
    work. This happens for example on Irbis NB111 devices after a suspend /
    resume cycle (after a complete battery drain / hard reset without having
    booted Windows at least once). Other 2-in-1s which are likely affected
    too are e.g. the Teclast F5 and F6 series.
    
    The kxcjk-1013 driver may seem like a strange place to deal with this,
    but since it is *the* driver for the ACPI KIOX010A device, it is also
    the driver which has access to the ACPI handle needed by the DSM.
    
    Add support for calling the DSM and on probe unconditionally tell the
    EC that the device is laptop mode, fixing the kbd and touchpad sometimes
    not working.
    
    Fixes: 7f6232e69539 ("iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID")
    Reported-and-tested-by: russianneuromancer <russianneuromancer@ya.ru>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Cc: <Stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201110133835.129080-3-hdegoede@redhat.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b8b48e4a9cd09e1882554e6fc71de28619d909d9
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Nov 10 14:38:34 2020 +0100

    iio: accel: kxcjk1013: Replace is_smo8500_device with an acpi_type enum
    
    commit 11e94f28c3de35d5ad1ac6a242a5b30f4378991a upstream.
    
    Replace the boolean is_smo8500_device variable with an acpi_type enum.
    
    For now this can be either ACPI_GENERIC or ACPI_SMO8500, this is a
    preparation patch for adding special handling for the KIOX010A ACPI HID,
    which will add a ACPI_KIOX010A acpi_type to the introduced enum.
    
    For stable as needed as precursor for next patch.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Fixes: 7f6232e69539 ("iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID")
    Cc: <Stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201110133835.129080-2-hdegoede@redhat.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c31531d33e40aaabc10ec22ef9f5667db58cbd74
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Tue Nov 10 15:52:01 2020 -0800

    ACPI: fan: Initialize performance state sysfs attribute
    
    commit 7dc7a8b04f3da8aa3c3be514e155e2fa094e976f upstream.
    
    The following warning is reported if lock debugging is enabled.
    
    DEBUG_LOCKS_WARN_ON(1)
    WARNING: CPU: 1 PID: 1 at kernel/locking/lockdep.c:4617 lockdep_init_map_waits+0x141/0x222
    ...
    Call Trace:
     __kernfs_create_file+0x7a/0xd8
     sysfs_add_file_mode_ns+0x135/0x189
     sysfs_create_file_ns+0x70/0xa0
     acpi_fan_probe+0x547/0x621
     platform_drv_probe+0x67/0x8b
     ...
    
    Dynamically allocated sysfs attributes need to be initialized to avoid
    the warning.
    
    Fixes: d19e470b6605 ("ACPI: fan: Expose fan performance state information")
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Cc: 5.6+ <stable@vger.kernel.org> # 5.6+
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 94fe5a9e72eb1cec3b3b6e13fa6fcc1ac6558c3e
Author: Gao Xiang <hsiangkao@redhat.com>
Date:   Sat Nov 14 11:06:01 2020 -0800

    xfs: fix forkoff miscalculation related to XFS_LITINO(mp)
    
    commit ada49d64fb3538144192181db05de17e2ffc3551 upstream.
    
    Currently, commit e9e2eae89ddb dropped a (int) decoration from
    XFS_LITINO(mp), and since sizeof() expression is also involved,
    the result of XFS_LITINO(mp) is simply as the size_t type
    (commonly unsigned long).
    
    Considering the expression in xfs_attr_shortform_bytesfit():
      offset = (XFS_LITINO(mp) - bytes) >> 3;
    let "bytes" be (int)340, and
        "XFS_LITINO(mp)" be (unsigned long)336.
    
    on 64-bit platform, the expression is
      offset = ((unsigned long)336 - (int)340) >> 3 =
               (int)(0xfffffffffffffffcUL >> 3) = -1
    
    but on 32-bit platform, the expression is
      offset = ((unsigned long)336 - (int)340) >> 3 =
               (int)(0xfffffffcUL >> 3) = 0x1fffffff
    instead.
    
    so offset becomes a large positive number on 32-bit platform, and
    cause xfs_attr_shortform_bytesfit() returns maxforkoff rather than 0.
    
    Therefore, one result is
      "ASSERT(new_size <= XFS_IFORK_SIZE(ip, whichfork));"
    
    assertion failure in xfs_idata_realloc(), which was also the root
    cause of the original bugreport from Dennis, see:
       https://bugzilla.redhat.com/show_bug.cgi?id=1894177
    
    And it can also be manually triggered with the following commands:
      $ touch a;
      $ setfattr -n user.0 -v "`seq 0 80`" a;
      $ setfattr -n user.1 -v "`seq 0 80`" a
    
    on 32-bit platform.
    
    Fix the case in xfs_attr_shortform_bytesfit() by bailing out
    "XFS_LITINO(mp) < bytes" in advance suggested by Eric and a misleading
    comment together with this bugfix suggested by Darrick. It seems the
    other users of XFS_LITINO(mp) are not impacted.
    
    Fixes: e9e2eae89ddb ("xfs: only check the superblock version for dinode size calculation")
    Cc: <stable@vger.kernel.org> # 5.7+
    Reported-and-tested-by: Dennis Gilmore <dgilmore@redhat.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
    Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3a6b5d56d7b1862ca90604d9792fdbca9e35e2e3
Author: Jan Kara <jack@suse.cz>
Date:   Wed Nov 18 16:30:32 2020 +0100

    ext4: fix bogus warning in ext4_update_dx_flag()
    
    commit f902b216501094495ff75834035656e8119c537f upstream.
    
    The idea of the warning in ext4_update_dx_flag() is that we should warn
    when we are clearing EXT4_INODE_INDEX on a filesystem with metadata
    checksums enabled since after clearing the flag, checksums for internal
    htree nodes will become invalid. So there's no need to warn (or actually
    do anything) when EXT4_INODE_INDEX is not set.
    
    Link: https://lore.kernel.org/r/20201118153032.17281-1-jack@suse.cz
    Fixes: 48a34311953d ("ext4: fix checksum errors with indexed dirs")
    Reported-by: Eric Biggers <ebiggers@kernel.org>
    Reviewed-by: Eric Biggers <ebiggers@google.com>
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Cc: stable@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8fcfcad48b24c25cfb02df99bcb64e3c58232d76
Author: Necip Fazil Yildiran <fazilyildiran@gmail.com>
Date:   Tue Nov 3 01:35:24 2020 +0300

    iio: light: fix kconfig dependency bug for VCNL4035
    
    commit 44a146a44f656fc03d368c1b9248d29a128cd053 upstream.
    
    When VCNL4035 is enabled and IIO_BUFFER is disabled, it results in the
    following Kbuild warning:
    
    WARNING: unmet direct dependencies detected for IIO_TRIGGERED_BUFFER
      Depends on [n]: IIO [=y] && IIO_BUFFER [=n]
      Selected by [y]:
      - VCNL4035 [=y] && IIO [=y] && I2C [=y]
    
    The reason is that VCNL4035 selects IIO_TRIGGERED_BUFFER without depending
    on or selecting IIO_BUFFER while IIO_TRIGGERED_BUFFER depends on
    IIO_BUFFER. This can also fail building the kernel.
    
    Honor the kconfig dependency to remove unmet direct dependency warnings
    and avoid any potential build failures.
    
    Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035")
    Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=209883
    Link: https://lore.kernel.org/r/20201102223523.572461-1-fazilyildiran@gmail.com
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7895cead8d9f81ac8dc1202e332003d767d29953
Author: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Date:   Mon Nov 2 21:25:15 2020 +0100

    staging: mt7621-pci: avoid to request pci bus resources
    
    commit e2b2e4386cb7a5e935dff388cf8961317daf39ce upstream.
    
    After upgrading kernel to version 5.9.x the driver was not
    working anymore showing the following kernel trace:
    
    ...
    mt7621-pci 1e140000.pcie: resource collision:
    [mem 0x60000000-0x6fffffff] conflicts with pcie@1e140000 [mem 0x60000000-0x6fffffff]
    ------------[ cut here ]------------
    WARNING: CPU: 2 PID: 73 at kernel/resource.c:1400
    devm_request_resource+0xfc/0x10c
    Modules linked in:
    CPU: 2 PID: 73 Comm: kworker/2:1 Not tainted 5.9.2 #0
    Workqueue: events deferred_probe_work_func
    Stack : 00000000 81590000 807d0a1c 808a0000 8fd49080
            807d0000 00000009 808ac820
            00000001 808338d0 7fff0001 800839dc 00000049
            00000001 8fe51b00 367204ab
            00000000 00000000 807d0a1c 807c0000 00000001
            80082358 8fe50000 00559000
            00000000 8fe519f1 ffffffff 00000005 00000000
            00000001 00000000 807d0000
            00000009 808ac820 00000001 808338d0 00000001
            803bf1b0 00000008 81390008
    
    Call Trace:
    [<8000d018>] show_stack+0x30/0x100
    [<8032e66c>] dump_stack+0xa4/0xd4
    [<8002db1c>] __warn+0xc0/0x134
    [<8002dbec>] warn_slowpath_fmt+0x5c/0xac
    [<80033b34>] devm_request_resource+0xfc/0x10c
    [<80365ff8>] devm_request_pci_bus_resources+0x58/0xdc
    [<8048e13c>] mt7621_pci_probe+0x8dc/0xe48
    [<803d2140>] platform_drv_probe+0x40/0x94
    [<803cfd94>] really_probe+0x108/0x4ec
    [<803cd958>] bus_for_each_drv+0x70/0xb0
    [<803d0388>] __device_attach+0xec/0x164
    [<803cec8c>] bus_probe_device+0xa4/0xc0
    [<803cf1c4>] deferred_probe_work_func+0x80/0xc4
    [<80048444>] process_one_work+0x260/0x510
    [<80048a4c>] worker_thread+0x358/0x5cc
    [<8004f7d0>] kthread+0x134/0x13c
    [<80007478>] ret_from_kernel_thread+0x14/0x1c
    ---[ end trace a9dd2e37537510d3 ]---
    mt7621-pci 1e140000.pcie: Error requesting resources
    mt7621-pci: probe of 1e140000.pcie failed with error -16
    ...
    
    With commit 669cbc708122 ("PCI: Move DT resource setup into
    devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated
    into resources when the host bridge is allocated. The resources are
    requested as well, but that happens a 2nd time for this driver in
    mt7621_pcie_request_resources(). Hence we should avoid this second
    request.
    
    Also, the bus ranges was also populated by default, so we can remove
    it from mt7621_pcie_request_resources() to avoid the following trace
    if we don't avoid it:
    
    pci_bus 0000:00: busn_res: can not insert [bus 00-ff]
    under domain [bus 00-ff] (conflicts with (null) [bus 00-ff])
    
    Function 'mt7621_pcie_request_resources' has been renamed into
    'mt7621_pcie_add_resources' which now is a more accurate name
    for this function.
    
    Cc: stable@vger.kernel.org #5.9.x-
    Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
    Link: https://lore.kernel.org/r/20201102202515.19073-1-sergio.paracuellos@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9d492290f2c5a0618afd687f7000c9454fa94692
Author: Brian O'Keefe <bokeefe@alum.wpi.edu>
Date:   Fri Nov 6 10:10:34 2020 -0500

    staging: rtl8723bs: Add 024c:0627 to the list of SDIO device-ids
    
    commit aee9dccc5b64e878cf1b18207436e73f66d74157 upstream.
    
    Add 024c:0627 to the list of SDIO device-ids, based on hardware found in
    the wild. This hardware exists on at least some Acer SW1-011 tablets.
    
    Signed-off-by: Brian O'Keefe <bokeefe@alum.wpi.edu>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Link: https://lore.kernel.org/r/b9e1523f-2ba7-fb82-646a-37f095b4440e@alum.wpi.edu
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2ad3479981652381b2a1f1cbdcba7efd218eb7c9
Author: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@gmail.com>
Date:   Fri Oct 23 17:24:39 2020 +0530

    efivarfs: fix memory leak in efivarfs_create()
    
    commit fe5186cf12e30facfe261e9be6c7904a170bd822 upstream.
    
    kmemleak report:
      unreferenced object 0xffff9b8915fcb000 (size 4096):
      comm "efivarfs.sh", pid 2360, jiffies 4294920096 (age 48.264s)
      hex dump (first 32 bytes):
        2d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  -...............
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<00000000cc4d897c>] kmem_cache_alloc_trace+0x155/0x4b0
        [<000000007d1dfa72>] efivarfs_create+0x6e/0x1a0
        [<00000000e6ee18fc>] path_openat+0xe4b/0x1120
        [<000000000ad0414f>] do_filp_open+0x91/0x100
        [<00000000ce93a198>] do_sys_openat2+0x20c/0x2d0
        [<000000002a91be6d>] do_sys_open+0x46/0x80
        [<000000000a854999>] __x64_sys_openat+0x20/0x30
        [<00000000c50d89c9>] do_syscall_64+0x38/0x90
        [<00000000cecd6b5f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    In efivarfs_create(), inode->i_private is setup with efivar_entry
    object which is never freed.
    
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Vamshi K Sthambamkadi <vamshi.k.sthambamkadi@gmail.com>
    Link: https://lore.kernel.org/r/20201023115429.GA2479@cosmos
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b1ab44310328e67c3cf684e2da7a327a25d70e4d
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sat Nov 14 10:45:31 2020 +0100

    HID: logitech-dj: Fix an error in mse_bluetooth_descriptor
    
    commit eec231e060fb79923c349f6e89f022b286f32c1e upstream.
    
    Fix an error in the mouse / INPUT(2) descriptor used for quad/bt2.0 combo
    receivers. Replace INPUT with INPUT (Data,Var,Abs) for the field for the
    4 extra buttons which share their report-byte with the low-res hwheel.
    
    This is likely a copy and paste error. I've verified that the new
    0x81, 0x02 value matches both the mouse descriptor for the currently
    supported MX5000 / MX5500 receivers, as well as the INPUT(2) mouse
    descriptors for the Dinovo receivers for which support is being
    worked on.
    
    Cc: stable@vger.kernel.org
    Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 76948870da83bc358f70f1e665613dd7ac538fc3
Author: Fugang Duan <fugang.duan@nxp.com>
Date:   Wed Nov 11 10:51:36 2020 +0800

    tty: serial: imx: keep console clocks always on
    
    commit e67c139c488e84e7eae6c333231e791f0e89b3fb upstream.
    
    For below code, there has chance to cause deadlock in SMP system:
    Thread 1:
    clk_enable_lock();
    pr_info("debug message");
    clk_enable_unlock();
    
    Thread 2:
    imx_uart_console_write()
            clk_enable()
                    clk_enable_lock();
    
    Thread 1:
    Acuired clk enable_lock -> printk -> console_trylock_spinning
    Thread 2:
    console_unlock() -> imx_uart_console_write -> clk_disable -> Acquite clk enable_lock
    
    So the patch is to keep console port clocks always on like
    other console drivers.
    
    Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
    Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
    Link: https://lore.kernel.org/r/20201111025136.29818-1-fugang.duan@nxp.com
    Cc: stable <stable@vger.kernel.org>
    [fix up build warning - gregkh]
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c4d41ee13b3403495973c950d1d1516877fa5511
Author: Sam Nobs <samuel.nobs@taitradio.com>
Date:   Tue Nov 10 09:50:06 2020 +1300

    tty: serial: imx: fix potential deadlock
    
    commit 33f16855dcb973f745c51882d0e286601ff3be2b upstream.
    
    Enabling the lock dependency validator has revealed
    that the way spinlocks are used in the IMX serial
    port could result in a deadlock.
    
    Specifically, imx_uart_int() acquires a spinlock
    without disabling the interrupts, meaning that another
    interrupt could come along and try to acquire the same
    spinlock, potentially causing the two to wait for each
    other indefinitely.
    
    Use spin_lock_irqsave() instead to disable interrupts
    upon acquisition of the spinlock.
    
    Fixes: c974991d2620 ("tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr")
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Sam Nobs <samuel.nobs@taitradio.com>
    Link: https://lore.kernel.org/r/1604955006-9363-1-git-send-email-samuel.nobs@taitradio.com
    Cc: stable <stable@vger.kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 276949ee96a29e0ebf996fa64395fd23e1144877
Author: Kailang Yang <kailang@realtek.com>
Date:   Tue Nov 3 15:30:51 2020 +0800

    ALSA: hda/realtek - HP Headset Mic can't detect after boot
    
    commit 9e885770277d2ed8d85f9cbd4992515ec324242f upstream.
    
    System boot or warm boot with plugged headset.
    If it turn on power save mode, Headset Mic will lose.
    This patch will solve this issue.
    
    Signed-off-by: Kailang Yang <kailang@realtek.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b8705cbbb96d0b07f367685ea932c4f987ec02ff
Author: PeiSen Hou <pshou@realtek.com>
Date:   Wed Nov 11 08:58:59 2020 +0100

    ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)
    
    commit b5acfe152abaa2721c9ca8aa67f941d7de55d24e upstream.
    
    Fix "use as headset mic, without its own jack detect" problem.
    
    [ Minor coding style fixes by tiwai ]
    
    Signed-off-by: PeiSen Hou <pshou@realtek.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/481963e4a5694ff19f27ae1e283d79ad@realtek.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 274b8ad81673350e6d69764f88b383cc8efeda34
Author: Kailang Yang <kailang@realtek.com>
Date:   Fri Nov 6 15:20:38 2020 +0800

    ALSA: hda/realtek - Add supported mute Led for HP
    
    commit a0ccbc5319d57b9efdc55c943a3fde30a0776502 upstream.
    
    HP Pavilion x360 Convertible machine, it supported mute led.
    GPIO4 high will turn on led.
    The patch will enable control led via GPIO4 pin.
    
    Signed-off-by: Kailang Yang <kailang@realtek.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 350c8e9dea225d8382483b3a7a59e0d16ade9d6e
Author: Kailang Yang <kailang@realtek.com>
Date:   Mon Nov 2 15:00:12 2020 +0800

    ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button
    
    commit 446b8185f0c39ac3faadbcd8ac156c50f2fd4ffe upstream.
    
    Add supported for Lenovo ThinkPad Headset Button.
    Thinkpad P1 Gen 3 (0x22c1)
    Thinkpad X1 Extreme Gen 3 (0x22c2)
    
    Signed-off-by: Kailang Yang <kailang@realtek.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/f39b11d00340408ca2ed2df9b4fc2a09@realtek.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 62208748764e4603c54bb57269df84f133b1c412
Author: Takashi Iwai <tiwai@suse.de>
Date:   Thu Nov 19 13:14:40 2020 +0100

    ALSA: mixart: Fix mutex deadlock
    
    commit d21b96c8ed2aea7e6b7bf4735e1d2503cfbf4072 upstream.
    
    The code change for switching to non-atomic mode brought the
    unexpected mutex deadlock in get_msg().  It converted the spinlock
    with the existing mutex, but there were calls with the already holding
    the mutex.  Since the only place that needs the extra lock is the code
    path from snd_mixart_send_msg(), remove the mutex lock in get_msg()
    and apply in the caller side for fixing the mutex deadlock.
    
    Fixes: 8d3a8b5cb57d ("ALSA: mixart: Use nonatomic PCM ops")
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201119121440.18945-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0976f5c67a43d82f292c7c42cd09c5d99c20ab68
Author: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date:   Fri Nov 13 18:20:43 2020 +0900

    ALSA: ctl: fix error path at adding user-defined element set
    
    commit 95a793c3bc75cf888e0e641d656e7d080f487d8b upstream.
    
    When processing request to add/replace user-defined element set, check
    of given element identifier and decision of numeric identifier is done
    in "__snd_ctl_add_replace()" helper function. When the result of check
    is wrong, the helper function returns error code. The error code shall
    be returned to userspace application.
    
    Current implementation includes bug to return zero to userspace application
    regardless of the result. This commit fixes the bug.
    
    Cc: <stable@vger.kernel.org>
    Fixes: e1a7bfe38079 ("ALSA: control: Fix race between adding and removing a user element")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Link: https://lore.kernel.org/r/20201113092043.16148-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit dead6fe9d033aff2ace8a687cb04a9492fd59b0c
Author: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Date:   Tue Nov 17 13:28:03 2020 +0100

    ALSA: usb-audio: Add delay quirk for all Logitech USB devices
    
    commit 54a2a3898f469a915510038fe84ef4f083131d3e upstream.
    
    Found one more Logitech device, BCC950 ConferenceCam, which needs
    the same delay here. This makes 3 out of 3 devices I have tried.
    
    Therefore, add a delay for all Logitech devices as it does not hurt.
    
    Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
    Cc: <stable@vger.kernel.org> # 4.19.y, 5.4.y
    Link: https://lore.kernel.org/r/20201117122803.24310-1-joakim.tjernlund@infinera.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6e0d4970139835f55e9762225bfdc4656aef2c35
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Nov 13 13:12:41 2020 +0300

    ALSA: firewire: Clean up a locking issue in copy_resp_to_buf()
    
    commit 02a9c6ee4183af2e438454c55098b828a96085fb upstream.
    
    The spin_lock/unlock_irq() functions cannot be nested.  The problem is
    that presumably we would want the IRQs to be re-enabled on the second
    call the spin_unlock_irq() but instead it will be enabled at the first
    call so IRQs will be enabled earlier than expected.
    
    In this situation the copy_resp_to_buf() function is only called from
    one function and it is called with IRQs disabled.  We can just use
    the regular spin_lock/unlock() functions.
    
    Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201113101241.GB168908@mwanda
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1f1cc0b0ba3ac8b5c719bdf1a4952889dfd9b593
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Tue Nov 10 19:35:41 2020 +0100

    speakup: Do not let the line discipline be used several times
    
    commit d4122754442799187d5d537a9c039a49a67e57f1 upstream.
    
    Speakup has only one speakup_tty variable to store the tty it is managing. This
    makes sense since its codebase currently assumes that there is only one user who
    controls the screen reading.
    
    That however means that we have to forbid using the line discipline several
    times, otherwise the second closure would try to free a NULL ldisc_data, leading to
    
    general protection fault: 0000 [#1] SMP KASAN PTI
    RIP: 0010:spk_ttyio_ldisc_close+0x2c/0x60
    Call Trace:
     tty_ldisc_release+0xa2/0x340
     tty_release_struct+0x17/0xd0
     tty_release+0x9d9/0xcc0
     __fput+0x231/0x740
     task_work_run+0x12c/0x1a0
     do_exit+0x9b5/0x2230
     ? release_task+0x1240/0x1240
     ? __do_page_fault+0x562/0xa30
     do_group_exit+0xd5/0x2a0
     __x64_sys_exit_group+0x35/0x40
     do_syscall_64+0x89/0x2b0
     ? page_fault+0x8/0x30
     entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    Cc: stable@vger.kernel.org
    Reported-by: 秦世松 <qinshisong1205@gmail.com>
    Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
    Tested-by: Shisong Qin <qinshisong1205@gmail.com>
    Link: https://lore.kernel.org/r/20201110183541.fzgnlwhjpgqzjeth@function
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d929c9bfc60713b0f46b45edb9304ba3440de324
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sat Nov 14 22:20:56 2020 +0100

    HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver
    
    [ Upstream commit b4c00e7976636f33a4f67eab436a11666c8afd60 ]
    
    Some users are pairing the Dinovo keyboards with the MX5000 or MX5500
    receivers, instead of with the Dinovo receivers. The receivers are
    mostly the same (and the air protocol obviously is compatible) but
    currently the Dinovo receivers are handled by hid-lg.c while the
    MX5x00 receivers are handled by logitech-dj.c.
    
    When using a Dinovo keyboard, with its builtin touchpad, through
    logitech-dj.c then the touchpad stops working because when asking the
    receiver for paired devices, we get only 1 paired device with
    a device_type of REPORT_TYPE_KEYBOARD. And since we don't see a paired
    mouse, we have nowhere to send mouse-events to, so we drop them.
    
    Extend the existing fix for the Dinovo Edge for this to also cover the
    Dinovo Mini keyboard and also add a mapping to logitech-hidpp for the
    Media key on the Dinovo Mini, so that that keeps working too.
    
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424
    Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 12db09f8e51e82d1af94f887ef841f480a62e829
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Nov 2 14:36:56 2020 +0100

    HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad
    
    [ Upstream commit ee5e58418a854755201eb4952b1230d873a457d5 ]
    
    Some quad/bluetooth keyboards, such as the Dinovo Edge (Y-RAY81) have a
    builtin touchpad. In this case when asking the receiver for paired devices,
    we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD.
    
    This means that we do not instantiate a second dj_hiddev for the mouse
    (as we normally would) and thus there is no place for us to forward the
    mouse input reports to, causing the touchpad part of the keyboard to not
    work.
    
    There is no way for us to detect these keyboards, so this commit adds
    an array with device-ids for such keyboards and when a keyboard is on
    this list it adds STD_MOUSE to the reports_supported bitmap for the
    dj_hiddev created for the keyboard fixing the touchpad not working.
    
    Using a list of device-ids for this is not ideal, but there are only
    very few such keyboards so this should be fine. Besides the Dinovo Edge,
    other known wireless Logitech keyboards with a builtin touchpad are:
    
    * Dinovo Mini (TODO add its device-id to the list)
    * K400 (uses a unifying receiver so is not affected)
    * K600 (uses a unifying receiver so is not affected)
    
    Cc: stable@vger.kernel.org
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424
    Fixes: f2113c3020ef ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a28d47bd930db08bf21f63193e8ad93a5ce9f7f6
Author: Lars Povlsen <lars.povlsen@microchip.com>
Date:   Wed Nov 4 23:02:23 2020 +0100

    HID: mcp2221: Fix GPIO output handling
    
    [ Upstream commit 567b8e9fed8add9e20885be38ecd73bb0e07406b ]
    
    The mcp2221 driver GPIO output handling has has several issues.
    
    * A wrong value is used for the GPIO direction.
    
    * Wrong offsets are calculated for some GPIO set value/set direction
      operations, when offset is larger than 0.
    
    This has been fixed by introducing proper manifest constants for the
    direction encoding, and using 'offsetof' when calculating GPIO
    register offsets.
    
    The updated driver has been tested with the Sparx5 pcb134/pcb135
    board, which has the mcp2221 device with several (output) GPIO's.
    
    Fixes: 328de1c519c5c092 ("HID: mcp2221: add GPIO functionality support")
    Reviewed-by: Rishi Gupta <gupt21@gmail.com>
    Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 646e5ab6b8dce76ffc52dd7441dddf046eb9ac31
Author: Harry Cutts <hcutts@chromium.org>
Date:   Wed Oct 21 06:56:12 2020 -0700

    HID: logitech-hidpp: Add PID for MX Anywhere 2
    
    [ Upstream commit b59f38dbfd5d19eb7e03d8b639f0c0d385ba8cc5 ]
    
    It seems that the PID 0x4072 was missing from the list Logitech gave me
    for this mouse, as I found one with it in the wild (with which I tested
    this patch).
    
    Fixes: 4435ff2f09a2 ("HID: logitech: Enable high-resolution scrolling on Logitech mice")
    Signed-off-by: Harry Cutts <hcutts@chromium.org>
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b321d0b47eb53715766d0db17370ee967facba62
Author: David Howells <dhowells@redhat.com>
Date:   Sun Nov 22 13:13:45 2020 +0000

    afs: Fix speculative status fetch going out of order wrt to modifications
    
    [ Upstream commit a9e5c87ca7443d09fb530fffa4d96ce1c76dbe4d ]
    
    When doing a lookup in a directory, the afs filesystem uses a bulk
    status fetch to speculatively retrieve the statuses of up to 48 other
    vnodes found in the same directory and it will then either update extant
    inodes or create new ones - effectively doing 'lookup ahead'.
    
    To avoid the possibility of deadlocking itself, however, the filesystem
    doesn't lock all of those inodes; rather just the directory inode is
    locked (by the VFS).
    
    When the operation completes, afs_inode_init_from_status() or
    afs_apply_status() is called, depending on whether the inode already
    exists, to commit the new status.
    
    A case exists, however, where the speculative status fetch operation may
    straddle a modification operation on one of those vnodes.  What can then
    happen is that the speculative bulk status RPC retrieves the old status,
    and whilst that is happening, the modification happens - which returns
    an updated status, then the modification status is committed, then we
    attempt to commit the speculative status.
    
    This results in something like the following being seen in dmesg:
    
            kAFS: vnode modified {100058:861} 8->9 YFS.InlineBulkStatus
    
    showing that for vnode 861 on volume 100058, we saw YFS.InlineBulkStatus
    say that the vnode had data version 8 when we'd already recorded version
    9 due to a local modification.  This was causing the cache to be
    invalidated for that vnode when it shouldn't have been.  If it happens
    on a data file, this might lead to local changes being lost.
    
    Fix this by ignoring speculative status updates if the data version
    doesn't match the expected value.
    
    Note that it is possible to get a DV regression if a volume gets
    restored from a backup - but we should get a callback break in such a
    case that should trigger a recheck anyway.  It might be worth checking
    the volume creation time in the volsync info and, if a change is
    observed in that (as would happen on a restore), invalidate all caches
    associated with the volume.
    
    Fixes: 5cf9dd55a0ec ("afs: Prospectively look up extra files when doing a single lookup")
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 17e443a5dadc3c22f9c78aec80909074bd528945
Author: Yicong Yang <yangyicong@hisilicon.com>
Date:   Sat Nov 21 22:17:19 2020 -0800

    libfs: fix error cast of negative value in simple_attr_write()
    
    [ Upstream commit 488dac0c9237647e9b8f788b6a342595bfa40bda ]
    
    The attr->set() receive a value of u64, but simple_strtoll() is used for
    doing the conversion.  It will lead to the error cast if user inputs a
    negative value.
    
    Use kstrtoull() instead of simple_strtoll() to convert a string got from
    the user to an unsigned value.  The former will return '-EINVAL' if it
    gets a negetive value, but the latter can't handle the situation
    correctly.  Make 'val' unsigned long long as what kstrtoull() takes,
    this will eliminate the compile warning on no 64-bit architectures.
    
    Fixes: f7b88631a897 ("fs/libfs.c: fix simple_attr_write() on 32bit machines")
    Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Link: https://lkml.kernel.org/r/1605341356-11872-1-git-send-email-yangyicong@hisilicon.com
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 0481a0358d4268e5502a3fcecef4ac6f2668fd26
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Thu Sep 24 13:50:42 2020 +0200

    sched: Fix rq->nr_iowait ordering
    
    [ Upstream commit ec618b84f6e15281cc3660664d34cd0dd2f2579e ]
    
      schedule()                            ttwu()
        deactivate_task();                    if (p->on_rq && ...) // false
                                                atomic_dec(&task_rq(p)->nr_iowait);
        if (prev->in_iowait)
          atomic_inc(&rq->nr_iowait);
    
    Allows nr_iowait to be decremented before it gets incremented,
    resulting in more dodgy IO-wait numbers than usual.
    
    Note that because we can now do ttwu_queue_wakelist() before
    p->on_cpu==0, we lose the natural ordering and have to further delay
    the decrement.
    
    Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu")
    Reported-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Acked-by: Mel Gorman <mgorman@techsingularity.net>
    Link: https://lkml.kernel.org/r/20201117093829.GD3121429@hirez.programming.kicks-ass.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 09b5b608f461cbd4dca250fc480e0f7bef6a140e
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Tue Nov 17 09:08:41 2020 +0100

    sched: Fix data-race in wakeup
    
    [ Upstream commit f97bb5272d9e95d400d6c8643ebb146b3e3e7842 ]
    
    Mel reported that on some ARM64 platforms loadavg goes bananas and
    Will tracked it down to the following race:
    
      CPU0                                  CPU1
    
      schedule()
        prev->sched_contributes_to_load = X;
        deactivate_task(prev);
    
                                            try_to_wake_up()
                                              if (p->on_rq &&) // false
                                              if (smp_load_acquire(&p->on_cpu) && // true
                                                  ttwu_queue_wakelist())
                                                    p->sched_remote_wakeup = Y;
    
        smp_store_release(prev->on_cpu, 0);
    
    where both p->sched_contributes_to_load and p->sched_remote_wakeup are
    in the same word, and thus the stores X and Y race (and can clobber
    one another's data).
    
    Whereas prior to commit c6e7bd7afaeb ("sched/core: Optimize ttwu()
    spinning on p->on_cpu") the p->on_cpu handoff serialized access to
    p->sched_remote_wakeup (just as it still does with
    p->sched_contributes_to_load) that commit broke that by calling
    ttwu_queue_wakelist() with p->on_cpu != 0.
    
    However, due to
    
      p->XXX = X                    ttwu()
      schedule()                      if (p->on_rq && ...) // false
        smp_mb__after_spinlock()      if (smp_load_acquire(&p->on_cpu) &&
        deactivate_task()                 ttwu_queue_wakelist())
          p->on_rq = 0;                     p->sched_remote_wakeup = Y;
    
    We can be sure any 'current' store is complete and 'current' is
    guaranteed asleep. Therefore we can move p->sched_remote_wakeup into
    the current flags word.
    
    Note: while the observed failure was loadavg accounting gone wrong due
    to ttwu() cobbering p->sched_contributes_to_load, the reverse problem
    is also possible where schedule() clobbers p->sched_remote_wakeup,
    this could result in enqueue_entity() wrecking ->vruntime and causing
    scheduling artifacts.
    
    Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu")
    Reported-by: Mel Gorman <mgorman@techsingularity.net>
    Debugged-by: Will Deacon <will@kernel.org>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Link: https://lkml.kernel.org/r/20201117083016.GK3121392@hirez.programming.kicks-ass.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c2ff4a4153203c7bf8b562e4b8be30cd06b92905
Author: Quentin Perret <qperret@google.com>
Date:   Thu Nov 12 11:12:01 2020 +0000

    sched/fair: Fix overutilized update in enqueue_task_fair()
    
    [ Upstream commit 8e1ac4299a6e8726de42310d9c1379f188140c71 ]
    
    enqueue_task_fair() attempts to skip the overutilized update for new
    tasks as their util_avg is not accurate yet. However, the flag we check
    to do so is overwritten earlier on in the function, which makes the
    condition pretty much a nop.
    
    Fix this by saving the flag early on.
    
    Fixes: 2802bf3cd936 ("sched/fair: Add over-utilization/tipping point indicator")
    Reported-by: Rick Yiu <rickyiu@google.com>
    Signed-off-by: Quentin Perret <qperret@google.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
    Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
    Link: https://lkml.kernel.org/r/20201112111201.2081902-1-qperret@google.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 2c6fc64e4363a74256999c59be9722b9473cfdaf
Author: Arvind Sankar <nivedita@alum.mit.edu>
Date:   Tue Nov 10 11:39:19 2020 -0500

    efi/x86: Free efi_pgd with free_pages()
    
    [ Upstream commit c2fe61d8be491ff8188edaf22e838f819999146b ]
    
    Commit
    
      d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD")
    
    changed the PGD allocation to allocate PGD_ALLOCATION_ORDER pages, so in
    the error path it should be freed using free_pages() rather than
    free_page().
    
    Commit
    
        06ace26f4e6f ("x86/efi: Free efi_pgd with free_pages()")
    
    fixed one instance of this, but missed another.
    
    Move the freeing out-of-line to avoid code duplication and fix this bug.
    
    Fixes: d9e9a6418065 ("x86/mm/pti: Allocate a separate user PGD")
    Link: https://lore.kernel.org/r/20201110163919.1134431-1-nivedita@alum.mit.edu
    Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4848d59d3a74cc18215d974856a4d686657666eb
Author: David Lechner <david@lechnology.com>
Date:   Sun Oct 25 11:51:22 2020 -0500

    counter/ti-eqep: Fix regmap max_register
    
    [ Upstream commit 271b339236e1c0e6448bc1cafeaedcb529324bf0 ]
    
    The values given were the offset of the register after the last
    register instead of the actual last register in each range. Fix
    by using the correct last register of each range.
    
    Fixes: f213729f6796 ("counter: new TI eQEP driver")
    Signed-off-by: David Lechner <david@lechnology.com>
    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
    Link: https://lore.kernel.org/r/20201025165122.607866-1-david@lechnology.com
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit d3d9a13716bb8751ef8c71d3394142ebc1ad5d42
Author: Ard Biesheuvel <ardb@kernel.org>
Date:   Sat Oct 3 17:28:27 2020 +0200

    efi/arm: set HSCTLR Thumb2 bit correctly for HVC calls from HYP
    
    [ Upstream commit fbc81ec5b85d43a4b22e49ec0e643fa7dec2ea40 ]
    
    Commit
    
      db227c19e68db353 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully")
    
    updated the EFI entry code to permit firmware to invoke the EFI stub
    loader in HYP mode, with the MMU either enabled or disabled, neither
    of which is permitted by the EFI spec, but which does happen in the
    field.
    
    In the MMU on case, we remain in HYP mode as configured by the firmware,
    and rely on the fact that any HVC instruction issued in this mode will
    be dispatched via the SVC slot in the HYP vector table. However, this
    slot will point to a Thumb2 symbol if the kernel is built in Thumb2
    mode, and so we have to configure HSCTLR to ensure that the exception
    handlers are invoked in Thumb2 mode as well.
    
    Fixes: db227c19e68db353 ("ARM: 8985/1: efi/decompressor: deal with HYP mode boot gracefully")
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5a1441d0e39955a140cdebc586e2471a23952b96
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Mon Nov 16 14:28:46 2020 -0800

    bpf, sockmap: Avoid returning unneeded EAGAIN when redirecting to self
    
    [ Upstream commit 6fa9201a898983da731fca068bb4b5c941537588 ]
    
    If a socket redirects to itself and it is under memory pressure it is
    possible to get a socket stuck so that recv() returns EAGAIN and the
    socket can not advance for some time. This happens because when
    redirecting a skb to the same socket we received the skb on we first
    check if it is OK to enqueue the skb on the receiving socket by checking
    memory limits. But, if the skb is itself the object holding the memory
    needed to enqueue the skb we will keep retrying from kernel side
    and always fail with EAGAIN. Then userspace will get a recv() EAGAIN
    error if there are no skbs in the psock ingress queue. This will continue
    until either some skbs get kfree'd causing the memory pressure to
    reduce far enough that we can enqueue the pending packet or the
    socket is destroyed. In some cases its possible to get a socket
    stuck for a noticeable amount of time if the socket is only receiving
    skbs from sk_skb verdict programs. To reproduce I make the socket
    memory limits ridiculously low so sockets are always under memory
    pressure. More often though if under memory pressure it looks like
    a spurious EAGAIN error on user space side causing userspace to retry
    and typically enough has moved on the memory side that it works.
    
    To fix skip memory checks and skb_orphan if receiving on the same
    sock as already assigned.
    
    For SK_PASS cases this is easy, its always the same socket so we
    can just omit the orphan/set_owner pair.
    
    For backlog cases we need to check skb->sk and decide if the orphan
    and set_owner pair are needed.
    
    Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
    Link: https://lore.kernel.org/bpf/160556572660.73229.12566203819812939627.stgit@john-XPS-13-9370
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9668766af9bd459f126e18a3f309f976f6479a25
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Mon Nov 16 14:28:26 2020 -0800

    bpf, sockmap: Use truesize with sk_rmem_schedule()
    
    [ Upstream commit 70796fb751f1d34cc650e640572a174faf009cd4 ]
    
    We use skb->size with sk_rmem_scheduled() which is not correct. Instead
    use truesize to align with socket and tcp stack usage of sk_rmem_schedule.
    
    Suggested-by: Daniel Borkman <daniel@iogearbox.net>
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
    Link: https://lore.kernel.org/bpf/160556570616.73229.17003722112077507863.stgit@john-XPS-13-9370
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 98f54326845b1d1df16c105ccf7aa6f06933de22
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Fri Oct 9 11:36:37 2020 -0700

    bpf, sockmap: On receive programs try to fast track SK_PASS ingress
    
    [ Upstream commit 9ecbfb06a078c4911fb444203e8e41d93d22f886 ]
    
    When we receive an skb and the ingress skb verdict program returns
    SK_PASS we currently set the ingress flag and put it on the workqueue
    so it can be turned into a sk_msg and put on the sk_msg ingress queue.
    Then finally telling userspace with data_ready hook.
    
    Here we observe that if the workqueue is empty then we can try to
    convert into a sk_msg type and call data_ready directly without
    bouncing through a workqueue. Its a common pattern to have a recv
    verdict program for visibility that always returns SK_PASS. In this
    case unless there is an ENOMEM error or we overrun the socket we
    can avoid the workqueue completely only using it when we fall back
    to error cases caused by memory pressure.
    
    By doing this we eliminate another case where data may be dropped
    if errors occur on memory limits in workqueue.
    
    Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/160226859704.5692.12929678876744977669.stgit@john-Precision-5820-Tower
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 029cf9bf04a6ad70e5da65e0280ab68a2fbc7711
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Fri Oct 9 11:36:16 2020 -0700

    bpf, sockmap: Skb verdict SK_PASS to self already checked rmem limits
    
    [ Upstream commit cfea28f890cf292d5fe90680db64b68086ef25ba ]
    
    For sk_skb case where skb_verdict program returns SK_PASS to continue to
    pass packet up the stack, the memory limits were already checked before
    enqueuing in skb_queue_tail from TCP side. So, lets remove the extra checks
    here. The theory is if the TCP stack believes we have memory to receive
    the packet then lets trust the stack and not double check the limits.
    
    In fact the accounting here can cause a drop if sk_rmem_alloc has increased
    after the stack accepted this packet, but before the duplicate check here.
    And worse if this happens because TCP stack already believes the data has
    been received there is no retransmit.
    
    Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/160226857664.5692.668205469388498375.stgit@john-Precision-5820-Tower
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 3df0786b823c6e2c5efa38110f7874a08c7b72c0
Author: Kees Cook <keescook@chromium.org>
Date:   Tue Nov 17 11:54:43 2020 -0800

    selftests/seccomp: sh: Fix register names
    
    [ Upstream commit 4c222f31fb1db4d590503a181a6268ced9252379 ]
    
    It looks like the seccomp selftests was never actually built for sh.
    This fixes it, though I don't have an environment to do a runtime test
    of it yet.
    
    Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER")
    Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Link: https://lore.kernel.org/lkml/a36d7b48-6598-1642-e403-0c77a86f416d@physik.fu-berlin.de
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a15ac9df36265d4a23475487e51de7bbc832865c
Author: Kees Cook <keescook@chromium.org>
Date:   Tue Nov 17 11:33:02 2020 -0800

    selftests/seccomp: powerpc: Fix typo in macro variable name
    
    [ Upstream commit f5098e34dd4c774c3040e417960f1637e5daade8 ]
    
    A typo sneaked into the powerpc selftest. Fix the name so it builds again.
    
    Fixes: 46138329faea ("selftests/seccomp: powerpc: Fix seccomp return value testing")
    Acked-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/lkml/87y2ix2895.fsf@mpe.ellerman.id.au
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 7de7f05b790d0594917c8e406b4ba170f093d7dc
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Thu Nov 19 15:17:50 2020 -0800

    xfs: revert "xfs: fix rmap key and record comparison functions"
    
    [ Upstream commit eb8409071a1d47e3593cfe077107ac46853182ab ]
    
    This reverts commit 6ff646b2ceb0eec916101877f38da0b73e3a5b7f.
    
    Your maintainer committed a major braino in the rmap code by adding the
    attr fork, bmbt, and unwritten extent usage bits into rmap record key
    comparisons.  While XFS uses the usage bits *in the rmap records* for
    cross-referencing metadata in xfs_scrub and xfs_repair, it only needs
    the owner and offset information to distinguish between reverse mappings
    of the same physical extent into the data fork of a file at multiple
    offsets.  The other bits are not important for key comparisons for index
    lookups, and never have been.
    
    Eric Sandeen reports that this causes regressions in generic/299, so
    undo this patch before it does more damage.
    
    Reported-by: Eric Sandeen <sandeen@sandeen.net>
    Fixes: 6ff646b2ceb0 ("xfs: fix rmap key and record comparison functions")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Eric Sandeen <sandeen@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4050eb86ef2510ba38cca4a1d742ca8d319b36dc
Author: Luo Meng <luomeng12@huawei.com>
Date:   Wed Nov 18 22:49:31 2020 +0900

    fail_function: Remove a redundant mutex unlock
    
    [ Upstream commit 2801a5da5b25b7af9dd2addd19b2315c02d17b64 ]
    
    Fix a mutex_unlock() issue where before copy_from_user() is
    not called mutex_locked.
    
    Fixes: 4b1a29a7f542 ("error-injection: Support fault injection framework")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Luo Meng <luomeng12@huawei.com>
    Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
    Link: https://lore.kernel.org/bpf/160570737118.263807.8358435412898356284.stgit@devnote2
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6a5a10103647f4b0a8fcc07f7c04b80b5a426e8e
Author: Daniel Xu <dxu@dxuuu.xyz>
Date:   Tue Nov 17 12:05:45 2020 -0800

    lib/strncpy_from_user.c: Mask out bytes after NUL terminator.
    
    [ Upstream commit 6fa6d28051e9fcaa1570e69648ea13a353a5d218 ]
    
    do_strncpy_from_user() may copy some extra bytes after the NUL
    terminator into the destination buffer. This usually does not matter for
    normal string operations. However, when BPF programs key BPF maps with
    strings, this matters a lot.
    
    A BPF program may read strings from user memory by calling the
    bpf_probe_read_user_str() helper which eventually calls
    do_strncpy_from_user(). The program can then key a map with the
    destination buffer. BPF map keys are fixed-width and string-agnostic,
    meaning that map keys are treated as a set of bytes.
    
    The issue is when do_strncpy_from_user() overcopies bytes after the NUL
    terminator, it can result in seemingly identical strings occupying
    multiple slots in a BPF map. This behavior is subtle and totally
    unexpected by the user.
    
    This commit masks out the bytes following the NUL while preserving
    long-sized stride in the fast path.
    
    Fixes: 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers")
    Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Link: https://lore.kernel.org/bpf/21efc982b3e9f2f7b0379eed642294caaa0c27a7.1605642949.git.dxu@dxuuu.xyz
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 94ef29cf39fc891c4d9f43e4372f003c4496c772
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Wed Nov 18 22:13:50 2020 +0100

    libbpf: Fix VERSIONED_SYM_COUNT number parsing
    
    [ Upstream commit 1fd6cee127e2ddff36d648573d7566aafb0d0b77 ]
    
    We remove "other info" from "readelf -s --wide" output when
    parsing GLOBAL_SYM_COUNT variable, which was added in [1].
    But we don't do that for VERSIONED_SYM_COUNT and it's failing
    the check_abi target on powerpc Fedora 33.
    
    The extra "other info" wasn't problem for VERSIONED_SYM_COUNT
    parsing until commit [2] added awk in the pipe, which assumes
    that the last column is symbol, but it can be "other info".
    
    Adding "other info" removal for VERSIONED_SYM_COUNT the same
    way as we did for GLOBAL_SYM_COUNT parsing.
    
    [1] aa915931ac3e ("libbpf: Fix readelf output parsing for Fedora")
    [2] 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check")
    
    Fixes: 746f534a4809 ("tools/libbpf: Avoid counting local symbols in ABI check")
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20201118211350.1493421-1-jolsa@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 21778b2d2fd7c0cb0de48c77f8a8ba16ed4e0600
Author: Nishanth Menon <nm@ti.com>
Date:   Wed Nov 18 08:50:09 2020 -0600

    regulator: ti-abb: Fix array out of bound read access on the first transition
    
    [ Upstream commit 2ba546ebe0ce2af47833d8912ced9b4a579f13cb ]
    
    At the start of driver initialization, we do not know what bias
    setting the bootloader has configured the system for and we only know
    for certain the very first time we do a transition.
    
    However, since the initial value of the comparison index is -EINVAL,
    this negative value results in an array out of bound access on the
    very first transition.
    
    Since we don't know what the setting is, we just set the bias
    configuration as there is nothing to compare against. This prevents
    the array out of bound access.
    
    NOTE: Even though we could use a more relaxed check of "< 0" the only
    valid values(ignoring cosmic ray induced bitflips) are -EINVAL, 0+.
    
    Fixes: 40b1936efebd ("regulator: Introduce TI Adaptive Body Bias(ABB) on-chip LDO driver")
    Link: https://lore.kernel.org/linux-mm/CA+G9fYuk4imvhyCN7D7T6PMDH6oNp6HDCRiTUKMQ6QXXjBa4ag@mail.gmail.com/
    Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
    Reviewed-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Nishanth Menon <nm@ti.com>
    Link: https://lore.kernel.org/r/20201118145009.10492-1-nm@ti.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5c94f38211d0313d4e53c309fcf19c3294031b55
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Wed Nov 11 12:54:34 2020 -0800

    ASOC: Intel: kbl_rt5663_rt5514_max98927: Do not try to disable disabled clock
    
    [ Upstream commit 879ee8b6f2bae0cc4a25536f8841db1dbc969523 ]
    
    In kabylake_set_bias_level(), enabling mclk may fail if the clock has
    already been enabled by the firmware. Attempts to disable that clock
    later will fail with a warning backtrace.
    
    mclk already disabled
    WARNING: CPU: 2 PID: 108 at drivers/clk/clk.c:952 clk_core_disable+0x1b6/0x1cf
    ...
    Call Trace:
     clk_disable+0x2d/0x3a
     kabylake_set_bias_level+0x72/0xfd [snd_soc_kbl_rt5663_rt5514_max98927]
     snd_soc_card_set_bias_level+0x2b/0x6f
     snd_soc_dapm_set_bias_level+0xe1/0x209
     dapm_pre_sequence_async+0x63/0x96
     async_run_entry_fn+0x3d/0xd1
     process_one_work+0x2a9/0x526
    ...
    
    Only disable the clock if it has been enabled.
    
    Fixes: 15747a802075 ("ASoC: eve: implement set_bias_level function for rt5514")
    Cc: Brent Lu <brent.lu@intel.com>
    Cc: Curtis Malainey <cujomalainey@chromium.org>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Link: https://lore.kernel.org/r/20201111205434.207610-1-linux@roeck-us.net
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 8ce94d13a55b882d15bf83d341cb122e8b99cc74
Author: Yu Kuai <yukuai3@huawei.com>
Date:   Wed Nov 18 09:21:26 2020 -0800

    xfs: return corresponding errcode if xfs_initialize_perag() fail
    
    [ Upstream commit 595189c25c28a55523354336bf24453242c81c15 ]
    
    In xfs_initialize_perag(), if kmem_zalloc(), xfs_buf_hash_init(), or
    radix_tree_preload() failed, the returned value 'error' is not set
    accordingly.
    
    Reported-as-fixing: 8b26c5825e02 ("xfs: handle ENOMEM correctly during initialisation of perag structures")
    Fixes: 9b2471797942 ("xfs: cache unlinked pointers in an rhashtable")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Yu Kuai <yukuai3@huawei.com>
    Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ad57916ca177d1a1db243fd70cabe7f9db92e39d
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Sat Nov 14 09:59:22 2020 -0800

    xfs: ensure inobt record walks always make forward progress
    
    [ Upstream commit 27c14b5daa82861220d6fa6e27b51f05f21ffaa7 ]
    
    The aim of the inode btree record iterator function is to call a
    callback on every record in the btree.  To avoid having to tear down and
    recreate the inode btree cursor around every callback, it caches a
    certain number of records in a memory buffer.  After each batch of
    callback invocations, we have to perform a btree lookup to find the
    next record after where we left off.
    
    However, if the keys of the inode btree are corrupt, the lookup might
    put us in the wrong part of the inode btree, causing the walk function
    to loop forever.  Therefore, we add extra cursor tracking to make sure
    that we never go backwards neither when performing the lookup nor when
    jumping to the next inobt record.  This also fixes an off by one error
    where upon resume the lookup should have been for the inode /after/ the
    point at which we stopped.
    
    Found by fuzzing xfs/460 with keys[2].startino = ones causing bulkstat
    and quotacheck to hang.
    
    Fixes: a211432c27ff ("xfs: create simplified inode walk function")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit dee9c6deb17867cd3fe0e9b71c4c8bfecd887d34
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Sun Nov 8 16:32:42 2020 -0800

    xfs: directory scrub should check the null bestfree entries too
    
    [ Upstream commit 6b48e5b8a20f653b7d64ccf99a498f2523bff752 ]
    
    Teach the directory scrubber to check all the bestfree entries,
    including the null ones.  We want to be able to detect the case where
    the entry is null but there actually /is/ a directory data block.
    
    Found by fuzzing lbests[0] = ones in xfs/391.
    
    Fixes: df481968f33b ("xfs: scrub directory freespace")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 93bdbf32ba5c22cfd55a5181c323b96e06e76f46
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Sun Nov 8 16:32:41 2020 -0800

    xfs: strengthen rmap record flags checking
    
    [ Upstream commit 498fe261f0d6d5189f8e11d283705dd97b474b54 ]
    
    We always know the correct state of the rmap record flags (attr, bmbt,
    unwritten) so check them by direct comparison.
    
    Fixes: d852657ccfc0 ("xfs: cross-reference reverse-mapping btree")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9a22ffc5e0bda40e45a0d6cbcd37c3030ea3aeb9
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Sun Nov 8 16:32:41 2020 -0800

    xfs: fix the minrecs logic when dealing with inode root child blocks
    
    [ Upstream commit e95b6c3ef1311dd7b20467d932a24b6d0fd88395 ]
    
    The comment and logic in xchk_btree_check_minrecs for dealing with
    inode-rooted btrees isn't quite correct.  While the direct children of
    the inode root are allowed to have fewer records than what would
    normally be allowed for a regular ondisk btree block, this is only true
    if there is only one child block and the number of records don't fit in
    the inode root.
    
    Fixes: 08a3a692ef58 ("xfs: btree scrub should check minrecs")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a0a05cd23fa89e7a022664f654549c60344b7a87
Author: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Date:   Tue Sep 15 16:47:15 2020 +0300

    can: m_can: process interrupt only when not runtime suspended
    
    [ Upstream commit a1f634463aaf2c94dfa13001dbdea011303124cc ]
    
    Avoid processing bogus interrupt statuses when the HW is runtime suspended and
    the M_CAN_IR register read may get all bits 1's. Handler can be called if the
    interrupt request is shared with other peripherals or at the end of free_irq().
    
    Therefore check the runtime suspended status before processing.
    
    Fixes: cdf8259d6573 ("can: m_can: Add PM Support")
    Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
    Link: https://lore.kernel.org/r/20200915134715.696303-1-jarkko.nikula@linux.intel.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ce9824af47d5159322f6563bfdcd82b0a777f92a
Author: Marc Kleine-Budde <mkl@pengutronix.de>
Date:   Wed Nov 18 16:01:48 2020 +0100

    can: flexcan: flexcan_chip_start(): fix erroneous flexcan_transceiver_enable() during bus-off recovery
    
    [ Upstream commit cd9f13c59461351d7a5fd07924264fb49b287359 ]
    
    If the CAN controller goes into bus off, the do_set_mode() callback with
    CAN_MODE_START can be used to recover the controller, which then calls
    flexcan_chip_start(). If configured, this is done automatically by the
    framework or manually by the user.
    
    In flexcan_chip_start() there is an explicit call to
    flexcan_transceiver_enable(), which does a regulator_enable() on the
    transceiver regulator. This results in a net usage counter increase, as there
    is no corresponding flexcan_transceiver_disable() in the bus off code path.
    This further leads to the transceiver stuck enabled, even if the CAN interface
    is shut down.
    
    To fix this problem the
    flexcan_transceiver_enable()/flexcan_transceiver_disable() are moved out of
    flexcan_chip_start()/flexcan_chip_stop() into flexcan_open()/flexcan_close().
    
    Fixes: e955cead0311 ("CAN: Add Flexcan CAN controller driver")
    Link: https://lore.kernel.org/r/20201118150148.2664024-1-mkl@pengutronix.de
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 3330e9f177a6278d7328b01ac5676396851891a5
Author: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Date:   Tue Nov 10 15:19:08 2020 +0800

    iommu/vt-d: Avoid panic if iommu init fails in tboot system
    
    [ Upstream commit 4d213e76a359e540ca786ee937da7f35faa8e5f8 ]
    
    "intel_iommu=off" command line is used to disable iommu but iommu is force
    enabled in a tboot system for security reason.
    
    However for better performance on high speed network device, a new option
    "intel_iommu=tboot_noforce" is introduced to disable the force on.
    
    By default kernel should panic if iommu init fail in tboot for security
    reason, but it's unnecessory if we use "intel_iommu=tboot_noforce,off".
    
    Fix the code setting force_on and move intel_iommu_tboot_noforce
    from tboot code to intel iommu code.
    
    Fixes: 7304e8f28bb2 ("iommu/vt-d: Correctly disable Intel IOMMU force on")
    Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
    Tested-by: Lukasz Hawrylko <lukasz.hawrylko@linux.intel.com>
    Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
    Link: https://lore.kernel.org/r/20201110071908.3133-1-zhenzhong.duan@gmail.com
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5528e3d431bdee64edaafc6df8266f4f3c0975ce
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Fri Aug 28 19:12:11 2020 +0300

    iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
    
    [ Upstream commit c7eb900f5f45eeab1ea1bed997a2a12d8b5907bc ]
    
    Static analyzer is not happy about intel_iommu_gfx_mapped declaration:
    
    .../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
    
    Move its declaration to Intel IOMMU header file.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
    Link: https://lore.kernel.org/r/20200828161212.71294-1-andriy.shevchenko@linux.intel.com
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit fbb6dcf40ea617a12956d48f097ed5305e97d93c
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Nov 13 13:16:31 2020 +0300

    dmaengine: fix error codes in channel_register()
    
    [ Upstream commit 7e4be1290a38b3dd4a77cdf4565c9ffe7e620013 ]
    
    The error codes were not set on some of these error paths.
    
    Also the error handling was more confusing than it needed to be so I
    cleaned it up and shuffled it around a bit.
    
    Fixes: d2fb0a043838 ("dmaengine: break out channel registration")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Link: https://lore.kernel.org/r/20201113101631.GE168908@mwanda
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 99e089632b3a9ee293588ead5050bfa27dc60dbb
Author: Jimmy Assarsson <extja@kvaser.com>
Date:   Sun Nov 15 17:30:23 2020 +0100

    can: kvaser_usb: kvaser_usb_hydra: Fix KCAN bittiming limits
    
    [ Upstream commit d003868d7f8579838ed58b6429af91844039b6f8 ]
    
    Use correct bittiming limits for the KCAN CAN controller.
    
    Fixes: aec5fb2268b7 ("can: kvaser_usb: Add support for Kvaser USB hydra family")
    Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
    Link: https://lore.kernel.org/r/20201115163027.16851-2-jimmyassarsson@gmail.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4cf15e9b996141a50d57eed7c69483948d7f9058
Author: Jimmy Assarsson <extja@kvaser.com>
Date:   Sun Nov 15 17:30:22 2020 +0100

    can: kvaser_pciefd: Fix KCAN bittiming limits
    
    [ Upstream commit 470e14c00c63752466ac44de392f584dfdddd82e ]
    
    Use correct bittiming limits for the KCAN CAN controller.
    
    Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices")
    Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
    Link: https://lore.kernel.org/r/20201115163027.16851-1-jimmyassarsson@gmail.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b7372ebc805f4cbf83aac47f822353e8b662e11e
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Mon Nov 16 14:28:06 2020 -0800

    bpf, sockmap: Ensure SO_RCVBUF memory is observed on ingress redirect
    
    [ Upstream commit 36cd0e696a832a00247fca522034703566ac8885 ]
    
    Fix sockmap sk_skb programs so that they observe sk_rcvbuf limits. This
    allows users to tune SO_RCVBUF and sockmap will honor them.
    
    We can refactor the if(charge) case out in later patches. But, keep this
    fix to the point.
    
    Fixes: 51199405f9672 ("bpf: skb_verdict, support SK_PASS on RX BPF path")
    Suggested-by: Jakub Sitnicki <jakub@cloudflare.com>
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
    Link: https://lore.kernel.org/bpf/160556568657.73229.8404601585878439060.stgit@john-XPS-13-9370
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit d7403309e38c79dca6fa3df30a0a14d43fa2fa0b
Author: John Fastabend <john.fastabend@gmail.com>
Date:   Mon Nov 16 14:27:46 2020 -0800

    bpf, sockmap: Fix partial copy_page_to_iter so progress can still be made
    
    [ Upstream commit c9c89dcd872ea33327673fcb97398993a1f22736 ]
    
    If copy_page_to_iter() fails or even partially completes, but with fewer
    bytes copied than expected we currently reset sg.start and return EFAULT.
    This proves problematic if we already copied data into the user buffer
    before we return an error. Because we leave the copied data in the user
    buffer and fail to unwind the scatterlist so kernel side believes data
    has been copied and user side believes data has _not_ been received.
    
    Expected behavior should be to return number of bytes copied and then
    on the next read we need to return the error assuming its still there. This
    can happen if we have a copy length spanning multiple scatterlist elements
    and one or more complete before the error is hit.
    
    The error is rare enough though that my normal testing with server side
    programs, such as nginx, httpd, envoy, etc., I have never seen this. The
    only reliable way to reproduce that I've found is to stream movies over
    my browser for a day or so and wait for it to hang. Not very scientific,
    but with a few extra WARN_ON()s in the code the bug was obvious.
    
    When we review the errors from copy_page_to_iter() it seems we are hitting
    a page fault from copy_page_to_iter_iovec() where the code checks
    fault_in_pages_writeable(buf, copy) where buf is the user buffer. It
    also seems typical server applications don't hit this case.
    
    The other way to try and reproduce this is run the sockmap selftest tool
    test_sockmap with data verification enabled, but it doesn't reproduce the
    fault. Perhaps we can trigger this case artificially somehow from the
    test tools. I haven't sorted out a way to do that yet though.
    
    Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
    Signed-off-by: John Fastabend <john.fastabend@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
    Link: https://lore.kernel.org/bpf/160556566659.73229.15694973114605301063.stgit@john-XPS-13-9370
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9801ebfb9e3746df93d7d77c603cdc18113e9424
Author: Eli Cohen <elic@nvidia.com>
Date:   Mon Nov 9 11:35:52 2020 +0200

    net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled
    
    [ Upstream commit 5b8631c7b21ca8bc039f0bc030048973b039e0d2 ]
    
    Avoid calling mlx5_esw_modify_vport_rate() if qos is not enabled and
    avoid unnecessary syndrome messages from firmware.
    
    Fixes: fcb64c0f5640 ("net/mlx5: E-Switch, add ingress rate support")
    Signed-off-by: Eli Cohen <elic@nvidia.com>
    Reviewed-by: Roi Dayan <roid@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5b63b75893cfdd106759aab4647a6fc4a9cebc95
Author: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Date:   Mon Nov 16 09:09:29 2020 +0800

    drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
    
    [ Upstream commit 6654b57866b98230a270953dd34f67de17ab1708 ]
    
    Fix to return a negative error code from the error handling case instead
    of 0 in function sun8i_dw_hdmi_bind().
    
    Fixes: b7c7436a5ff0 ("drm/sun4i: Implement A83T HDMI driver")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
    Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://patchwork.freedesktop.org/patch/msgid/1605488969-5211-1-git-send-email-wangxiongfeng2@huawei.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b9aee4236c3e2103da0cf7bbc86def12b746b8e6
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Fri Nov 13 21:18:56 2020 +0800

    MIPS: Alchemy: Fix memleak in alchemy_clk_setup_cpu
    
    [ Upstream commit ac3b57adf87ad9bac7e33ca26bbbb13fae1ed62b ]
    
    If the clk_register fails, we should free h before
    function returns to prevent memleak.
    
    Fixes: 474402291a0ad ("MIPS: Alchemy: clock framework integration of onchip clocks")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c3b0c0c2746fb10323541b0dbde2971050c40d3c
Author: Wang Hai <wanghai38@huawei.com>
Date:   Mon Nov 16 18:16:33 2020 +0800

    selftests/bpf: Fix error return code in run_getsockopt_test()
    
    [ Upstream commit 2acc3c1bc8e98bc66b1badec42e9ea205b4fcdaa ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 65b4414a05eb ("selftests/bpf: add sockopt test that exercises BPF_F_ALLOW_MULTI")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wang Hai <wanghai38@huawei.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20201116101633.64627-1-wanghai38@huawei.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c7582bbc9e78b74e28a87780546e9910c263da77
Author: Zhihao Cheng <chengzhihao1@huawei.com>
Date:   Mon Nov 16 22:18:36 2020 +0800

    spi: cadence-quadspi: Fix error return code in cqspi_probe
    
    [ Upstream commit ac9978fcad3c5abc43cdd225441ce9459c36e16b ]
    
    Fix to return the error code from
    devm_reset_control_get_optional_exclusive() instaed of 0
    in cqspi_probe().
    
    Fixes: 31fb632b5d43ca ("spi: Move cadence-quadspi driver to drivers/spi/")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
    Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
    Link: https://lore.kernel.org/r/20201116141836.2970579-1-chengzhihao1@huawei.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 39ba3e67d898b3255303f2e832dfd275b5237b39
Author: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Date:   Sun Nov 15 10:26:50 2020 +0530

    ASoC: qcom: lpass-platform: Fix memory leak
    
    [ Upstream commit bd6327fda2f3ded85b69b3c3125c99aaa51c7881 ]
    
    lpass_pcm_data is not freed in error paths. Free it in
    error paths to avoid memory leak.
    
    Fixes: 022d00ee0b55 ("ASoC: lpass-platform: Fix broken pcm data usage")
    Signed-off-by: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: V Sujith Kumar Reddy <vsujithk@codeaurora.org>
    Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
    Link: https://lore.kernel.org/r/1605416210-14530-1-git-send-email-srivasam@codeaurora.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit f7d1600e0d05f858174ba589ac6367b60e6571f4
Author: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
Date:   Mon Nov 16 14:19:01 2020 +0800

    ASoC: Intel: KMB: Fix S24_LE configuration
    
    [ Upstream commit 1bd7b0fc0165694897b7d2fb39751a07b98f6bf1 ]
    
    S24_LE is 24 bit audio in 32 bit container configuration
    Fixing the configuration to match the data arrangement of
    this audio format.
    
    Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver")
    
    Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
    Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Link: https://lore.kernel.org/r/20201116061905.32431-2-michael.wei.hong.sit@intel.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b611480ad8c62460aa2232ebca74cc99a4aa0da7
Author: Dave Jiang <dave.jiang@intel.com>
Date:   Wed Nov 11 15:23:46 2020 -0700

    dmaengine: idxd: fix mapping of portal size
    
    [ Upstream commit 8326be9f1c0bb498baf134878a8deb8a952e0135 ]
    
    Portal size is 4k. Current code is mapping all 4 portals in a single chunk.
    Restrict the mapped portal size to a single portal to ensure that submission
    only goes to the intended portal address.
    
    Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
    Signed-off-by: Dave Jiang <dave.jiang@intel.com>
    Link: https://lore.kernel.org/r/160513342642.510187.16450549281618747065.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 7db7f6c19710669e7ddea558c415c6f8dfe6dfa0
Author: Faiz Abbas <faiz_abbas@ti.com>
Date:   Tue Aug 25 11:24:42 2020 +0530

    can: m_can: m_can_stop(): set device to software init mode before closing
    
    [ Upstream commit a584e9bc1b7e88f24f8504886eafbe6c73d8a97c ]
    
    There might be some requests pending in the buffer when the interface close
    sequence occurs. In some devices, these pending requests might lead to the
    module not shutting down properly when m_can_clk_stop() is called.
    
    Therefore, move the device to init state before potentially powering it down.
    
    Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
    Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
    Acked-by: Dan Murphy <dmurphy@ti.com>
    Link: https://lore.kernel.org/r/20200825055442.16994-1-faiz_abbas@ti.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ca9929a3225941d4b4abfeae973d0a37489e9aad
Author: Dan Murphy <dmurphy@ti.com>
Date:   Thu Feb 27 12:38:29 2020 -0600

    can: m_can: Fix freeing of can device from peripherials
    
    [ Upstream commit 85816aba460ceebed0047381395615891df68c8f ]
    
    Fix leaking netdev device from peripherial devices. The call to allocate the
    netdev device is made from and managed by the peripherial.
    
    Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework")
    Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Dan Murphy <dmurphy@ti.com>
    Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 55cb829c23490cba64a669cff38731a047397469
Author: Dan Murphy <dmurphy@ti.com>
Date:   Thu Feb 27 12:38:29 2020 -0600

    can: m_can: m_can_class_free_dev(): introduce new function
    
    [ Upstream commit a8c22f5b0c689a29f45ef4a110d09fd391debcbc ]
    
    This patch creates a common function that peripherials can call to free the
    netdev device when failures occur.
    
    Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework")
    Reported-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Dan Murphy <dmurphy@ti.com>
    Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 851e8eebbacd6a0fe5c0181b60a702a904173880
Author: Wu Bo <wubo.oduw@gmail.com>
Date:   Wed Jan 29 10:23:30 2020 +0800

    can: m_can: m_can_handle_state_change(): fix state change
    
    [ Upstream commit cd0d83eab2e0c26fe87a10debfedbb23901853c1 ]
    
    m_can_handle_state_change() is called with the new_state as an argument.
    
    In the switch statements for CAN_STATE_ERROR_ACTIVE, the comment and the
    following code indicate that a CAN_STATE_ERROR_WARNING is handled.
    
    This patch fixes this problem by changing the case to CAN_STATE_ERROR_WARNING.
    
    Signed-off-by: Wu Bo <wubo.oduw@gmail.com>
    Link: http://lore.kernel.org/r/20200129022330.21248-2-wubo.oduw@gmail.com
    Cc: Dan Murphy <dmurphy@ti.com>
    Fixes: e0d1f4816f2a ("can: m_can: add Bosch M_CAN controller support")
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 09f81e47ef2bbe2e16a7579bc6d9da02a604c7b6
Author: Marc Kleine-Budde <mkl@pengutronix.de>
Date:   Mon Aug 10 22:23:49 2020 +0200

    can: tcan4x5x: tcan4x5x_can_remove(): fix order of deregistration
    
    [ Upstream commit c81d0b6ca665477c761f227807010762630b089f ]
    
    Change the order in tcan4x5x_can_remove() to be the exact inverse of
    tcan4x5x_can_probe(). First m_can_class_unregister(), then power down the
    device.
    
    Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
    Cc: Dan Murphy <dmurphy@ti.com>
    Link: http://lore.kernel.org/r/20201019154233.1262589-10-mkl@pengutronix.de
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 87cd4f42fc9688de6fe6cf49b0bbda6dea4fa2d5
Author: Marc Kleine-Budde <mkl@pengutronix.de>
Date:   Fri Jan 3 11:30:34 2020 +0100

    can: tcan4x5x: tcan4x5x_can_probe(): add missing error checking for devm_regmap_init()
    
    [ Upstream commit 1ff203badbbf1738027c8395d5b40b0d462b6e4d ]
    
    This patch adds the missing error checking when initializing the regmap
    interface fails.
    
    Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
    Cc: Dan Murphy <dmurphy@ti.com>
    Link: http://lore.kernel.org/r/20201019154233.1262589-7-mkl@pengutronix.de
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit bd500c1fc480720963325fd5adddab40be079994
Author: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Date:   Mon Apr 13 16:10:13 2020 +0200

    can: tcan4x5x: replace depends on REGMAP_SPI with depends on SPI
    
    [ Upstream commit 3fcce133f0d9a50d3a23f8e2bc950197b4e03900 ]
    
    regmap is a library function that gets selected by drivers that need it. No
    driver modules should depend on it. Instead depends on SPI and select
    REGMAP_SPI. Depending on REGMAP_SPI makes this driver only build if another
    driver already selected REGMAP_SPI, as the symbol can't be selected through the
    menu kernel configuration.
    
    Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
    Link: http://lore.kernel.org/r/20200413141013.506613-1-enric.balletbo@collabora.com
    Reviewed-by: Dan Murphy <dmurphy@ti.com>
    Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 46b6cf1ebf21b2b731bfa1803e8dff0b5d78cd9a
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Sun Nov 8 16:30:00 2020 +0800

    can: flexcan: fix failure handling of pm_runtime_get_sync()
    
    [ Upstream commit b7ee5bc3e1006433601a058a6a7c24c5272635f4 ]
    
    pm_runtime_get_sync() will increment pm usage at first and it will resume the
    device later. If runtime of the device has error or device is in inaccessible
    state(or other error state), resume operation will fail. If we do not call put
    operation to decrease the reference, it will result in reference leak in the
    two functions flexcan_get_berr_counter() and flexcan_open().
    
    Moreover, this device cannot enter the idle state and always stay busy or other
    non-idle state later. So we should fix it through adding
    pm_runtime_put_noidle().
    
    Fixes: ca10989632d88 ("can: flexcan: implement can Runtime PM")
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Link: https://lore.kernel.org/r/20201108083000.2599705-1-zhangqilong3@huawei.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 2dce84cc58d4e8eebc2a5dc6c0beebad2068c302
Author: Colin Ian King <colin.king@canonical.com>
Date:   Thu Nov 5 11:24:27 2020 +0000

    can: peak_usb: fix potential integer overflow on shift of a int
    
    [ Upstream commit 8a68cc0d690c9e5730d676b764c6f059343b842c ]
    
    The left shift of int 32 bit integer constant 1 is evaluated using 32 bit
    arithmetic and then assigned to a signed 64 bit variable. In the case where
    time_ref->adapter->ts_used_bits is 32 or more this can lead to an oveflow.
    Avoid this by shifting using the BIT_ULL macro instead.
    
    Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Link: https://lore.kernel.org/r/20201105112427.40688-1-colin.king@canonical.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 28b801f283c0a8d1fbe4d3fbee6fe5ab56e977a2
Author: Marc Kleine-Budde <mkl@pengutronix.de>
Date:   Wed Aug 28 21:16:55 2019 +0200

    can: mcba_usb: mcba_usb_start_xmit(): first fill skb, then pass to can_put_echo_skb()
    
    [ Upstream commit 81c9c8e0adef3285336b942f93287c554c89e6c6 ]
    
    The driver has to first fill the skb with data and then handle it to
    can_put_echo_skb(). This patch moves the can_put_echo_skb() down, right before
    sending the skb out via USB.
    
    Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer")
    Cc: Remigiusz Kołłątaj <remigiusz.kollataj@mobica.com>
    Link: https://lore.kernel.org/r/20201111221204.1639007-1-mkl@pengutronix.de
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9e38c980c452ed2abfc36f748927d267b4bb635a
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Sat Nov 14 19:17:08 2020 +0800

    can: ti_hecc: Fix memleak in ti_hecc_probe
    
    [ Upstream commit 7968c7c79d3be8987feb8021f0c46e6866831408 ]
    
    In the error handling, we should goto the probe_exit_candev
    to free ndev to prevent memory leak.
    
    Fixes: dabf54dd1c63 ("can: ti_hecc: Convert TI HECC driver to DT only driver")
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Link: https://lore.kernel.org/r/20201114111708.3465543-1-zhangqilong3@huawei.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 225902e6a17945e5cc43b5abd60933032358c54c
Author: Alejandro Concepcion Rodriguez <alejandro@acoro.eu>
Date:   Thu Nov 5 21:51:47 2020 +0000

    can: dev: can_restart(): post buffer from the right context
    
    [ Upstream commit a1e654070a60d5d4f7cce59c38f4ca790bb79121 ]
    
    netif_rx() is meant to be called from interrupt contexts. can_restart() may be
    called by can_restart_work(), which is called from a worqueue, so it may run in
    process context. Use netif_rx_ni() instead.
    
    Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface")
    Co-developed-by: Loris Fauster <loris.fauster@ttcontrol.com>
    Signed-off-by: Loris Fauster <loris.fauster@ttcontrol.com>
    Signed-off-by: Alejandro Concepcion Rodriguez <alejandro@acoro.eu>
    Link: https://lore.kernel.org/r/4e84162b-fb31-3a73-fa9a-9438b4bd5234@acoro.eu
    [mkl: use netif_rx_ni() instead of netif_rx_any_context()]
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 49cd032a791ee32219d9ceb6ba40fc9757d5d6c3
Author: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Date:   Wed Nov 4 03:09:06 2020 +0530

    can: af_can: prevent potential access of uninitialized member in canfd_rcv()
    
    [ Upstream commit 9aa9379d8f868e91719333a7f063ccccc0579acc ]
    
    In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this
    uninitialized cfd->len is accessed nonetheless by pr_warn_once().
    
    Fix this uninitialized variable access by checking cfd->len's validity
    condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's
    condition is checked, and appropriately modify the log messages that
    are generated as well.
    In case either of the required conditions fail, the skb is freed and
    NET_RX_DROP is returned, same as before.
    
    Fixes: d4689846881d ("can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once")
    Reported-by: syzbot+9bcb0c9409066696d3aa@syzkaller.appspotmail.com
    Tested-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
    Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
    Link: https://lore.kernel.org/r/20201103213906.24219-3-anant.thazhemadam@gmail.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6a67da90f67e3a5b255a11d073776218b682979c
Author: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Date:   Wed Nov 4 03:09:05 2020 +0530

    can: af_can: prevent potential access of uninitialized member in can_rcv()
    
    [ Upstream commit c8c958a58fc67f353289986850a0edf553435702 ]
    
    In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this
    uninitialized cfd->len is accessed nonetheless by pr_warn_once().
    
    Fix this uninitialized variable access by checking cfd->len's validity
    condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's
    condition is checked, and appropriately modify the log messages that
    are generated as well.
    In case either of the required conditions fail, the skb is freed and
    NET_RX_DROP is returned, same as before.
    
    Fixes: 8cb68751c115 ("can: af_can: can_rcv(): replace WARN_ONCE by pr_warn_once")
    Reported-by: syzbot+9bcb0c9409066696d3aa@syzkaller.appspotmail.com
    Tested-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
    Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
    Link: https://lore.kernel.org/r/20201103213906.24219-2-anant.thazhemadam@gmail.com
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4ddfa76292ff2a982a5df3e826577dadb477bd65
Author: Yi-Hung Wei <yihung.wei@gmail.com>
Date:   Tue Nov 10 16:16:40 2020 -0800

    ip_tunnels: Set tunnel option flag when tunnel metadata is present
    
    [ Upstream commit 9c2e14b48119b39446031d29d994044ae958d8fc ]
    
    Currently, we may set the tunnel option flag when the size of metadata
    is zero.  For example, we set TUNNEL_GENEVE_OPT in the receive function
    no matter the geneve option is present or not.  As this may result in
    issues on the tunnel flags consumers, this patch fixes the issue.
    
    Related discussion:
    * https://lore.kernel.org/netdev/1604448694-19351-1-git-send-email-yihung.wei@gmail.com/T/#u
    
    Fixes: 256c87c17c53 ("net: check tunnel option type in tunnel flags")
    Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
    Link: https://lore.kernel.org/r/1605053800-74072-1-git-send-email-yihung.wei@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ec6ea95aed5abd1a60ffd8a3eab775ca4603c0cb
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Fri Nov 13 14:42:27 2020 +0800

    IB/hfi1: Fix error return code in hfi1_init_dd()
    
    [ Upstream commit dabbd6abcdbeb1358a53ec28a244429320eb0e3a ]
    
    Fix to return a negative error code from the error handling case instead
    of 0, as done elsewhere in this function.
    
    Fixes: 4730f4a6c6b2 ("IB/hfi1: Activate the dummy netdev")
    Link: https://lore.kernel.org/r/1605249747-17942-1-git-send-email-zhangchangzhong@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Acked-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 089a92df878c89f84e5ccc79a12bc6e62bab0046
Author: Wang Hai <wanghai38@huawei.com>
Date:   Fri Nov 13 19:51:52 2020 +0800

    tools, bpftool: Add missing close before bpftool net attach exit
    
    [ Upstream commit 50431b45685b600fc2851a3f2b53e24643efe6d3 ]
    
    progfd is created by prog_parse_fd() in do_attach() and before the latter
    returns in case of success, the file descriptor should be closed.
    
    Fixes: 04949ccc273e ("tools: bpftool: add net attach command to attach XDP on interface")
    Signed-off-by: Wang Hai <wanghai38@huawei.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/20201113115152.53178-1-wanghai38@huawei.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 012e9e7dd2f3d69793fd4e61e663cf010f4507c8
Author: Jonathan Liu <net147@gmail.com>
Date:   Sat Oct 31 19:17:47 2020 +1100

    drm: bridge: dw-hdmi: Avoid resetting force in the detect function
    
    [ Upstream commit bc551d776b691022f49b5bb5379bd58f7c4eb76a ]
    
    It has been observed that resetting force in the detect function can
    result in the PHY being powered down in response to hot-plug detect
    being asserted, even when the HDMI connector is forced on.
    
    Enabling debug messages and adding a call to dump_stack() in
    dw_hdmi_phy_power_off() shows the following in dmesg:
    [  160.637413] dwhdmi-rockchip ff940000.hdmi: EVENT=plugin
    [  160.637433] dwhdmi-rockchip ff940000.hdmi: PHY powered down in 0 iterations
    
    Call trace:
    dw_hdmi_phy_power_off
    dw_hdmi_phy_disable
    dw_hdmi_update_power
    dw_hdmi_detect
    dw_hdmi_connector_detect
    drm_helper_probe_detect_ctx
    drm_helper_hpd_irq_event
    dw_hdmi_irq
    irq_thread_fn
    irq_thread
    kthread
    ret_from_fork
    
    Fixes: 381f05a7a842 ("drm: bridge/dw_hdmi: add connector mode forcing")
    Signed-off-by: Jonathan Liu <net147@gmail.com>
    Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20201031081747.372599-1-net147@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ac5a3a2bbd96595382fdc758e9d8265b724478ce
Author: Scott Mayhew <smayhew@redhat.com>
Date:   Thu Nov 12 15:17:32 2020 -0500

    SUNRPC: Fix oops in the rpc_xdr_buf event class
    
    [ Upstream commit c3213d260a23e263ef85ba21ac68c9e7578020b5 ]
    
    Backchannel rpc tasks don't have task->tk_client set, so it's necessary
    to check it for NULL before dereferencing.
    
    Fixes: c509f15a5801 ("SUNRPC: Split the xdr_buf event class")
    Signed-off-by: Scott Mayhew <smayhew@redhat.com>
    Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9958a78d7f1ba7df89e7b36b188e8762709ae0c7
Author: Leo Yan <leo.yan@linaro.org>
Date:   Wed Nov 4 17:42:29 2020 +0800

    perf lock: Don't free "lock_seq_stat" if read_count isn't zero
    
    [ Upstream commit b0e5a05cc9e37763c7f19366d94b1a6160c755bc ]
    
    When execute command "perf lock report", it hits failure and outputs log
    as follows:
    
      perf: builtin-lock.c:623: report_lock_release_event: Assertion `!(seq->read_count < 0)' failed.
      Aborted
    
    This is an imbalance issue.  The locking sequence structure
    "lock_seq_stat" contains the reader counter and it is used to check if
    the locking sequence is balance or not between acquiring and releasing.
    
    If the tool wrongly frees "lock_seq_stat" when "read_count" isn't zero,
    the "read_count" will be reset to zero when allocate a new structure at
    the next time; thus it causes the wrong counting for reader and finally
    results in imbalance issue.
    
    To fix this issue, if detects "read_count" is not zero (means still have
    read user in the locking sequence), goto the "end" tag to skip freeing
    structure "lock_seq_stat".
    
    Fixes: e4cef1f65061 ("perf lock: Fix state machine to recognize lock sequence")
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Link: https://lore.kernel.org/r/20201104094229.17509-2-leo.yan@linaro.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 160ed936cc48e2324fb8ed89a6395edd690de6bb
Author: Leo Yan <leo.yan@linaro.org>
Date:   Wed Nov 4 17:42:28 2020 +0800

    perf lock: Correct field name "flags"
    
    [ Upstream commit e24a87b54ef3e39261f1d859b7f78416349dfb14 ]
    
    The tracepoint "lock:lock_acquire" contains field "flags" but not
    "flag".  Current code wrongly retrieves value from field "flag" and it
    always gets zero for the value, thus "perf lock" doesn't report the
    correct result.
    
    This patch replaces the field name "flag" with "flags", so can read out
    the correct flags for locking.
    
    Fixes: e4cef1f65061 ("perf lock: Fix state machine to recognize lock sequence")
    Signed-off-by: Leo Yan <leo.yan@linaro.org>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Link: https://lore.kernel.org/r/20201104094229.17509-1-leo.yan@linaro.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit d499fabd16f91f090c26e79a35663394833beff3
Author: Christoph Hellwig <hch@lst.de>
Date:   Fri Nov 6 19:19:32 2020 +0100

    RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs
    
    [ Upstream commit b1e678bf290db5a76f1b6a9f7c381310e03440d6 ]
    
    dma_virt_ops requires that all pages have a kernel virtual address.
    Introduce a INFINIBAND_VIRT_DMA Kconfig symbol that depends on !HIGHMEM
    and make all three drivers depend on the new symbol.
    
    Also remove the ARCH_DMA_ADDR_T_64BIT dependency, which has been obsolete
    since commit 4965a68780c5 ("arch: define the ARCH_DMA_ADDR_T_64BIT config
    symbol in lib/Kconfig")
    
    Fixes: 551199aca1c3 ("lib/dma-virt: Add dma_virt_ops")
    Link: https://lore.kernel.org/r/20201106181941.1878556-2-hch@lst.de
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 32357644083d94fc69d8125071b25dbf9c642f11
Author: Qinglang Miao <miaoqinglang@huawei.com>
Date:   Wed Nov 11 11:22:02 2020 +0800

    RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device()
    
    [ Upstream commit d035c3f6cdb8e5d5a17adcbb79d7453417a6077d ]
    
    Fix missing kfree in pvrdma_register_device() when failure from
    ib_device_set_netdev().
    
    Fixes: 4b38da75e089 ("RDMA/drivers: Convert easy drivers to use ib_device_set_netdev()")
    Link: https://lore.kernel.org/r/20201111032202.17925-1-miaoqinglang@huawei.com
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit bffab1da53fb59cc93af1be14e50a187061520db
Author: Claire Chang <tientzu@chromium.org>
Date:   Tue Nov 10 16:49:08 2020 +0800

    rfkill: Fix use-after-free in rfkill_resume()
    
    [ Upstream commit 94e2bd0b259ed39a755fdded47e6734acf1ce464 ]
    
    If a device is getting removed or reprobed during resume, use-after-free
    might happen. For example, h5_btrtl_resume() schedules a work queue for
    device reprobing, which of course requires removal first.
    
    If the removal happens in parallel with the device_resume() and wins the
    race to acquire device_lock(), removal may remove the device from the PM
    lists and all, but device_resume() is already running and will continue
    when the lock can be acquired, thus calling rfkill_resume().
    
    During this, if rfkill_set_block() is then called after the corresponding
    *_unregister() and kfree() are called, there will be an use-after-free
    in hci_rfkill_set_block():
    
    BUG: KASAN: use-after-free in hci_rfkill_set_block+0x58/0xc0 [bluetooth]
    ...
    Call trace:
      dump_backtrace+0x0/0x154
      show_stack+0x20/0x2c
      dump_stack+0xbc/0x12c
      print_address_description+0x88/0x4b0
      __kasan_report+0x144/0x168
      kasan_report+0x10/0x18
      check_memory_region+0x19c/0x1ac
      __kasan_check_write+0x18/0x24
      hci_rfkill_set_block+0x58/0xc0 [bluetooth]
      rfkill_set_block+0x9c/0x120
      rfkill_resume+0x34/0x70
      dpm_run_callback+0xf0/0x1f4
      device_resume+0x210/0x22c
    
    Fix this by checking rfkill->registered in rfkill_resume(). device_del()
    in rfkill_unregister() requires device_lock() and the whole rfkill_resume()
    is also protected by the same lock via device_resume(), we can make sure
    either the rfkill->registered is false before rfkill_resume() starts or the
    rfkill device won't be unregistered before rfkill_resume() returns.
    
    As async_resume() holds a reference to the device, at this level there can
    be no use-after-free; only in the user that doesn't expect this scenario.
    
    Fixes: 8589086f4efd ("Bluetooth: hci_h5: Turn off RTL8723BS on suspend, reprobe on resume")
    Signed-off-by: Claire Chang <tientzu@chromium.org>
    Link: https://lore.kernel.org/r/20201110084908.219088-1-tientzu@chromium.org
    [edit commit message for clarity and add more info provided later]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 568fe95300601fa9a682bd60dae85b1a4534470a
Author: jingle.wu <jingle.wu@emc.com.tw>
Date:   Wed Nov 11 20:06:24 2020 -0800

    Input: elan_i2c - fix firmware update on newer ICs
    
    [ Upstream commit ae3d6083acf60116d4f409677452399547ed2009 ]
    
    The argument to iap page type command depends on the firmware page size.
    
    Fixes: bfd9b92bc8f9 ("Input: elan_i2c - handle firmware updated on newer ICs")
    Signed-off-by: Jingle Wu <jingle.wu@emc.com.tw>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ef96d50bb4ed8c604040dfe610447dff100bfbfd
Author: Necip Fazil Yildiran <fazilyildiran@gmail.com>
Date:   Wed Nov 11 17:48:52 2020 -0800

    Input: resistive-adc-touch - fix kconfig dependency on IIO_BUFFER
    
    [ Upstream commit 676650d007e06fddcf3fe38238251d71bd179641 ]
    
    When TOUCHSCREEN_ADC is enabled and IIO_BUFFER is disabled, it results
    in the following Kbuild warning:
    
    WARNING: unmet direct dependencies detected for IIO_BUFFER_CB
      Depends on [n]: IIO [=y] && IIO_BUFFER [=n]
      Selected by [y]:
      - TOUCHSCREEN_ADC [=y] && !UML && INPUT [=y] && INPUT_TOUCHSCREEN [=y] && IIO [=y]
    
    The reason is that TOUCHSCREEN_ADC selects IIO_BUFFER_CB without depending
    on or selecting IIO_BUFFER while IIO_BUFFER_CB depends on IIO_BUFFER. This
    can also fail building the kernel.
    
    Honor the kconfig dependency to remove unmet direct dependency warnings
    and avoid any potential build failures.
    
    Fixes: aa132ffb6b0a ("input: touchscreen: resistive-adc-touch: add generic resistive ADC touchscreen")
    Signed-off-by: Necip Fazil Yildiran <fazilyildiran@gmail.com>
    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Link: https://lore.kernel.org/r/20201102221504.541279-1-fazilyildiran@gmail.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c033775796a02b24ab67977a751bb0d99ced75f8
Author: Sven Van Asbroeck <thesven73@gmail.com>
Date:   Fri Nov 6 10:07:06 2020 -0500

    spi: fix client driver breakages when using GPIO descriptors
    
    [ Upstream commit 766c6b63aa044e84b045803b40b14754d69a2a1d ]
    
    Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs")
    introduced the optional use of GPIO descriptors for chip selects.
    
    A side-effect of this change: when a SPI bus uses GPIO descriptors,
    all its client devices have SPI_CS_HIGH set in spi->mode. This flag is
    required for the SPI bus to operate correctly.
    
    This unfortunately breaks many client drivers, which use the following
    pattern to configure their underlying SPI bus:
    
    static int client_device_probe(struct spi_device *spi)
    {
            ...
            spi->mode = SPI_MODE_0;
            spi->bits_per_word = 8;
            err = spi_setup(spi);
            ..
    }
    
    In short, many client drivers overwrite the SPI_CS_HIGH bit in
    spi->mode, and break the underlying SPI bus driver.
    
    This is especially true for Freescale/NXP imx ecspi, where large
    numbers of spi client drivers now no longer work.
    
    Proposed fix:
    -------------
    When using gpio descriptors, depend on gpiolib to handle CS polarity.
    Existing quirks in gpiolib ensure that this is handled correctly.
    
    Existing gpiolib behaviour will force the polarity of any chip-select
    gpiod to active-high (if 'spi-active-high' devicetree prop present) or
    active-low (if 'spi-active-high' absent). Irrespective of whether
    the gpio is marked GPIO_ACTIVE_[HIGH|LOW] in the devicetree.
    
    Loose ends:
    -----------
    If this fix is applied:
    - is commit 138c9c32f090
      ("spi: spidev: Fix CS polarity if GPIO descriptors are used")
      still necessary / correct ?
    
    Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs")
    Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
    Acked-by: Linus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20201106150706.29089-1-TheSven73@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 3de293bcfe386500e456d766d27f4008592f34e6
Author: Paul E. McKenney <paulmck@kernel.org>
Date:   Thu Sep 24 15:11:55 2020 -0700

    rcu: Don't invoke try_invoke_on_locked_down_task() with irqs disabled
    
    [ Upstream commit c583bcb8f5edd48c1798798e341f78afb9bf4f6f ]
    
    The try_invoke_on_locked_down_task() function requires that
    interrupts be enabled, but it is called with interrupts disabled from
    rcu_print_task_stall(), resulting in an "IRQs not enabled as expected"
    diagnostic.  This commit therefore updates rcu_print_task_stall()
    to accumulate a list of the first few tasks while holding the current
    leaf rcu_node structure's ->lock, then releases that lock and only then
    uses try_invoke_on_locked_down_task() to attempt to obtain per-task
    detailed information.  Of course, as soon as ->lock is released, the
    task might exit, so the get_task_struct() function is used to prevent
    the task structure from going away in the meantime.
    
    Link: https://lore.kernel.org/lkml/000000000000903d5805ab908fc4@google.com/
    Fixes: 5bef8da66a9c ("rcu: Add per-task state to RCU CPU stall warnings")
    Reported-by: syzbot+cb3b69ae80afd6535b0e@syzkaller.appspotmail.com
    Reported-by: syzbot+f04854e1c5c9e913cc27@syzkaller.appspotmail.com
    Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 64e893ce8fb08ac1b45f8eb3e03166c20bcab146
Author: Brendan Higgins <brendanhiggins@google.com>
Date:   Thu Nov 5 15:24:40 2020 -0800

    kunit: tool: unmark test_data as binary blobs
    
    [ Upstream commit c335b4f1f65012713832d988ec06512c7bda5c04 ]
    
    The tools/testing/kunit/test_data/ directory was marked as binary
    because some of the test_data files cause checkpatch warnings. Fix this
    by dropping the .gitattributes file.
    
    Fixes: afc63da64f1e ("kunit: kunit_parser: make parser more robust")
    Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
    Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 1d81339e511d42383e30a0dac7230d6be4674090
Author: Tony Lindgren <tony@atomide.com>
Date:   Mon Nov 9 17:40:13 2020 +0200

    dmaengine: ti: omap-dma: Block PM if SDMA is busy to fix audio
    
    [ Upstream commit 29a25b9246f7f24203d30d59424cbe22bd905dfc ]
    
    We now use cpu_pm for saving and restoring device context for deeper SoC
    idle states. But for omap3, we must also block idle if SDMA is busy.
    
    If we don't block idle when SDMA is busy, we eventually end up saving and
    restoring SDMA register state on PER domain idle while SDMA is active and
    that causes at least audio playback to fail.
    
    Fixes: 4c74ecf79227 ("dmaengine: ti: omap-dma: Add device tree match data and use it for cpu_pm")
    Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Link: https://lore.kernel.org/r/20201109154013.11950-1-tony@atomide.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit e81b80897994fbcf083956ad75627dd2beeb53c0
Author: Fabio Estevam <festevam@gmail.com>
Date:   Thu Nov 5 18:13:20 2020 -0300

    ARM: dts: imx50-evk: Fix the chip select 1 IOMUX
    
    [ Upstream commit 33d0d843872c5ddbe28457a92fc6f2487315fb9f ]
    
    The SPI chip selects are represented as:
    
    cs-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>, <&gpio4 13 GPIO_ACTIVE_LOW>;
    
    , which means that they are used in GPIO function instead of native
    SPI mode.
    
    Fix the IOMUX for the chip select 1 to use GPIO4_13 instead of
    the native CSPI_SSI function.
    
    Fixes: c605cbf5e135 ("ARM: dts: imx: add device tree support for Freescale imx50evk board")
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a49ec9824b4de915c0aa0a6eb879966bb522cc66
Author: Lucas Stach <l.stach@pengutronix.de>
Date:   Thu Nov 5 18:06:12 2020 +0100

    arm64: dts: imx8mm: fix voltage for 1.6GHz CPU operating point
    
    [ Upstream commit d19d2152ca055baf20339cfacbf039c2cfb8d936 ]
    
    The datasheet for both the industrial and consumer variant of the
    SoC lists a typical voltage of 0.95V for the 1.6GHz CPU operating
    point.
    
    Fixes: e85c9d0faa75 (arm64: dts: imx8mm: Add cpufreq properties)
    Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
    Reviewed-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit d45c43162260c1b3fec2dc40b77180fdd60ea231
Author: Marek Vasut <marex@denx.de>
Date:   Thu Oct 29 20:46:52 2020 +0100

    ARM: dts: stm32: Keep VDDA LDO1 always on on DHCOM
    
    [ Upstream commit f4c7fa39415da6db1fa0bc26162ac23a0fbae8bb ]
    
    The VDDA LDO1 PMIC output supplies the analog VDDA input of the
    STM32MP1 on DHCOM, keep it always on, otherwise there could be
    leakage through the SoC.
    
    Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: Patrick Delaunay <patrick.delaunay@st.com>
    Cc: linux-stm32@st-md-mailman.stormreply.com
    To: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b4ed3b663d8fced95b8b51b1e7241b14d82e5a88
Author: Marek Vasut <marex@denx.de>
Date:   Thu Sep 24 01:25:35 2020 +0200

    ARM: dts: stm32: Enable thermal sensor support on stm32mp15xx-dhcor
    
    [ Upstream commit e5ace7f62695656ef8a66ad5a4c3edd055894876 ]
    
    Enable STM32 Digital Thermal Sensor driver for stm32mp15xx-dhcor SoMs.
    
    Fixes: 94cafe1b6482 ("ARM: dts: stm32: Add Avenger96 devicetree support based on STM32MP157A")
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Cc: linux-stm32@st-md-mailman.stormreply.com
    To: linux-arm-kernel@lists.infradead.org
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 8724541b9a8d4d81a088faeaa4fd28ce0ffa656b
Author: Marek Vasut <marex@denx.de>
Date:   Thu Oct 29 20:46:17 2020 +0100

    ARM: dts: stm32: Define VIO regulator supply on DHCOM
    
    [ Upstream commit 1f3d7fc279b1a299bb8b1b225d80309a2062ab8a ]
    
    The VIO regulator is supplied by PMIC Buck3, describe this in the DT.
    
    Fixes: 34e0c7847dcf ("ARM: dts: stm32: Add DH Electronics DHCOM STM32MP1 SoM and PDK2 board")
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: Patrick Delaunay <patrick.delaunay@st.com>
    Cc: linux-stm32@st-md-mailman.stormreply.com
    To: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 0229c860a2db13fddcef957f06546756306ecc88
Author: Marek Vasut <marex@denx.de>
Date:   Wed Oct 28 21:46:17 2020 +0100

    ARM: dts: stm32: Fix LED5 on STM32MP1 DHCOM PDK2
    
    [ Upstream commit 7e5f3155dcbb4d724386b30cc232002d9b9d81f5 ]
    
    On the prototype DHCOM, the LED5 was connected to pin PG2 of the
    STM32MP15xx, however on the production SoM this was changed to pin
    PC6. Update the connection in the DT.
    
    Fixes: 81d5fc719798 ("ARM: dts: stm32: Add GPIO LEDs for STM32MP1 DHCOM PDK2")
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: Patrick Delaunay <patrick.delaunay@st.com>
    Cc: linux-stm32@st-md-mailman.stormreply.com
    To: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 0b377c10d88d399a55d0af6ca3876e376d4cf104
Author: Marek Vasut <marex@denx.de>
Date:   Thu Oct 8 21:35:38 2020 +0200

    ARM: dts: stm32: Fix TA3-GPIO-C key on STM32MP1 DHCOM PDK2
    
    [ Upstream commit 52d9edbe6efc5042cf57fae6a25d07572ddf398b ]
    
    On the prototype DHCOM, the TA3-GPIO-C button was connected to pin PI11 of
    the STM32MP15xx, however on the production SoM this was changed to pin PG0
    to free up the IRQ line 11 for LAN8710i PHY IRQ. Update the connection in
    the DT. Since the IRQ line 0 is used for PMIC as well and cannot be shared
    with the button, make the button polled.
    
    Fixes: 87cabf9405cb ("ARM: dts: stm32: Add GPIO keys for STM32MP1 DHCOM PDK2")
    Signed-off-by: Marek Vasut <marex@denx.de>
    Cc: Alexandre Torgue <alexandre.torgue@st.com>
    Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
    Cc: Patrice Chotard <patrice.chotard@st.com>
    Cc: Patrick Delaunay <patrick.delaunay@st.com>
    Cc: linux-stm32@st-md-mailman.stormreply.com
    To: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 1a6aaae508181e4ac0165ad0f5b17f4b2da1418b
Author: Matthew Murrian <matthew.murrian@goctsi.com>
Date:   Wed Nov 4 12:30:06 2020 +0530

    dmaengine: xilinx_dma: Fix SG capability check for MCDMA
    
    [ Upstream commit 96d5d884f78306206d745d856aad322becd100c3 ]
    
    The SG capability is inherently present with Multichannel DMA operation.
    The register used to check for this capability with other DMA driver types
    is not defined for MCDMA.
    
    Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support")
    Signed-off-by: Matthew Murrian <matthew.murrian@goctsi.com>
    Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
    Link: https://lore.kernel.org/r/1604473206-32573-4-git-send-email-radhey.shyam.pandey@xilinx.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 27dda4dfc230cd275fd84f88b5781a78188849e8
Author: Matthew Murrian <matthew.murrian@goctsi.com>
Date:   Wed Nov 4 12:30:05 2020 +0530

    dmaengine: xilinx_dma: Fix usage of xilinx_aximcdma_tx_segment
    
    [ Upstream commit c8ae7932997d0cc92d016829138074c7520248e5 ]
    
    Several code sections incorrectly use struct xilinx_axidma_tx_segment
    instead of struct xilinx_aximcdma_tx_segment when operating as
    Multichannel DMA. As their structures are similar, this just works.
    
    Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support")
    Signed-off-by: Matthew Murrian <matthew.murrian@goctsi.com>
    Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
    Link: https://lore.kernel.org/r/1604473206-32573-3-git-send-email-radhey.shyam.pandey@xilinx.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit cb03bd50f557a46f2f68af75d5614e76ab9f2cc8
Author: Rijo Thomas <Rijo-john.Thomas@amd.com>
Date:   Wed Nov 4 11:56:10 2020 +0530

    tee: amdtee: synchronize access to shm list
    
    [ Upstream commit be353be27874f40837327d9a39e3ad2149ab66d3 ]
    
    Synchronize access to shm or shared memory buffer list to prevent
    race conditions due to concurrent updates to shared shm list by
    multiple threads.
    
    Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver")
    Reviewed-by: Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>
    Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
    Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5d53c196c84c2f83a04f712b71eda8a994c98ad3
Author: Rijo Thomas <Rijo-john.Thomas@amd.com>
Date:   Wed Nov 4 11:56:09 2020 +0530

    tee: amdtee: fix memory leak due to reset of global shm list
    
    [ Upstream commit ff1f855804cdbbb6db7b9b6df6cab783d1a40d66 ]
    
    The driver maintains a list of shared memory buffers along with their
    mapped buffer id's in a global linked list. These buffers need to be
    unmapped after use by the user-space client.
    
    The global shared memory list is initialized to zero entries in the
    function amdtee_open(). This clearing of list entries can be a source
    for memory leak on secure side if the global linked list previously
    held some mapped buffer entries allocated from another TEE context.
    
    Fix potential memory leak issue by moving global shared memory list
    to AMD-TEE driver context data structure.
    
    Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver")
    Reviewed-by: Devaraj Rangasamy <Devaraj.Rangasamy@amd.com>
    Signed-off-by: Rijo Thomas <Rijo-john.Thomas@amd.com>
    Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a68c11f7cd860ef0e022e4c74922957ef1beec9d
Author: Stephen Rothwell <sfr@canb.auug.org.au>
Date:   Mon Nov 2 12:43:27 2020 +1100

    swiotlb: using SIZE_MAX needs limits.h included
    
    [ Upstream commit f51778db088b2407ec177f2f4da0f6290602aa3f ]
    
    After merging the drm-misc tree, linux-next build (arm
    multi_v7_defconfig) failed like this:
    
    In file included from drivers/gpu/drm/nouveau/nouveau_ttm.c:26:
    include/linux/swiotlb.h: In function 'swiotlb_max_mapping_size':
    include/linux/swiotlb.h:99:9: error: 'SIZE_MAX' undeclared (first use in this function)
       99 |  return SIZE_MAX;
          |         ^~~~~~~~
    include/linux/swiotlb.h:7:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
        6 | #include <linux/init.h>
      +++ |+#include <stdint.h>
        7 | #include <linux/types.h>
    include/linux/swiotlb.h:99:9: note: each undeclared identifier is reported only once for each function it appears in
       99 |  return SIZE_MAX;
          |         ^~~~~~~~
    
    Caused by commit
    
      abe420bfae52 ("swiotlb: Introduce swiotlb_max_mapping_size()")
    
    but only exposed by commit "drm/nouveu: fix swiotlb include"
    
    Fix it by including linux/limits.h as appropriate.
    
    Fixes: abe420bfae52 ("swiotlb: Introduce swiotlb_max_mapping_size()")
    Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Link: https://lore.kernel.org/r/20201102124327.2f82b2a7@canb.auug.org.au
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 2202c5c37e387c2148c8c1bf8e35c5415a300241
Author: Oleksij Rempel <linux@rempel-privat.de>
Date:   Mon Oct 12 09:18:16 2020 +0200

    ARM: dts: imx6q-prti6q: fix PHY address
    
    [ Upstream commit e402599e5e5e0b2758d7766fd9f6d7953d4ccd85 ]
    
    Due to bug in the bootloader, the PHY has floating address and may
    randomly change on each PHY reset. To avoid it, the updated bootloader
    with the following patch[0] should be used:
    
    | ARM: protonic: disable on-die termination to fix PHY bootstrapping
    |
    | If on-die termination is enabled, the RXC pin of iMX6 will be pulled
    | high. Since we already have an 10K pull-down on board, the RXC level on
    | PHY reset will be ~800mV, which is mostly interpreted as 1. On some
    | reboots we get 0 instead and kernel can't detect the PHY properly.
    |
    | Since the default 0x020e07ac value is 0, it is sufficient to remove this
    | entry from the affected imxcfg files.
    |
    | Since we get stable 0 on pin PHYADDR[2], the PHY address is changed from
    | 4 to 0.
    
    With latest bootloader update, the PHY address will be fixed to "0".
    
    [0] https://git.pengutronix.de/cgit/barebox/commit/?id=93f7dcf631edfcda19e7757b28d66017ea274b81
    
    Fixes: 0d446a505592 ("ARM: dts: add Protonic PRTI6Q board")
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 16e34ba1f33e99ac9bddc7f3124984aa24562b94
Author: Andrew Lunn <andrew@lunn.ch>
Date:   Fri Oct 30 01:55:28 2020 +0100

    ARM: dts: vf610-zii-dev-rev-b: Fix MDIO over clocking
    
    [ Upstream commit f8b5a33707c9a19ec905d2826be0acd151997a09 ]
    
    The ZII devel B board has two generations of Marvell Switches.  The
    mv88e6352 supports an MDIO clock of 12MHz. However the older 88e6185
    does not like 12MHz, and often fails to probe.
    
    Reduce the clock speed to 5MHz, which seems to work reliably.
    
    Cc: Chris Healy <cphealy@gmail.com>
    Fixes: b955387667ec ("ARM: dts: ZII: update MDIO speed and preamble")
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    Reviewed-by: Chris Healy <cphealy@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 12b73d774f4018140489a6b0d38dd023ac33f35a
Author: Sergey Matyukevich <geomatsi@gmail.com>
Date:   Sat Oct 24 23:11:20 2020 +0300

    arm: dts: imx6qdl-udoo: fix rgmii phy-mode for ksz9031 phy
    
    [ Upstream commit 7dd8f0ba88fce98e2953267a66af74c6f4792a56 ]
    
    Commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the
    KSZ9031 PHY") fixed micrel phy driver adding proper support for phy
    modes. Adapt imx6q-udoo board phy settings : explicitly set required
    delay configuration using "rgmii-id".
    
    Fixes: cbd54fe0b2bc ("ARM: dts: imx6dl-udoo: Add board support based off imx6q-udoo")
    Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
    Reviewed-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 488b3d6a45f7565d644f4c6dde6742484670fe40
Author: Adam Ford <aford173@gmail.com>
Date:   Thu Oct 8 13:33:00 2020 -0500

    arm64: dts imx8mn: Remove non-existent USB OTG2
    
    [ Upstream commit cf5abb0132193767c07c83e06f91b777d22ba495 ]
    
    According to the i.MX8MN TRM, there is only one OTG port.  The
    address for OTG2 is reserved on Nano.
    
    This patch removes the non-existent OTG2, usbphynop2, and the usbmisc2
    nodes.
    
    Fixes: 6c3debcbae47 ("arm64: dts: freescale: Add i.MX8MN dtsi support")
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 8c767be9936689d54a4e16a1d3f2bab4326c579a
Author: Adam Ford <aford173@gmail.com>
Date:   Wed Oct 7 08:02:37 2020 -0500

    arm64: dts: imx8mm-beacon-som: Fix Choppy BT audio
    
    [ Upstream commit 587258edd94c305077923ec458e04c032fca83e6 ]
    
    When streaming bluetooth audio, the sound is choppy due to the
    fact that the default baud rate of the HCI interface is too slow
    to handle 16-bit stereo at 48KHz.
    
    The Bluetooth chip is capable of up to 4M baud on the serial port,
    so this patch sets the max-speed to 4000000 in order to properly
    stream audio over the Bluetooth.
    
    Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit")
    Signed-off-by: Adam Ford <aford173@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a0f791734d4098382cd382290319da18cd50dfdb
Author: Biwen Li <biwen.li@nxp.com>
Date:   Tue Sep 29 09:30:21 2020 +0800

    arm64: dts: fsl: fix endianness issue of rcpm
    
    [ Upstream commit d92454287ee25d78f1caac3734a1864f8a5a5275 ]
    
    Add little-endian property to RCPM node (for ls1028a,ls1088a,ls208xa),
    otherwise RCPM driver will program hardware with incorrect setting,
    causing system (such as LS1028ARDB) failed to be waked by wakeup source.
    
    Fixes: 791c88ca5713 (“arm64: dts: ls1028a: Add ftm_alarm0 DT node”)
    Fixes: f4fe3a8665495 (“arm64: dts: layerscape: add ftm_alarm0 node”)
    Signed-off-by: Biwen Li <biwen.li@nxp.com>
    Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
    Acked-by: Li Yang <leoyang.li@nxp.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit a96b1305e6f806c910197258e776ff33be95917e
Author: Nenad Peric <nperic@gmail.com>
Date:   Wed Oct 28 12:58:17 2020 +0100

    arm64: dts: allwinner: h5: OrangePi Prime: Fix ethernet node
    
    [ Upstream commit 107954afc5df667da438644aa4982606663f9b17 ]
    
    RX and TX delay are provided by ethernet PHY. Reflect that in ethernet
    node.
    
    Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes")
    Signed-off-by: Nenad Peric <nperic@gmail.com>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201028115817.68113-1-nperic@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit eeb625eca73538ddf31cdc8cd3ecf65bf5c16040
Author: Dave Jiang <dave.jiang@intel.com>
Date:   Tue Oct 27 14:34:09 2020 -0700

    dmaengine: idxd: fix wq config registers offset programming
    
    [ Upstream commit 484f910e93b48c1d8890d8330a87e34ae61f4782 ]
    
    DSA spec v1.1 [1] updated to include a stride size register for WQ
    configuration that will specify how much space is reserved for the WQ
    configuration register set. This change is expected to be in the final
    gen1 DSA hardware. Fix the driver to use WQCFG_OFFSET() for all WQ
    offset calculation and fixup WQCFG_OFFSET() to use the new calculated
    wq size.
    
    [1]: https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html
    
    Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators")
    Signed-off-by: Dave Jiang <dave.jiang@intel.com>
    Link: https://lore.kernel.org/r/160383444959.48058.14249265538404901781.stgit@djiang5-desk3.ch.intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit da20c6b4d965daea8bb32ac9c8f17a8603190942
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Fri Oct 23 12:44:40 2020 -0700

    MIPS: export has_transparent_hugepage() for modules
    
    [ Upstream commit 31b4d8e172f614adc53ddecb4b6b2f6411a49b84 ]
    
    MIPS should export its local version of "has_transparent_hugepage"
    so that loadable modules (dax) can use it.
    
    Fixes this build error:
    ERROR: modpost: "has_transparent_hugepage" [drivers/dax/dax.ko] undefined!
    
    Fixes: fd8cfd300019 ("arch: fix has_transparent_hugepage()")
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: linux-mips@vger.kernel.org
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Vishal Verma <vishal.l.verma@intel.com>
    Cc: Dave Jiang <dave.jiang@intel.com>
    Cc: linux-nvdimm@lists.01.org
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 241d494672d4b9c006e8927a69f124c3c2c20f7b
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Mon Oct 26 17:10:09 2020 -0700

    Input: adxl34x - clean up a data type in adxl34x_probe()
    
    [ Upstream commit 33b6c39e747c552fa770eecebd1776f1f4a222b1 ]
    
    The "revid" is used to store negative error codes so it should be an int
    type.
    
    Fixes: e27c729219ad ("Input: add driver for ADXL345/346 Digital Accelerometers")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Michael Hennerich <michael.hennerich@analog.com>
    Link: https://lore.kernel.org/r/20201026072824.GA1620546@mwanda
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9c838b860316ac6f3556eb1cb44a12fe2d3a1006
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:15 2020 +0800

    arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
    
    [ Upstream commit 1a9a8910b2153cd3c4f3f2f8defcb853ead3b1fd ]
    
    The Ethernet PHY on the Bananapi M64 has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
    Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-10-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 987127780658ba0ceff9770c37f937f86887701a
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:14 2020 +0800

    arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY
    
    [ Upstream commit 2bd8570d20c88909b8be3251727a26476b02652c ]
    
    The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX
    delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-9-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ada77e3292521cc8b01e59af762b3b19bdc38ad0
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:13 2020 +0800

    ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit 3914160ffc0bf762d6d605d4b27036b7b89367ea ]
    
    The Ethernet PHY on the Bananapi M2+ has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i")
    Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
    Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-8-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 78c7a4acc4298ecd058c1291811ec7fdd5d245be
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:12 2020 +0800

    ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit b1064037e8ecf09d587b7b4966eebe0c362908e5 ]
    
    The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX
    and TX delays enabled on the PHY, using pull-ups on the RXDLY and
    TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC")
    Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-7-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 286dbcc89e7249f94a670d2cc6e75114ca9b4b4e
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:11 2020 +0800

    ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit 57dbe558457bf4042169bc1f334e3b53a8480a1c ]
    
    The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX
    and TX delays enabled on the PHY, using pull-ups on the RXDLY and
    TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-6-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ad15051afd4cab49aebd5a8d0e1bc976bb8cea5c
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:10 2020 +0800

    ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit e080ab31a0aa126b0a7e4f67f2b01b371b852c88 ]
    
    The Ethernet PHY on the Orange Pi Plus 2E has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
    Fixes: 7a78ef92cdc5 ("ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-5-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c6a9e1efbf76902273768f68fa00136ebb929cf9
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:09 2020 +0800

    ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit f94f78bd93f567c022f594589dbeecdf59931365 ]
    
    The Ethernet PHY on the Bananapi M1+ has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 04c85ecad32a ("ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-4-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit e99dc29e3f6df4df302df1259b19b255619d0ba6
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:08 2020 +0800

    ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit 353c3de1303fc93032164402c0eb8550ecd6f154 ]
    
    The Ethernet PHY on the Cubietruck has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: 67073d97672d ("ARM: dts: sun7i: cubietruck: Enable the GMAC")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Tested-by: Emilio López <emilio@elopez.com.ar>
    Reviewed-by: Emilio López <emilio@elopez.com.ar>
    Link: https://lore.kernel.org/r/20201024162515.30032-3-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit d4278c6cccbd7f060abcf1a2d636ec7229ddeb4a
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:07 2020 +0800

    ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
    
    [ Upstream commit e76724153f5b4539802cc21b2c6131058668a1c6 ]
    
    The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
    enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
    
    Fix the phy-mode description to correct reflect this so that the
    implementation doesn't reconfigure the delays incorrectly. This
    happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
    rx/tx delay config").
    
    Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird support")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-2-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 018b3dee44144e7e741a5c444e3e378ecc75bafc
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Sun Oct 25 00:25:06 2020 +0800

    Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"
    
    [ Upstream commit 8d80e2f00a42ef10b54e1b2d9e97314f8fd046c0 ]
    
    This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2.
    
    Turns out the activity and link LEDs on the RJ45 port are active low,
    just like on the Orange Pi PC.
    
    Revert the commit that says otherwise.
    
    Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high")
    Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Link: https://lore.kernel.org/r/20201024162515.30032-1-wens@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 58a56895c33c71092b2358d87108f7391723cf04
Author: Jernej Skrabec <jernej.skrabec@siol.net>
Date:   Sun Oct 25 09:19:49 2020 +0100

    ARM: dts: sun8i: r40: bananapi-m2-ultra: Fix ethernet node
    
    [ Upstream commit b3eec3212e66ece33f69be0de98d54e67834e798 ]
    
    Ethernet PHY on BananaPi M2 Ultra provides RX and TX delays. Fix
    ethernet node to reflect that fact.
    
    Fixes: c36fd5a48bd2 ("ARM: dts: sun8i: r40: bananapi-m2-ultra: Enable GMAC ethernet controller")
    Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20201025081949.783443-1-jernej.skrabec@siol.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit f9235e84ae24f98757415f9b3301636b20de4a57
Author: Jernej Skrabec <jernej.skrabec@siol.net>
Date:   Fri Oct 23 20:48:58 2020 +0200

    arm64: dts: allwinner: h5: OrangePi PC2: Fix ethernet node
    
    [ Upstream commit b34bf9f6a623ddb82600a5ed5c644224122395e1 ]
    
    RX and TX delay are provided by ethernet PHY. Reflect that in ethernet
    node.
    
    Fixes: 44a94c7ef989 ("arm64: dts: allwinner: H5: Restore EMAC changes")
    Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20201023184858.3272918-1-jernej.skrabec@siol.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 7836a3bccf96c061bd0af42d9014d2937cb63969
Author: Jernej Skrabec <jernej.skrabec@siol.net>
Date:   Thu Oct 22 23:13:01 2020 +0200

    arm64: dts: allwinner: a64: Pine64 Plus: Fix ethernet node
    
    [ Upstream commit 927f42fcc1b4f7d04a2ac5cf02f25612aa8923a4 ]
    
    According to board schematic, PHY provides both, RX and TX delays.
    However, according to "fix" Realtek provided for this board, only TX
    delay should be provided by PHY.
    Tests show that both variants work but TX only PHY delay works
    slightly better.
    
    Update ethernet node to reflect the fact that PHY provides TX delay.
    
    Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
    Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20201022211301.3548422-1-jernej.skrabec@siol.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4cb19281cff91229468a004182131a69c6c1c47f
Author: Jernej Skrabec <jernej.skrabec@siol.net>
Date:   Thu Oct 22 20:58:39 2020 +0200

    arm64: dts: allwinner: a64: OrangePi Win: Fix ethernet node
    
    [ Upstream commit d7cdff444579e6659459b2fe04340ebb27628d5e ]
    
    RX/TX delay on OrangePi Win board is set on PHY. Reflect that in
    ethernet node.
    
    Fixes: 93d6a27cfcc0 ("arm64: dts: allwinner: a64: Orange Pi Win: Add Ethernet node")
    Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20201022185839.2779245-1-jernej.skrabec@siol.net
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 05ad1048628b176c26150b217b7ee7bdfa860ede
Author: Corentin Labbe <clabbe@baylibre.com>
Date:   Mon Oct 19 06:34:49 2020 +0000

    arm64: dts: allwinner: Pine H64: Enable both RGMII RX/TX delay
    
    [ Upstream commit 419c65f5000a6c25597ea52488528d75b287cbd0 ]
    
    Since commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"),
    the network is unusable on PineH64 model A.
    
    This is due to phy-mode incorrectly set to rgmii instead of rgmii-id.
    
    Fixes: 729e1ffcf47e ("arm64: allwinner: h6: add support for the Ethernet on Pine H64")
    Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://lore.kernel.org/r/20201019063449.33316-1-clabbe@baylibre.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 671ff92a0b61b9738b03ccea9bb88c7ee8681593
Author: Clément Péron <peron.clem@gmail.com>
Date:   Sun Oct 18 19:24:09 2020 +0200

    arm64: dts: allwinner: beelink-gs1: Enable both RGMII RX/TX delay
    
    [ Upstream commit 97a38c1c213b162aa577299de698f39c18ba696b ]
    
    Before the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx
    delay config"), the software overwrite for RX/TX delays of the RTL8211e
    were not working properly and the Beelink GS1 had both RX/TX delay of RGMII
    interface set using pull-up on the TXDLY and RXDLY pins.
    
    Now that these delays are working properly they overwrite the HW
    config and set this to 'rgmii' meaning no delay on both RX/TX.
    This makes the ethernet of this board not working anymore.
    
    Set the phy-mode to 'rgmii-id' meaning RGMII with RX/TX delays
    in the device-tree to keep the correct configuration.
    
    Fixes: 089bee8dd119 ("arm64: dts: allwinner: h6: Introduce Beelink GS1 board")
    Signed-off-by: Clément Péron <peron.clem@gmail.com>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Acked-by: Chen-Yu Tsai <wens@csie.org>
    Link: https://lore.kernel.org/r/20201018172409.1754775-1-peron.clem@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 37b4f6474a4ace8cc3cc13b8e17c7c862a373007
Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date:   Fri Nov 20 08:46:45 2020 -0800

    usb: dwc2: Avoid leaving the error_debugfs label unused
    
    commit 190bb01b72d2d5c3654a03c42fb1ad0dc6114c79 upstream.
    
    The error_debugfs label is only used when either
    CONFIG_USB_DWC2_PERIPHERAL or CONFIG_USB_DWC2_DUAL_ROLE is enabled. Add
    the same #if to the error_debugfs label itself as the code which uses
    this label already has.
    
    This avoids the following compiler warning:
      warning: label ‘error_debugfs’ defined but not used [-Wunused-label]
    
    Fixes: e1c08cf23172ed ("usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails")
    Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Reported-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Signed-off-by: Felipe Balbi <balbi@kernel.org>
    Cc: stable@vger.kernel.org # 5.9.x
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 53b3380debd8c4f717c65986862fa05fd4e0198d
Author: Konrad Dybcio <konrad.dybcio@somainline.org>
Date:   Thu Nov 5 00:22:13 2020 +0100

    arm64: cpu_errata: Apply Erratum 845719 to KRYO2XX Silver
    
    [ Upstream commit 23c216416056148136bdaf0cdd18caf4904bb6e1 ]
    
    QCOM KRYO2XX Silver cores are Cortex-A53 based and are
    susceptible to the 845719 erratum. Add them to the lookup
    list to apply the erratum.
    
    Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
    Link: https://lore.kernel.org/r/20201104232218.198800-5-konrad.dybcio@somainline.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6dd627b12e57e19b4e403a0e79b565710e5111d8
Author: Konrad Dybcio <konrad.dybcio@somainline.org>
Date:   Thu Nov 5 00:22:11 2020 +0100

    arm64: kpti: Add KRYO2XX gold/silver CPU cores to kpti safelist
    
    [ Upstream commit e3dd11a9f2521cecbcf30c2fd17ecc5a445dfb94 ]
    
    QCOM KRYO2XX gold (big) silver (LITTLE) CPU cores are based on
    Cortex-A73 and Cortex-A53 respectively and are meltdown safe,
    hence add them to kpti_safe_list[].
    
    Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
    Link: https://lore.kernel.org/r/20201104232218.198800-3-konrad.dybcio@somainline.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 835abb66618b7b1e5039ef0d41d8697ce159ac45
Author: Konrad Dybcio <konrad.dybcio@somainline.org>
Date:   Thu Nov 5 00:22:10 2020 +0100

    arm64: Add MIDR value for KRYO2XX gold/silver CPU cores
    
    [ Upstream commit 77473cffef21611b4423f613fe32836afb26405e ]
    
    Add MIDR value for KRYO2XX gold (big) and silver (LITTLE)
    CPU cores which are used in Qualcomm Technologies, Inc.
    SoCs. This will be used to identify and apply errata
    which are applicable for these CPU cores.
    
    Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
    Link: https://lore.kernel.org/r/20201104232218.198800-2-konrad.dybcio@somainline.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b950dcc0e1660b6d731c64fde0c0583460c27f70
Author: Bob Peterson <rpeterso@redhat.com>
Date:   Thu Nov 12 10:02:48 2020 -0600

    gfs2: Fix case in which ail writes are done to jdata holes
    
    [ Upstream commit 4e79e3f08e576acd51dffb4520037188703238b3 ]
    
    Patch b2a846dbef4e ("gfs2: Ignore journal log writes for jdata holes")
    tried (unsuccessfully) to fix a case in which writes were done to jdata
    blocks, the blocks are sent to the ail list, then a punch_hole or truncate
    operation caused the blocks to be freed. In other words, the ail items
    are for jdata holes. Before b2a846dbef4e, the jdata hole caused function
    gfs2_block_map to return -EIO, which was eventually interpreted as an
    IO error to the journal, and then withdraw.
    
    This patch changes function gfs2_get_block_noalloc, which is only used
    for jdata writes, so it returns -ENODATA rather than -EIO, and when
    -ENODATA is returned to gfs2_ail1_start_one, the error is ignored.
    We can safely ignore it because gfs2_ail1_start_one is only called
    when the jdata pages have already been written and truncated, so the
    ail1 content no longer applies.
    
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 72d9927b7bdc51ebdac7ff8e65fd7a9ca30f248e
Author: Paul Barker <pbarker@konsulko.com>
Date:   Wed Nov 11 16:46:43 2020 +0000

    hwmon: (pwm-fan) Fix RPM calculation
    
    [ Upstream commit fd8feec665fef840277515a5c2b9b7c3e3970fad ]
    
    To convert the number of pulses counted into an RPM estimation, we need
    to divide by the width of our measurement interval instead of
    multiplying by it. If the width of the measurement interval is zero we
    don't update the RPM value to avoid dividing by zero.
    
    We also don't need to do 64-bit division, with 32-bits we can handle a
    fan running at over 4 million RPM.
    
    Signed-off-by: Paul Barker <pbarker@konsulko.com>
    Link: https://lore.kernel.org/r/20201111164643.7087-1-pbarker@konsulko.com
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit efbd794540ad887ca03bfe7b154e67c93cdae3ca
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Sun Nov 8 17:27:41 2020 +0800

    gfs2: fix possible reference leak in gfs2_check_blk_type
    
    [ Upstream commit bc923818b190c8b63c91a47702969c8053574f5b ]
    
    In the fail path of gfs2_check_blk_type, forgetting to call
    gfs2_glock_dq_uninit will result in rgd_gh reference leak.
    
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 5013d21a07a76757d8090e9ffc84727aea03cd35
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Tue Nov 10 16:49:29 2020 -0800

    vfs: remove lockdep bogosity in __sb_start_write
    
    [ Upstream commit 22843291efc986ce7722610073fcf85a39b4cb13 ]
    
    __sb_start_write has some weird looking lockdep code that claims to
    exist to handle nested freeze locking requests from xfs.  The code as
    written seems broken -- if we think we hold a read lock on any of the
    higher freeze levels (e.g. we hold SB_FREEZE_WRITE and are trying to
    lock SB_FREEZE_PAGEFAULT), it converts a blocking lock attempt into a
    trylock.
    
    However, it's not correct to downgrade a blocking lock attempt to a
    trylock unless the downgrading code or the callers are prepared to deal
    with that situation.  Neither __sb_start_write nor its callers handle
    this at all.  For example:
    
    sb_start_pagefault ignores the return value completely, with the result
    that if xfs_filemap_fault loses a race with a different thread trying to
    fsfreeze, it will proceed without pagefault freeze protection (thereby
    breaking locking rules) and then unlocks the pagefault freeze lock that
    it doesn't own on its way out (thereby corrupting the lock state), which
    leads to a system hang shortly afterwards.
    
    Normally, this won't happen because our ownership of a read lock on a
    higher freeze protection level blocks fsfreeze from grabbing a write
    lock on that higher level.  *However*, if lockdep is offline,
    lock_is_held_type unconditionally returns 1, which means that
    percpu_rwsem_is_held returns 1, which means that __sb_start_write
    unconditionally converts blocking freeze lock attempts into trylocks,
    even when we *don't* hold anything that would block a fsfreeze.
    
    Apparently this all held together until 5.10-rc1, when bugs in lockdep
    caused lockdep to shut itself off early in an fstests run, and once
    fstests gets to the "race writes with freezer" tests, kaboom.  This
    might explain the long trail of vanishingly infrequent livelocks in
    fstests after lockdep goes offline that I've never been able to
    diagnose.
    
    We could fix it by spinning on the trylock if wait==true, but AFAICT the
    locking works fine if lockdep is not built at all (and I didn't see any
    complaints running fstests overnight), so remove this snippet entirely.
    
    NOTE: Commit f4b554af9931 in 2015 created the current weird logic (which
    used to exist in a different form in commit 5accdf82ba25c from 2012) in
    __sb_start_write.  XFS solved this whole problem in the late 2.6 era by
    creating a variant of transactions (XFS_TRANS_NO_WRITECOUNT) that don't
    grab intwrite freeze protection, thus making lockdep's solution
    unnecessary.  The commit claims that Dave Chinner explained that the
    trylock hack + comment could be removed, but nobody ever did.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9acbc6cbfd9c7570128cab8fbf0db126c09cf7b8
Author: Richard Weinberger <richard@nod.at>
Date:   Mon Oct 19 23:10:49 2020 +0200

    um: Call pgtable_pmd_page_dtor() in __pmd_free_tlb()
    
    [ Upstream commit 9a5085b3fad5d5d6019a3d160cdd70357d35c8b1 ]
    
    Commit b2b29d6d0119 ("mm: account PMD tables like PTE tables") uncovered
    a bug in uml, we forgot to call the destructor.
    While we are here, give x a sane name.
    
    Reported-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
    Co-developed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Tested-by: Christopher Obbard <chris.obbard@collabora.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 62aa3c820d2219b69b65f011edbd61996a6eb398
Author: Will Deacon <will@kernel.org>
Date:   Fri Nov 6 10:25:49 2020 +0000

    arm64: smp: Tell RCU about CPUs that fail to come online
    
    [ Upstream commit 04e613ded8c26489b3e0f9101b44462f780d1a35 ]
    
    Commit ce3d31ad3cac ("arm64/smp: Move rcu_cpu_starting() earlier") ensured
    that RCU is informed early about incoming CPUs that might end up calling
    into printk() before they are online. However, if such a CPU fails the
    early CPU feature compatibility checks in check_local_cpu_capabilities(),
    then it will be powered off or parked without informing RCU, leading to
    an endless stream of stalls:
    
      | rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
      | rcu:        2-O...: (0 ticks this GP) idle=002/1/0x4000000000000000 softirq=0/0 fqs=2593
      | (detected by 0, t=5252 jiffies, g=9317, q=136)
      | Task dump for CPU 2:
      | task:swapper/2       state:R  running task     stack:    0 pid:    0 ppid:     1 flags:0x00000028
      | Call trace:
      | ret_from_fork+0x0/0x30
    
    Ensure that the dying CPU invokes rcu_report_dead() prior to being powered
    off or parked.
    
    Cc: Qian Cai <cai@redhat.com>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
    Suggested-by: Qian Cai <cai@redhat.com>
    Link: https://lore.kernel.org/r/20201105222242.GA8842@willie-the-truck
    Link: https://lore.kernel.org/r/20201106103602.9849-3-will@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b0ebcadd83cd5be78967d7efddb7f80b587e993a
Author: Will Deacon <will@kernel.org>
Date:   Fri Nov 6 09:57:55 2020 +0000

    arm64: psci: Avoid printing in cpu_psci_cpu_die()
    
    [ Upstream commit 891deb87585017d526b67b59c15d38755b900fea ]
    
    cpu_psci_cpu_die() is called in the context of the dying CPU, which
    will no longer be online or tracked by RCU. It is therefore not generally
    safe to call printk() if the PSCI "cpu off" request fails, so remove the
    pr_crit() invocation.
    
    Cc: Qian Cai <cai@redhat.com>
    Cc: "Paul E. McKenney" <paulmck@kernel.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Link: https://lore.kernel.org/r/20201106103602.9849-2-will@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6d4183dfadace80c7d70b2e56ccbac38e31bf237
Author: Will Deacon <will@kernel.org>
Date:   Fri Nov 6 11:14:26 2020 +0000

    arm64: errata: Fix handling of 1418040 with late CPU onlining
    
    [ Upstream commit f969f03888b9438fdb227b6460d99ede5737326d ]
    
    In a surprising turn of events, it transpires that CPU capabilities
    configured as ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE are never set as the
    result of late-onlining. Therefore our handling of erratum 1418040 does
    not get activated if it is not required by any of the boot CPUs, even
    though we allow late-onlining of an affected CPU.
    
    In order to get things working again, replace the cpus_have_const_cap()
    invocation with an explicit check for the current CPU using
    this_cpu_has_cap().
    
    Cc: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
    Cc: Stephen Boyd <swboyd@chromium.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Acked-by: Marc Zyngier <maz@kernel.org>
    Link: https://lore.kernel.org/r/20201106114952.10032-1-will@kernel.org
    Signed-off-by: Will Deacon <will@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 0d995094ef9a16d66fec8e506b98a951ced3e00d
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sat Nov 7 14:32:54 2020 +0100

    ACPI: button: Add DMI quirk for Medion Akoya E2228T
    
    [ Upstream commit 7daaa06357bf7f1874b62bb1ea9d66a51d4e567e ]
    
    The Medion Akoya E2228T's ACPI _LID implementation is quite broken,
    it has the same issues as the one from the Medion Akoya E2215T:
    
    1. For notifications it uses an ActiveLow Edge GpioInt, rather then
       an ActiveBoth one, meaning that the device is only notified when the
       lid is closed, not when it is opened.
    
    2. Matching with this its _LID method simply always returns 0 (closed)
    
    In order for the Linux LID code to work properly with this implementation,
    the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN,
    add a DMI quirk for this.
    
    While working on this I also found out that the MD60### part of the model
    number differs per country/batch while all of the E2215T and E2228T models
    have this issue, so also remove the " MD60198" part from the E2215T quirk.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 4c35d557fb747782e5ec048ff372814b054bce25
Author: Aaron Lewis <aaronlewis@google.com>
Date:   Mon Oct 12 12:47:13 2020 -0700

    selftests: kvm: Fix the segment descriptor layout to match the actual layout
    
    [ Upstream commit df11f7dd5834146defa448acba097e8d7703cc42 ]
    
    Fix the layout of 'struct desc64' to match the layout described in the
    SDM Vol 3, Chapter 3 "Protected-Mode Memory Management", section 3.4.5
    "Segment Descriptors", Figure 3-8 "Segment Descriptor".  The test added
    later in this series relies on this and crashes if this layout is not
    correct.
    
    Signed-off-by: Aaron Lewis <aaronlewis@google.com>
    Reviewed-by: Alexander Graf <graf@amazon.com>
    Message-Id: <20201012194716.3950330-2-aaronlewis@google.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ee0e2e04ba603b47ed9ffaadc89829888595c035
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Fri Oct 9 21:08:56 2020 +0300

    pinctrl: mcp23s08: Print error message when regmap init fails
    
    [ Upstream commit a835d3a114ab0dc2f0d8c6963c3f53734b1c5965 ]
    
    It is useful for debugging to have the error message printed
    when regmap initialisation fails. Add it to the driver.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Martin Hundebøll <martin@geanix.com>
    Link: https://lore.kernel.org/r/20201009180856.4738-2-andriy.shevchenko@linux.intel.com
    Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 00aae1749321ce74ae9c7bd2c24da5e25159bb7d
Author: Can Guo <cang@codeaurora.org>
Date:   Mon Nov 2 22:24:40 2020 -0800

    scsi: ufs: Try to save power mode change and UIC cmd completion timeout
    
    [ Upstream commit 0f52fcb99ea2738a0a0f28e12cf4dd427069dd2a ]
    
    Use the uic_cmd->cmd_active as a flag to track the lifecycle of an UIC cmd.
    The flag is set before sending the UIC cmd and cleared in IRQ handler. When
    a PMC or UIC cmd completion timeout happens, if the flag is not set,
    instead of returning timeout error, we still treat it as a successful
    operation.  This is to deal with the scenario in which completion has been
    raised but the one waiting for the completion cannot be awaken in time due
    to kernel scheduling problem.
    
    Link: https://lore.kernel.org/r/1604384682-15837-3-git-send-email-cang@codeaurora.org
    Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
    Signed-off-by: Can Guo <cang@codeaurora.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 1583106e5e3e5cd115e602d31eab427c01851cfe
Author: Can Guo <cang@codeaurora.org>
Date:   Mon Nov 2 22:24:39 2020 -0800

    scsi: ufs: Fix unbalanced scsi_block_reqs_cnt caused by ufshcd_hold()
    
    [ Upstream commit da3fecb0040324c08f1587e5bff1f15f36be1872 ]
    
    The scsi_block_reqs_cnt increased in ufshcd_hold() is supposed to be
    decreased back in ufshcd_ungate_work() in a paired way. However, if
    specific ufshcd_hold/release sequences are met, it is possible that
    scsi_block_reqs_cnt is increased twice but only one ungate work is
    queued. To make sure scsi_block_reqs_cnt is handled by ufshcd_hold() and
    ufshcd_ungate_work() in a paired way, increase it only if queue_work()
    returns true.
    
    Link: https://lore.kernel.org/r/1604384682-15837-2-git-send-email-cang@codeaurora.org
    Reviewed-by: Hongwu Su <hongwus@codeaurora.org>
    Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
    Reviewed-by: Bean Huo <beanhuo@micron.com>
    Signed-off-by: Can Guo <cang@codeaurora.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9d4501ef7d7e8ce7d642a6a69bfc19694d6a8ed8
Author: Jianqun Xu <jay.xu@rock-chips.com>
Date:   Tue Oct 13 14:37:30 2020 +0800

    pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
    
    [ Upstream commit 63fbf8013b2f6430754526ef9594f229c7219b1f ]
    
    There need to enable pclk_gpio when do irq_create_mapping, since it will
    do access to gpio controller.
    
    Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
    Reviewed-by: Heiko Stuebner <heiko@sntech.de>
    Reviewed-by: Kever Yang<kever.yang@rock-chips.com>
    Link: https://lore.kernel.org/r/20201013063731.3618-3-jay.xu@rock-chips.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6f67ce22636acc006934e3fb07bc1da0440c83e8
Author: Oded Gabbay <ogabbay@kernel.org>
Date:   Mon Nov 2 18:36:03 2020 +0200

    habanalabs/gaudi: mask WDT error in QMAN
    
    [ Upstream commit f83f3a31b2972ddc907fbb286c6446dd9db6e198 ]
    
    This interrupt cause is not relevant because of how the user use the
    QMAN arbitration mechanism. We must mask it as the log explodes with it.
    
    Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit dfdb861e450336c49285094501b60620055ec1cb
Author: Ian Rogers <irogers@google.com>
Date:   Tue Oct 27 16:36:45 2020 -0700

    tools, bpftool: Avoid array index warnings.
    
    [ Upstream commit 1e6f5dcc1b9ec9068f5d38331cec38b35498edf5 ]
    
    The bpf_caps array is shorter without CAP_BPF, avoid out of bounds reads
    if this isn't defined. Working around this avoids -Wno-array-bounds with
    clang.
    
    Signed-off-by: Ian Rogers <irogers@google.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Tobias Klauser <tklauser@distanz.ch>
    Acked-by: Andrii Nakryiko <andrii@kernel.org>
    Link: https://lore.kernel.org/bpf/20201027233646.3434896-1-irogers@google.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 31fa169e5e858714d6858e59c8f6ff2ef0c05ce6
Author: Tony Lindgren <tony@atomide.com>
Date:   Wed Oct 28 08:05:56 2020 +0200

    Revert "Revert "gpio: omap: Fix lost edge wake-up interrupts""
    
    [ Upstream commit 7ffa08169849be898eed6f3694aab8c425497749 ]
    
    This reverts commit 579ced8fdb00b8e94304a83e3cc419f6f8eab08e.
    
    Turns out I was overly optimistic about cpu_pm blocking idle being a
    solution for handling edge interrupts. While it helps in preventing
    entering idle states that potentially lose context, we can still get
    an edge interrupt triggering while entering idle. So we need to also
    add back the workaround for seeing if there are any pending edge
    interrupts when waking up.
    
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
    Cc: Grygorii Strashko <grygorii.strashko@ti.com>
    Cc: Keerthy <j-keerthy@ti.com>
    Cc: Ladislav Michl <ladis@linux-mips.org>
    Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Cc: Russell King <rmk+kernel@armlinux.org.uk>
    Cc: Tero Kristo <t-kristo@ti.com>
    Link: https://lore.kernel.org/r/20201028060556.56038-1-tony@atomide.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 36dc4d1fb73900626fad5313063356ded6b3955c
Author: Filip Moc <dev@moc6.cz>
Date:   Tue Nov 17 18:36:31 2020 +0100

    net: usb: qmi_wwan: Set DTR quirk for MR400
    
    [ Upstream commit df8d85d8c69d6837817e54dcb73c84a8b5a13877 ]
    
    LTE module MR400 embedded in TL-MR6400 v4 requires DTR to be set.
    
    Signed-off-by: Filip Moc <dev@moc6.cz>
    Acked-by: Bjørn Mork <bjorn@mork.no>
    Link: https://lore.kernel.org/r/20201117173631.GA550981@moc6.cz
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fee64ae8588769514608fc7dfee123a62fad44af
Author: Tariq Toukan <tariqt@nvidia.com>
Date:   Sun Nov 15 15:14:48 2020 +0200

    net/tls: Fix wrong record sn in async mode of device resync
    
    [ Upstream commit 138559b9f99d3b6b1d5e75c78facc067a23871c6 ]
    
    In async_resync mode, we log the TCP seq of records until the async request
    is completed.  Later, in case one of the logged seqs matches the resync
    request, we return it, together with its record serial number.  Before this
    fix, we mistakenly returned the serial number of the current record
    instead.
    
    Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync")
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Boris Pismenny <borisp@nvidia.com>
    Link: https://lore.kernel.org/r/20201115131448.2702-1-tariqt@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1cf7215bf761316597375bf45174db216baed570
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Fri Nov 13 19:16:57 2020 +0100

    net: mvneta: fix possible memory leak in mvneta_swbm_add_rx_fragment
    
    [ Upstream commit 9c79a8ab5f124db01eb1d7287454a702f0d4252f ]
    
    Recycle the page running page_pool_put_full_page() in
    mvneta_swbm_add_rx_fragment routine when the last descriptor
    contains just the FCS or if the received packet contains more than
    MAX_SKB_FRAGS fragments
    
    Fixes: ca0e014609f0 ("net: mvneta: move skb build after descriptors processing")
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Link: https://lore.kernel.org/r/df6a2bad70323ee58d3901491ada31c1ca2a40b9.1605291228.git.lorenzo@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 94a883bf2b947061b2ccd5310b1e5c01766f1517
Author: Michael Chan <michael.chan@broadcom.com>
Date:   Sun Nov 15 19:27:50 2020 -0500

    bnxt_en: Free port stats during firmware reset.
    
    [ Upstream commit eba93de6d31c1734dee59909020a162de612e41e ]
    
    Firmware is unable to retain the port counters during any kind of
    fatal or non-fatal resets, so we must clear the port counters to
    avoid false detection of port counter overflow.
    
    Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.")
    Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
    Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 483c96993db2d47fc97d1025de1c5e3925e1b4eb
Author: Michael Chan <michael.chan@broadcom.com>
Date:   Sun Nov 15 19:27:51 2020 -0500

    bnxt_en: Fix counter overflow logic.
    
    [ Upstream commit fa97f303fa4cf8469fd3d1ef29da69c0a3f6ddc8 ]
    
    bnxt_add_one_ctr() adds a hardware counter to a software counter and
    adjusts for the hardware counter wraparound against the mask.  The logic
    assumes that the hardware counter is always smaller than or equal to
    the mask.
    
    This assumption is mostly correct.  But in some cases if the firmware
    is older and does not provide the accurate mask, the driver can use
    a mask that is smaller than the actual hardware mask.  This can cause
    some extra carry bits to be added to the software counter, resulting in
    counters that far exceed the actual value.  Fix it by masking the
    hardware counter with the mask passed into bnxt_add_one_ctr().
    
    Fixes: fea6b3335527 ("bnxt_en: Accumulate all counters.")
    Reviewed-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
    Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
    Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ca5bbd0fdd36e0430d7e5b79e0a68d5065ee0e53
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Tue Nov 10 17:29:33 2020 +0800

    net: fec: Fix reference count leak in fec series ops
    
    [ Upstream commit da875fa5040b0f951cb4bf7efbf59f6dcff44d3c ]
    
    pm_runtime_get_sync() will increment pm usage at first and it will
    resume the device later. If runtime of the device has error or
    device is in inaccessible state(or other error state), resume
    operation will fail. If we do not call put operation to decrease
    the reference, it will result in reference count leak. Moreover,
    this device cannot enter the idle state and always stay busy or other
    non-idle state later. So we fixed it by replacing it with
    pm_runtime_resume_and_get.
    
    Fixes: 8fff755e9f8d0 ("net: fec: Ensure clocks are enabled while using mdio bus")
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 535a1c43fdf5d568e24a497094df835844e79fcd
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Tue Nov 10 17:29:32 2020 +0800

    PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter
    
    [ Upstream commit dd8088d5a8969dc2b42f71d7bc01c25c61a78066 ]
    
    In many case, we need to check return value of pm_runtime_get_sync, but
    it brings a trouble to the usage counter processing. Many callers forget
    to decrease the usage counter when it failed, which could resulted in
    reference leak. It has been discussed a lot[0][1]. So we add a function
    to deal with the usage counter for better coding.
    
    [0]https://lkml.org/lkml/2020/6/14/88
    [1]https://patchwork.ozlabs.org/project/linux-tegra/list/?series=178139
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Acked-by: Rafael J. Wysocki  <rafael.j.wysocki@intel.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b3f20de9e26e6ae94cee1391bab7da7db36e1d00
Author: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Date:   Wed Oct 21 11:05:41 2020 +0300

    net/mlx5: Disable QoS when min_rates on all VFs are zero
    
    [ Upstream commit 470b74758260e4abc2508cf1614573c00a00465c ]
    
    Currently when QoS is enabled for VF and any min_rate is configured,
    the driver sets bw_share value to at least 1 and doesn’t allow to set
    it to 0 to make minimal rate unlimited. It means there is always a
    minimal rate configured for every VF, even if user tries to remove it.
    
    In order to make QoS disable possible, check whether all vports have
    configured min_rate = 0. If this is true, set their bw_share to 0 to
    disable min_rate limitations.
    
    Fixes: c9497c98901c ("net/mlx5: Add support for setting VF min rate")
    Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f364bc9d6c3eee7e0937879d70d0b6b6e36d5321
Author: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Date:   Mon Nov 2 13:45:24 2020 +0200

    net/mlx5: Clear bw_share upon VF disable
    
    [ Upstream commit 1ce5fc724a26e0b476e42c5d588bdb80caea003b ]
    
    Currently, if user disables VFs with some min and max rates configured,
    they are cleared. But QoS data is not cleared and restored upon next VF
    enable placing limits on minimal rate for given VF, when user expects
    none.
    
    To match cleared vport->info struct with QoS-related min and max rates
    upon VF disable, clear vport->qos struct too.
    
    Fixes: 556b9d16d3f5 ("net/mlx5: Clear VF's configuration on disabling SRIOV")
    Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2ddf5cd3d6acc9efda3f453983c643aa00635f83
Author: Michael Guralnik <michaelgur@nvidia.com>
Date:   Mon Nov 2 17:34:44 2020 +0200

    net/mlx5: Add handling of port type in rule deletion
    
    [ Upstream commit 8cbcc5ef2a281f6bb10099f4572a08cb765ffbf4 ]
    
    Handle destruction of rules with port destination type to enable
    full destruction of flow.
    
    Without this handling of TX rules the deletion of these rules fails.
    Dmesg of flow destruction failure:
    
    [  203.714146] mlx5_core 0000:00:0b.0: mlx5_cmd_check:753:(pid 342): SET_FLOW_TABLE_ENTRY(0x936) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x144b7a)
    [  210.547387] ------------[ cut here ]------------
    [  210.548663] refcount_t: decrement hit 0; leaking memory.
    [  210.550651] WARNING: CPU: 4 PID: 342 at lib/refcount.c:31 refcount_warn_saturate+0x5c/0x110
    [  210.550654] Modules linked in: mlx5_ib mlx5_core ib_ipoib rdma_ucm rdma_cm iw_cm ib_cm ib_umad ib_uverbs ib_core
    [  210.550675] CPU: 4 PID: 342 Comm: test Not tainted 5.8.0-rc2+ #116
    [  210.550678] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
    [  210.550680] RIP: 0010:refcount_warn_saturate+0x5c/0x110
    [  210.550685] Code: c6 d1 1b 01 00 0f 84 ad 00 00 00 5b 5d c3 80 3d b5 d1 1b 01 00 75 f4 48 c7 c7 20 d1 15 82 c6 05 a5 d1 1b 01 01 e8 a7 eb af ff <0f> 0b eb dd 80 3d 99 d1 1b 01 00 75 d4 48 c7 c7 c0 cf 15 82 c6 05
    [  210.550687] RSP: 0018:ffff8881642e77e8 EFLAGS: 00010282
    [  210.550691] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000
    [  210.550694] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffffed102c85ceef
    [  210.550696] RBP: ffff888161720428 R08: ffffffff8124c10e R09: ffffed103243beae
    [  210.550698] R10: ffff8881921df56b R11: ffffed103243bead R12: ffff8881841b4180
    [  210.550701] R13: ffff888161720428 R14: ffff8881616d0000 R15: ffff888161720380
    [  210.550704] FS:  00007fc27f025740(0000) GS:ffff888192000000(0000) knlGS:0000000000000000
    [  210.550706] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  210.550708] CR2: 0000557e4b41a6a0 CR3: 0000000002415004 CR4: 0000000000360ea0
    [  210.550711] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  210.550713] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [  210.550715] Call Trace:
    [  210.550717]  mlx5_del_flow_rules+0x484/0x490 [mlx5_core]
    [  210.550720]  ? mlx5_cmd_set_fte+0xa80/0xa80 [mlx5_core]
    [  210.550722]  mlx5_ib_destroy_flow+0x17f/0x280 [mlx5_ib]
    [  210.550724]  uverbs_free_flow+0x4c/0x90 [ib_uverbs]
    [  210.550726]  destroy_hw_idr_uobject+0x41/0xb0 [ib_uverbs]
    [  210.550728]  uverbs_destroy_uobject+0xaa/0x390 [ib_uverbs]
    [  210.550731]  __uverbs_cleanup_ufile+0x129/0x1b0 [ib_uverbs]
    [  210.550733]  ? uverbs_destroy_uobject+0x390/0x390 [ib_uverbs]
    [  210.550735]  uverbs_destroy_ufile_hw+0x78/0x190 [ib_uverbs]
    [  210.550737]  ib_uverbs_close+0x36/0x140 [ib_uverbs]
    [  210.550739]  __fput+0x181/0x380
    [  210.550741]  task_work_run+0x88/0xd0
    [  210.550743]  do_exit+0x5f6/0x13b0
    [  210.550745]  ? sched_clock_cpu+0x30/0x140
    [  210.550747]  ? is_current_pgrp_orphaned+0x70/0x70
    [  210.550750]  ? lock_downgrade+0x360/0x360
    [  210.550752]  ? mark_held_locks+0x1d/0x90
    [  210.550754]  do_group_exit+0x8a/0x140
    [  210.550756]  get_signal+0x20a/0xf50
    [  210.550758]  do_signal+0x8c/0xbe0
    [  210.550760]  ? hrtimer_nanosleep+0x1d8/0x200
    [  210.550762]  ? nanosleep_copyout+0x50/0x50
    [  210.550764]  ? restore_sigcontext+0x320/0x320
    [  210.550766]  ? __hrtimer_init+0xf0/0xf0
    [  210.550768]  ? timespec64_add_safe+0x150/0x150
    [  210.550770]  ? mark_held_locks+0x1d/0x90
    [  210.550772]  ? lockdep_hardirqs_on_prepare+0x14c/0x240
    [  210.550774]  __prepare_exit_to_usermode+0x119/0x170
    [  210.550776]  do_syscall_64+0x65/0x300
    [  210.550778]  ? trace_hardirqs_off+0x10/0x120
    [  210.550781]  ? mark_held_locks+0x1d/0x90
    [  210.550783]  ? asm_sysvec_apic_timer_interrupt+0xa/0x20
    [  210.550785]  ? lockdep_hardirqs_on+0x112/0x190
    [  210.550787]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [  210.550789] RIP: 0033:0x7fc27f1cd157
    [  210.550791] Code: Bad RIP value.
    [  210.550793] RSP: 002b:00007ffd4db27ea8 EFLAGS: 00000246 ORIG_RAX: 0000000000000023
    [  210.550798] RAX: fffffffffffffdfc RBX: ffffffffffffff80 RCX: 00007fc27f1cd157
    [  210.550800] RDX: 00007fc27f025740 RSI: 00007ffd4db27eb0 RDI: 00007ffd4db27eb0
    [  210.550803] RBP: 0000000000000016 R08: 0000000000000000 R09: 000000000000000e
    [  210.550805] R10: 00007ffd4db27dc7 R11: 0000000000000246 R12: 0000000000400c00
    [  210.550808] R13: 00007ffd4db285f0 R14: 0000000000000000 R15: 0000000000000000
    [  210.550809] irq event stamp: 49399
    [  210.550812] hardirqs last  enabled at (49399): [<ffffffff81172d36>] console_unlock+0x556/0x6f0
    [  210.550815] hardirqs last disabled at (49398): [<ffffffff81172897>] console_unlock+0xb7/0x6f0
    [  210.550818] softirqs last  enabled at (48706): [<ffffffff81e0037b>] __do_softirq+0x37b/0x60c
    [  210.550820] softirqs last disabled at (48697): [<ffffffff81c00e2f>] asm_call_on_stack+0xf/0x20
    [  210.550822] ---[ end trace ad18c0e6fa846454 ]---
    [  210.581862] mlx5_core 0000:00:0c.0: mlx5_destroy_flow_table:2132:(pid 342): Flow table 262150 wasn't destroyed, refcount > 1
    
    Fixes: a7ee18bdee83 ("RDMA/mlx5: Allow creating a matcher for a NIC TX flow table")
    Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
    Reviewed-by: Mark Bloch <mbloch@nvidia.com>
    Reviewed-by: Maor Gottlieb <maorg@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2d09b8116ebd656b0a685ad4d21c1d199193fe64
Author: Maor Dickman <maord@nvidia.com>
Date:   Wed Nov 4 14:10:30 2020 +0200

    net/mlx5e: Fix check if netdev is bond slave
    
    [ Upstream commit 219b3267ca102a35092f5998921a9e6f99074af2 ]
    
    Bond events handler uses bond_slave_get_rtnl to check if net device
    is bond slave. bond_slave_get_rtnl return the rcu rx_handler pointer
    from the netdev which exists for bond slaves but also exists for
    devices that are attached to linux bridge so using it as indication
    for bond slave is wrong.
    
    Fix by using netif_is_lag_port instead.
    
    Fixes: 7e51891a237f ("net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule")
    Signed-off-by: Maor Dickman <maord@nvidia.com>
    Reviewed-by: Raed Salem <raeds@nvidia.com>
    Reviewed-by: Ariel Levkovich <lariel@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f0fe498b86acb41f686294958b38dc26122d6d0f
Author: Stefano Garzarella <sgarzare@redhat.com>
Date:   Thu Nov 12 14:38:37 2020 +0100

    vsock: forward all packets to the host when no H2G is registered
    
    [ Upstream commit 65b422d9b61ba12c08150784e8012fa1892ad03e ]
    
    Before commit c0cfa2d8a788 ("vsock: add multi-transports support"),
    if a G2H transport was loaded (e.g. virtio transport), every packets
    was forwarded to the host, regardless of the destination CID.
    The H2G transports implemented until then (vhost-vsock, VMCI) always
    responded with an error, if the destination CID was not
    VMADDR_CID_HOST.
    
    >From that commit, we are using the remote CID to decide which
    transport to use, so packets with remote CID > VMADDR_CID_HOST(2)
    are sent only through H2G transport. If no H2G is available, packets
    are discarded directly in the guest.
    
    Some use cases (e.g. Nitro Enclaves [1]) rely on the old behaviour
    to implement sibling VMs communication, so we restore the old
    behavior when no H2G is registered.
    It will be up to the host to discard packets if the destination is
    not the right one. As it was already implemented before adding
    multi-transport support.
    
    Tested with nested QEMU/KVM by me and Nitro Enclaves by Andra.
    
    [1] Documentation/virt/ne_overview.rst
    
    Cc: Jorgen Hansen <jhansen@vmware.com>
    Cc: Dexuan Cui <decui@microsoft.com>
    Fixes: c0cfa2d8a788 ("vsock: add multi-transports support")
    Reported-by: Andra Paraschiv <andraprs@amazon.com>
    Tested-by: Andra Paraschiv <andraprs@amazon.com>
    Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
    Link: https://lore.kernel.org/r/20201112133837.34183-1-sgarzare@redhat.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 354eaccbeb62336adde2a15fd177b02fed99d39f
Author: Ryan Sharpelletti <sharpelletti@google.com>
Date:   Mon Nov 16 17:44:13 2020 +0000

    tcp: only postpone PROBE_RTT if RTT is < current min_rtt estimate
    
    [ Upstream commit 1b9e2a8c99a5c021041bfb2d512dc3ed92a94ffd ]
    
    During loss recovery, retransmitted packets are forced to use TCP
    timestamps to calculate the RTT samples, which have a millisecond
    granularity. BBR is designed using a microsecond granularity. As a
    result, multiple RTT samples could be truncated to the same RTT value
    during loss recovery. This is problematic, as BBR will not enter
    PROBE_RTT if the RTT sample is <= the current min_rtt sample, meaning
    that if there are persistent losses, PROBE_RTT will constantly be
    pushed off and potentially never re-entered. This patch makes sure
    that BBR enters PROBE_RTT by checking if RTT sample is < the current
    min_rtt sample, rather than <=.
    
    The Netflix transport/TCP team discovered this bug in the Linux TCP
    BBR code during lab tests.
    
    Fixes: 0f8782ea1497 ("tcp_bbr: add BBR congestion control")
    Signed-off-by: Ryan Sharpelletti <sharpelletti@google.com>
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
    Signed-off-by: Yuchung Cheng <ycheng@google.com>
    Link: https://lore.kernel.org/r/20201116174412.1433277-1-sharpelletti.kdev@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 829e34170dfcc4edcaff319790dc90b0a055ec53
Author: Xin Long <lucien.xin@gmail.com>
Date:   Sat Nov 14 13:22:53 2020 +0800

    sctp: change to hold/put transport for proto_unreach_timer
    
    [ Upstream commit 057a10fa1f73d745c8e69aa54ab147715f5630ae ]
    
    A call trace was found in Hangbin's Codenomicon testing with debug kernel:
    
      [ 2615.981988] ODEBUG: free active (active state 0) object type: timer_list hint: sctp_generate_proto_unreach_event+0x0/0x3a0 [sctp]
      [ 2615.995050] WARNING: CPU: 17 PID: 0 at lib/debugobjects.c:328 debug_print_object+0x199/0x2b0
      [ 2616.095934] RIP: 0010:debug_print_object+0x199/0x2b0
      [ 2616.191533] Call Trace:
      [ 2616.194265]  <IRQ>
      [ 2616.202068]  debug_check_no_obj_freed+0x25e/0x3f0
      [ 2616.207336]  slab_free_freelist_hook+0xeb/0x140
      [ 2616.220971]  kfree+0xd6/0x2c0
      [ 2616.224293]  rcu_do_batch+0x3bd/0xc70
      [ 2616.243096]  rcu_core+0x8b9/0xd00
      [ 2616.256065]  __do_softirq+0x23d/0xacd
      [ 2616.260166]  irq_exit+0x236/0x2a0
      [ 2616.263879]  smp_apic_timer_interrupt+0x18d/0x620
      [ 2616.269138]  apic_timer_interrupt+0xf/0x20
      [ 2616.273711]  </IRQ>
    
    This is because it holds asoc when transport->proto_unreach_timer starts
    and puts asoc when the timer stops, and without holding transport the
    transport could be freed when the timer is still running.
    
    So fix it by holding/putting transport instead for proto_unreach_timer
    in transport, just like other timers in transport.
    
    v1->v2:
      - Also use sctp_transport_put() for the "out_unlock:" path in
        sctp_generate_proto_unreach_event(), as Marcelo noticed.
    
    Fixes: 50b5d6ad6382 ("sctp: Fix a race between ICMP protocol unreachable and connect()")
    Reported-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Link: https://lore.kernel.org/r/102788809b554958b13b95d33440f5448113b8d6.1605331373.git.lucien.xin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 01b67f83e29d5644a7a47cf0d8824307ba0a4883
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Fri Nov 13 14:16:26 2020 +0800

    qlcnic: fix error return code in qlcnic_83xx_restart_hw()
    
    [ Upstream commit 3beb9be165083c2964eba1923601c3bfac0b02d4 ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 3ced0a88cd4c ("qlcnic: Add support to run firmware POST")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Link: https://lore.kernel.org/r/1605248186-16013-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9495a88e2468c1d0d702809025cf19baf104463a
Author: Dmitry Bogdanov <dbogdanov@marvell.com>
Date:   Mon Nov 16 16:29:44 2020 +0300

    qed: fix ILT configuration of SRC block
    
    [ Upstream commit 93be52612431e71ee8cb980ef11468997857e4c4 ]
    
    The code refactoring of ILT configuration was not complete, the old
    unused variables were used for the SRC block. That could lead to the memory
    corruption by HW when rx filters are configured.
    This patch completes that refactoring.
    
    Fixes: 8a52bbab39c9 (qed: Debug feature: ilt and mdump)
    Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
    Signed-off-by: Ariel Elior <aelior@marvell.com>
    Signed-off-by: Dmitry Bogdanov <dbogdanov@marvell.com>
    Link: https://lore.kernel.org/r/20201116132944.2055-1-dbogdanov@marvell.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4cc7d98f4e22a517a955cb536cd18df76e4e5f03
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Mon Nov 16 21:07:13 2020 +0800

    qed: fix error return code in qed_iwarp_ll2_start()
    
    [ Upstream commit cb47d16ea21045c66eebbf5ed792e74a8537e27a ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 469981b17a4f ("qed: Add unaligned and packed packet processing")
    Fixes: fcb39f6c10b2 ("qed: Add mpa buffer descriptors for storing and processing mpa fpdus")
    Fixes: 1e28eaad07ea ("qed: Add iWARP support for fpdu spanned over more than two tcp packets")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
    Link: https://lore.kernel.org/r/1605532033-27373-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 50c327e98223c9d114b00216fca8ece8c42d3f97
Author: Dongli Zhang <dongli.zhang@oracle.com>
Date:   Sun Nov 15 12:10:29 2020 -0800

    page_frag: Recover from memory pressure
    
    [ Upstream commit d8c19014bba8f565d8a2f1f46b4e38d1d97bf1a7 ]
    
    The ethernet driver may allocate skb (and skb->data) via napi_alloc_skb().
    This ends up to page_frag_alloc() to allocate skb->data from
    page_frag_cache->va.
    
    During the memory pressure, page_frag_cache->va may be allocated as
    pfmemalloc page. As a result, the skb->pfmemalloc is always true as
    skb->data is from page_frag_cache->va. The skb will be dropped if the
    sock (receiver) does not have SOCK_MEMALLOC. This is expected behaviour
    under memory pressure.
    
    However, once kernel is not under memory pressure any longer (suppose large
    amount of memory pages are just reclaimed), the page_frag_alloc() may still
    re-use the prior pfmemalloc page_frag_cache->va to allocate skb->data. As a
    result, the skb->pfmemalloc is always true unless page_frag_cache->va is
    re-allocated, even if the kernel is not under memory pressure any longer.
    
    Here is how kernel runs into issue.
    
    1. The kernel is under memory pressure and allocation of
    PAGE_FRAG_CACHE_MAX_ORDER in __page_frag_cache_refill() will fail. Instead,
    the pfmemalloc page is allocated for page_frag_cache->va.
    
    2: All skb->data from page_frag_cache->va (pfmemalloc) will have
    skb->pfmemalloc=true. The skb will always be dropped by sock without
    SOCK_MEMALLOC. This is an expected behaviour.
    
    3. Suppose a large amount of pages are reclaimed and kernel is not under
    memory pressure any longer. We expect skb->pfmemalloc drop will not happen.
    
    4. Unfortunately, page_frag_alloc() does not proactively re-allocate
    page_frag_alloc->va and will always re-use the prior pfmemalloc page. The
    skb->pfmemalloc is always true even kernel is not under memory pressure any
    longer.
    
    Fix this by freeing and re-allocating the page instead of recycling it.
    
    References: https://lore.kernel.org/lkml/20201103193239.1807-1-dongli.zhang@oracle.com/
    References: https://lore.kernel.org/linux-mm/20201105042140.5253-1-willy@infradead.org/
    Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
    Cc: Bert Barbe <bert.barbe@oracle.com>
    Cc: Rama Nichanamatlu <rama.nichanamatlu@oracle.com>
    Cc: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
    Cc: Manjunath Patil <manjunath.b.patil@oracle.com>
    Cc: Joe Jin <joe.jin@oracle.com>
    Cc: SRINIVAS <srinivas.eeda@oracle.com>
    Fixes: 79930f5892e1 ("net: do not deplete pfmemalloc reserve")
    Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Reviewed-by: Eric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/r/20201115201029.11903-1-dongli.zhang@oracle.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0d11adfe27a2d5f8fdde7365492a4e92af3c089e
Author: Xie He <xie.he.0141@gmail.com>
Date:   Thu Nov 12 02:35:06 2020 -0800

    net: x25: Increase refcnt of "struct x25_neigh" in x25_rx_call_request
    
    [ Upstream commit 4ee18c179e5e815fa5575e0d2db0c05795a804ee ]
    
    The x25_disconnect function in x25_subr.c would decrease the refcount of
    "x25->neighbour" (struct x25_neigh) and reset this pointer to NULL.
    
    However, the x25_rx_call_request function in af_x25.c, which is called
    when we receive a connection request, does not increase the refcount when
    it assigns the pointer.
    
    Fix this issue by increasing the refcount of "struct x25_neigh" in
    x25_rx_call_request.
    
    This patch fixes frequent kernel crashes when using AF_X25 sockets.
    
    Fixes: 4becb7ee5b3d ("net/x25: Fix x25_neigh refcnt leak when x25 disconnect")
    Cc: Martin Schiller <ms@dev.tdt.de>
    Signed-off-by: Xie He <xie.he.0141@gmail.com>
    Link: https://lore.kernel.org/r/20201112103506.5875-1-xie.he.0141@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8b380dd55e9d566d2a6eee92b29ee8f94c636693
Author: Vadim Fedorenko <vfedorenko@novek.ru>
Date:   Sun Nov 15 07:16:00 2020 +0300

    net/tls: fix corrupted data in recvmsg
    
    [ Upstream commit 3fe16edf6767decd640fa2654308bc64f8d656dc ]
    
    If tcp socket has more data than Encrypted Handshake Message then
    tls_sw_recvmsg will try to decrypt next record instead of returning
    full control message to userspace as mentioned in comment. The next
    message - usually Application Data - gets corrupted because it uses
    zero copy for decryption that's why the data is not stored in skb
    for next iteration. Revert check to not decrypt next record if
    current is not Application Data.
    
    Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Link: https://lore.kernel.org/r/1605413760-21153-1-git-send-email-vfedorenko@novek.ru
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 108cb4f9ea7da7f153d65e7c7409f47aa9855f93
Author: Wong Vee Khee <vee.khee.wong@intel.com>
Date:   Sun Nov 15 15:42:10 2020 +0800

    net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call
    
    [ Upstream commit 8e5debed39017836a850c6c7bfacc93299d19bad ]
    
    Fix an issue where dump stack is printed on suspend resume flow due to
    netif_set_real_num_rx_queues() is not called with rtnl_lock held().
    
    Fixes: 686cff3d7022 ("net: stmmac: Fix incorrect location to set real_num_rx|tx_queues")
    Reported-by: Christophe ROULLIER <christophe.roullier@st.com>
    Tested-by: Christophe ROULLIER <christophe.roullier@st.com>
    Cc: Alexandre TORGUE <alexandre.torgue@st.com>
    Reviewed-by: Ong Boon Leong <boon.leong.ong@intel.com>
    Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
    Link: https://lore.kernel.org/r/20201115074210.23605-1-vee.khee.wong@intel.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 73259755c662c4b6815927904a18049534dae40e
Author: Karsten Graul <kgraul@linux.ibm.com>
Date:   Wed Nov 18 22:40:38 2020 +0100

    net/smc: fix direct access to ib_gid_addr->ndev in smc_ib_determine_gid()
    
    [ Upstream commit 41a0be3f8f6be893860b991eb10c47fc3ee09d7f ]
    
    Sparse complaints 3 times about:
    net/smc/smc_ib.c:203:52: warning: incorrect type in argument 1 (different address spaces)
    net/smc/smc_ib.c:203:52:    expected struct net_device const *dev
    net/smc/smc_ib.c:203:52:    got struct net_device [noderef] __rcu *const ndev
    
    Fix that by using the existing and validated ndev variable instead of
    accessing attr->ndev directly.
    
    Fixes: 5102eca9039b ("net/smc: Use rdma_read_gid_l2_fields to L2 fields")
    Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9e0739721d4782adb90fb63cbcb06edf0c47593b
Author: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Date:   Fri Nov 13 13:12:05 2020 -0700

    net: qualcomm: rmnet: Fix incorrect receive packet handling during cleanup
    
    [ Upstream commit fc70f5bf5e525dde81565f0a30d5e39168062eba ]
    
    During rmnet unregistration, the real device rx_handler is first cleared
    followed by the removal of rx_handler_data after the rcu synchronization.
    
    Any packets in the receive path may observe that the rx_handler is NULL.
    However, there is no check when dereferencing this value to use the
    rmnet_port information.
    
    This fixes following splat by adding the NULL check.
    
    Unable to handle kernel NULL pointer dereference at virtual
    address 000000000000000d
    pc : rmnet_rx_handler+0x124/0x284
    lr : rmnet_rx_handler+0x124/0x284
     rmnet_rx_handler+0x124/0x284
     __netif_receive_skb_core+0x758/0xd74
     __netif_receive_skb+0x50/0x17c
     process_backlog+0x15c/0x1b8
     napi_poll+0x88/0x284
     net_rx_action+0xbc/0x23c
     __do_softirq+0x20c/0x48c
    
    Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation")
    Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
    Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
    Link: https://lore.kernel.org/r/1605298325-3705-1-git-send-email-subashab@codeaurora.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 19dc8dc73d245196c4355718e47431922fae8bb3
Author: Steen Hegelund <steen.hegelund@microchip.com>
Date:   Fri Nov 13 10:11:16 2020 +0100

    net: phy: mscc: remove non-MACSec compatible phy
    
    [ Upstream commit aa6306a8481e0223f3783d24045daea80897238e ]
    
    Selecting VSC8575 as a MACSec PHY was not correct
    
    The relevant datasheet can be found here:
      - VSC8575: https://www.microchip.com/wwwproducts/en/VSC8575
    
    History:
    v1 -> v2:
       - Corrected the sha in the "Fixes:" tag
    
    Fixes: 1bbe0ecc2a1a ("net: phy: mscc: macsec initialization")
    Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
    Reviewed-by: Antoine Tenart <atenart@kernel.org>
    Link: https://lore.kernel.org/r/20201113091116.1102450-1-steen.hegelund@microchip.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 408bdb28880609526f1af7fa4befd21580a91500
Author: Joel Stanley <joel@jms.id.au>
Date:   Thu Nov 12 16:42:10 2020 +1030

    net/ncsi: Fix netlink registration
    
    [ Upstream commit 1922a46b8c18cb09d33e06a6cc2e43844ac1b9d0 ]
    
    If a user unbinds and re-binds a NC-SI aware driver the kernel will
    attempt to register the netlink interface at runtime. The structure is
    marked __ro_after_init so registration fails spectacularly at this point.
    
     # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind
     # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/bind
      ftgmac100 1e660000.ethernet: Read MAC address 52:54:00:12:34:56 from chip
      ftgmac100 1e660000.ethernet: Using NCSI interface
      8<--- cut here ---
      Unable to handle kernel paging request at virtual address 80a8f858
      pgd = 8c768dd6
      [80a8f858] *pgd=80a0841e(bad)
      Internal error: Oops: 80d [#1] SMP ARM
      CPU: 0 PID: 116 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00003-gdd25b227ec1e #51
      Hardware name: Generic DT based system
      PC is at genl_register_family+0x1f8/0x6d4
      LR is at 0xff26ffff
      pc : [<8073f930>]    lr : [<ff26ffff>]    psr: 20000153
      sp : 8553bc80  ip : 81406244  fp : 8553bd04
      r10: 8085d12c  r9 : 80a8f73c  r8 : 85739000
      r7 : 00000017  r6 : 80a8f860  r5 : 80c8ab98  r4 : 80a8f858
      r3 : 00000000  r2 : 00000000  r1 : 81406130  r0 : 00000017
      Flags: nzCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
      Control: 00c5387d  Table: 85524008  DAC: 00000051
      Process sh (pid: 116, stack limit = 0x1f1988d6)
     ...
      Backtrace:
      [<8073f738>] (genl_register_family) from [<80860ac0>] (ncsi_init_netlink+0x20/0x48)
       r10:8085d12c r9:80c8fb0c r8:85739000 r7:00000000 r6:81218000 r5:85739000
       r4:8121c000
      [<80860aa0>] (ncsi_init_netlink) from [<8085d740>] (ncsi_register_dev+0x1b0/0x210)
       r5:8121c400 r4:8121c000
      [<8085d590>] (ncsi_register_dev) from [<805a8060>] (ftgmac100_probe+0x6e0/0x778)
       r10:00000004 r9:80950228 r8:8115bc10 r7:8115ab00 r6:9eae2c24 r5:813b6f88
       r4:85739000
      [<805a7980>] (ftgmac100_probe) from [<805355ec>] (platform_drv_probe+0x58/0xa8)
       r9:80c76bb0 r8:00000000 r7:80cd4974 r6:80c76bb0 r5:8115bc10 r4:00000000
      [<80535594>] (platform_drv_probe) from [<80532d58>] (really_probe+0x204/0x514)
       r7:80cd4974 r6:00000000 r5:80cd4868 r4:8115bc10
    
    Jakub pointed out that ncsi_register_dev is obviously broken, because
    there is only one family so it would never work if there was more than
    one ncsi netdev.
    
    Fix the crash by registering the netlink family once on boot, and drop
    the code to unregister it.
    
    Fixes: 955dc68cb9b2 ("net/ncsi: Add generic netlink family")
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
    Link: https://lore.kernel.org/r/20201112061210.914621-1-joel@jms.id.au
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit da4917b586bc5d6d826df7edee2ed92b73eed53f
Author: Maxim Mikityanskiy <maximmi@mellanox.com>
Date:   Thu Oct 8 12:34:10 2020 +0300

    net/mlx5e: Fix refcount leak on kTLS RX resync
    
    [ Upstream commit ea63609857321c38fd4ad096388b413b66001c6c ]
    
    On resync, the driver calls inet_lookup_established
    (__inet6_lookup_established) that increases sk_refcnt of the socket. To
    decrease it, the driver set skb->destructor to sock_edemux. However, it
    didn't work well, because the TCP stack also sets this destructor for
    early demux, and the refcount gets decreased only once, while increased
    two times (in mlx5e and in the TCP stack). It leads to a socket leak, a
    TLS context leak, which in the end leads to calling tls_dev_del twice:
    on socket close and on driver unload, which in turn leads to a crash.
    
    This commit fixes the refcount leak by calling sock_gen_put right away
    after using the socket, thus fixing all the subsequent issues.
    
    Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support")
    Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 438a5b5a3c00fda276eb3486b27359c23a55ce8a
Author: Aya Levin <ayal@nvidia.com>
Date:   Wed Nov 18 10:19:22 2020 +0200

    net/mlx4_core: Fix init_hca fields offset
    
    [ Upstream commit 6d9c8d15af0ef20a66a0b432cac0d08319920602 ]
    
    Slave function read the following capabilities from the wrong offset:
    1. log_mc_entry_sz
    2. fs_log_entry_sz
    3. log_mc_hash_sz
    
    Fix that by adjusting these capabilities offset to match firmware
    layout.
    
    Due to the wrong offset read, the following issues might occur:
    1+2. Negative value reported at max_mcast_qp_attach.
    3. Driver to init FW with multicast hash size of zero.
    
    Fixes: a40ded604365 ("net/mlx4_core: Add masking for a few queries on HCA caps")
    Signed-off-by: Aya Levin <ayal@nvidia.com>
    Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com>
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Link: https://lore.kernel.org/r/20201118081922.553-1-tariqt@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ac562d23790961135aab8e546714940cbfacfee9
Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date:   Sun Nov 15 17:57:57 2020 +0100

    net: lantiq: Wait for the GPHY firmware to be ready
    
    [ Upstream commit 2a1828e378c1b5ba1ff283ed8f8c5cc37bb391dc ]
    
    A user reports (slightly shortened from the original message):
      libphy: lantiq,xrx200-mdio: probed
      mdio_bus 1e108000.switch-mii: MDIO device at address 17 is missing.
      gswip 1e108000.switch lan: no phy at 2
      gswip 1e108000.switch lan: failed to connect to port 2: -19
      lantiq,xrx200-net 1e10b308.eth eth0: error -19 setting up slave phy
    
    This is a single-port board using the internal Fast Ethernet PHY. The
    user reports that switching to PHY scanning instead of configuring the
    PHY within device-tree works around this issue.
    
    The documentation for the standalone variant of the PHY11G (which is
    probably very similar to what is used inside the xRX200 SoCs but having
    the firmware burnt onto that standalone chip in the factory) states that
    the PHY needs 300ms to be ready for MDIO communication after releasing
    the reset.
    
    Add a 300ms delay after initializing all GPHYs to ensure that the GPHY
    firmware had enough time to initialize and to appear on the MDIO bus.
    Unfortunately there is no (known) documentation on what the minimum time
    to wait after releasing the reset on an internal PHY so play safe and
    take the one for the external variant. Only wait after the last GPHY
    firmware is loaded to not slow down the initialization too much (
    xRX200 has two GPHYs but newer SoCs have at least three GPHYs).
    
    Fixes: 14fceff4771e51 ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
    Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Link: https://lore.kernel.org/r/20201115165757.552641-1-martin.blumenstingl@googlemail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c22d4f6d097244167140c50f4dcc051f27bcd80b
Author: Paul Moore <paul@paul-moore.com>
Date:   Fri Nov 13 16:30:40 2020 -0500

    netlabel: fix an uninitialized warning in netlbl_unlabel_staticlist()
    
    [ Upstream commit 1ba86d4366e023d96df3dbe415eea7f1dc08c303 ]
    
    Static checking revealed that a previous fix to
    netlbl_unlabel_staticlist() leaves a stack variable uninitialized,
    this patches fixes that.
    
    Fixes: 866358ec331f ("netlabel: fix our progress tracking in netlbl_unlabel_staticlist()")
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Paul Moore <paul@paul-moore.com>
    Reviewed-by: James Morris <jamorris@linux.microsoft.com>
    Link: https://lore.kernel.org/r/160530304068.15651.18355773009751195447.stgit@sifl
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1b1645a2e95145fd3a6db496047c1b8dc99e3da0
Author: Paul Moore <paul@paul-moore.com>
Date:   Sun Nov 8 09:08:26 2020 -0500

    netlabel: fix our progress tracking in netlbl_unlabel_staticlist()
    
    [ Upstream commit 866358ec331f8faa394995fb4b511af1db0247c8 ]
    
    The current NetLabel code doesn't correctly keep track of the netlink
    dump state in some cases, in particular when multiple interfaces with
    large configurations are loaded.  The problem manifests itself by not
    reporting the full configuration to userspace, even though it is
    loaded and active in the kernel.  This patch fixes this by ensuring
    that the dump state is properly reset when necessary inside the
    netlbl_unlabel_staticlist() function.
    
    Fixes: 8cc44579d1bd ("NetLabel: Introduce static network labels for unlabeled connections")
    Signed-off-by: Paul Moore <paul@paul-moore.com>
    Link: https://lore.kernel.org/r/160484450633.3752.16512718263560813473.stgit@sifl
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6fb9f795c4ffca9bf85ade8094cc1233d33fdbc1
Author: Alex Elder <elder@linaro.org>
Date:   Sat Nov 14 12:20:17 2020 -0600

    net: ipa: lock when freeing transaction
    
    [ Upstream commit 064c9c32b17ca9b36f95eba32ee790dbbebd9a5f ]
    
    Transactions sit on one of several lists, depending on their state
    (allocated, pending, complete, or polled).  A spinlock protects
    against concurrent access when transactions are moved between these
    lists.
    
    Transactions are also reference counted.  A newly-allocated
    transaction has an initial count of 1; a transaction is released in
    gsi_trans_free() only if its decremented reference count reaches 0.
    Releasing a transaction includes removing it from the polled (or if
    unused, allocated) list, so the spinlock is acquired when we release
    a transaction.
    
    The reference count is used to allow a caller to synchronously wait
    for a committed transaction to complete.  In this case, the waiter
    takes an extra reference to the transaction *before* committing it
    (so it won't be freed), and releases its reference (calls
    gsi_trans_free()) when it is done with it.
    
    Similarly, gsi_channel_update() takes an extra reference to ensure a
    transaction isn't released before the function is done operating on
    it.  Until the transaction is moved to the completed list (by this
    function) it won't be freed, so this reference is taken "safely."
    
    But in the quiesce path, we want to wait for the "last" transaction,
    which we find in the completed or polled list.  Transactions on
    these lists can be freed at any time, so we (try to) prevent that
    by taking the reference while holding the spinlock.
    
    Currently gsi_trans_free() decrements a transaction's reference
    count unconditionally, acquiring the lock to remove the transaction
    from its list *only* when the count reaches 0.  This does not
    protect the quiesce path, which depends on the lock to ensure its
    extra reference prevents release of the transaction.
    
    Fix this by only dropping the last reference to a transaction
    in gsi_trans_free() while holding the spinlock.
    
    Fixes: 9dd441e4ed575 ("soc: qcom: ipa: GSI transactions")
    Reported-by: Stephen Boyd <swboyd@chromium.org>
    Signed-off-by: Alex Elder <elder@linaro.org>
    Link: https://lore.kernel.org/r/20201114182017.28270-1-elder@linaro.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8a6ba1cdf7dfa1727948e13122d84e18123944be
Author: Florian Fainelli <f.fainelli@gmail.com>
Date:   Mon Nov 16 19:52:34 2020 -0800

    net: Have netpoll bring-up DSA management interface
    
    [ Upstream commit 1532b9778478577152201adbafa7738b1e844868 ]
    
    DSA network devices rely on having their DSA management interface up and
    running otherwise their ndo_open() will return -ENETDOWN. Without doing
    this it would not be possible to use DSA devices as netconsole when
    configured on the command line. These devices also do not utilize the
    upper/lower linking so the check about the netpoll device having upper
    is not going to be a problem.
    
    The solution adopted here is identical to the one done for
    net/ipv4/ipconfig.c with 728c02089a0e ("net: ipv4: handle DSA enabled
    master network devices"), with the network namespace scope being
    restricted to that of the process configuring netpoll.
    
    Fixes: 04ff53f96a93 ("net: dsa: Add netconsole support")
    Tested-by: Vladimir Oltean <olteanv@gmail.com>
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Link: https://lore.kernel.org/r/20201117035236.22658-1-f.fainelli@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 582841c24bf6ca0a9faee386db022940fde87fd6
Author: Joel Stanley <joel@jms.id.au>
Date:   Tue Nov 17 13:14:48 2020 +1030

    net: ftgmac100: Fix crash when removing driver
    
    [ Upstream commit 3d5179458d22dc0b4fdc724e4bed4231a655112a ]
    
    When removing the driver we would hit BUG_ON(!list_empty(&dev->ptype_specific))
    in net/core/dev.c due to still having the NC-SI packet handler
    registered.
    
     # echo 1e660000.ethernet > /sys/bus/platform/drivers/ftgmac100/unbind
      ------------[ cut here ]------------
      kernel BUG at net/core/dev.c:10254!
      Internal error: Oops - BUG: 0 [#1] SMP ARM
      CPU: 0 PID: 115 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00007-g02e0365710c4 #46
      Hardware name: Generic DT based system
      PC is at netdev_run_todo+0x314/0x394
      LR is at cpumask_next+0x20/0x24
      pc : [<806f5830>]    lr : [<80863cb0>]    psr: 80000153
      sp : 855bbd58  ip : 00000001  fp : 855bbdac
      r10: 80c03d00  r9 : 80c06228  r8 : 81158c54
      r7 : 00000000  r6 : 80c05dec  r5 : 80c05d18  r4 : 813b9280
      r3 : 813b9054  r2 : 8122c470  r1 : 00000002  r0 : 00000002
      Flags: Nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
      Control: 00c5387d  Table: 85514008  DAC: 00000051
      Process sh (pid: 115, stack limit = 0x7cb5703d)
     ...
      Backtrace:
      [<806f551c>] (netdev_run_todo) from [<80707eec>] (rtnl_unlock+0x18/0x1c)
       r10:00000051 r9:854ed710 r8:81158c54 r7:80c76bb0 r6:81158c10 r5:8115b410
       r4:813b9000
      [<80707ed4>] (rtnl_unlock) from [<806f5db8>] (unregister_netdev+0x2c/0x30)
      [<806f5d8c>] (unregister_netdev) from [<805a8180>] (ftgmac100_remove+0x20/0xa8)
       r5:8115b410 r4:813b9000
      [<805a8160>] (ftgmac100_remove) from [<805355e4>] (platform_drv_remove+0x34/0x4c)
    
    Fixes: bd466c3fb5a4 ("net/faraday: Support NCSI mode")
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20201117024448.1170761-1-joel@jms.id.au
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b833181ace3ff62ee7e5761ac9756c3f9f0a73b4
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Fri Nov 13 14:49:33 2020 +0800

    net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
    
    [ Upstream commit 35f735c665114840dcd3142f41148d07870f51f7 ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Link: https://lore.kernel.org/r/1605250173-18438-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 53c1c7636434021345e1531c29655757cd496d62
Author: Grygorii Strashko <grygorii.strashko@ti.com>
Date:   Thu Nov 12 13:15:46 2020 +0200

    net: ethernet: ti: cpsw: fix cpts irq after suspend
    
    [ Upstream commit 2b5668733050fca85f0ab458c5b91732f9496a38 ]
    
    Depending on the SoC/platform the CPSW can completely lose context after a
    suspend/resume cycle, including CPSW wrapper (WR) which will cause reset of
    WR_C0_MISC_EN register, so CPTS IRQ will became disabled.
    
    Fix it by moving CPTS IRQ enabling in cpsw_ndo_open() where CPTS is
    actually started.
    
    Fixes: 84ea9c0a95d7 ("net: ethernet: ti: cpsw: enable cpts irq")
    Reported-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
    Tested-by: Tony Lindgren <tony@atomide.com>
    Link: https://lore.kernel.org/r/20201112111546.20343-1-grygorii.strashko@ti.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d23a621f16d584b2923868001f54309011296379
Author: Wang Qing <wangqing@vivo.com>
Date:   Thu Nov 12 18:45:41 2020 +0200

    net: ethernet: ti: am65-cpts: update ret when ptp_clock is ERROR
    
    [ Upstream commit 81e329e93b860b31c216b40eb5e1373db0ffe0ba ]
    
    We always have to update the value of ret, otherwise the
     error value may be the previous one.
    
    Fixes: f6bd59526ca5 ("net: ethernet: ti: introduce am654 common platform time sync driver")
    Signed-off-by: Wang Qing <wangqing@vivo.com>
    [grygorii.strashko@ti.com: fix build warn, subj add fixes tag]
    Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
    Acked-by: Richard Cochran <richardcochran@gmail.com>
    Link: https://lore.kernel.org/r/20201112164541.3223-1-grygorii.strashko@ti.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b9385e27a19d3d3c01e06d75ec8f5b9f0175d045
Author: Vincent Stehlé <vincent.stehle@laposte.net>
Date:   Thu Nov 12 09:48:33 2020 +0100

    net: ethernet: mtk-star-emac: return ok when xmit drops
    
    [ Upstream commit e8aa6d520b448efc88670a98eccd196713639f2f ]
    
    The ndo_start_xmit() method must return NETDEV_TX_OK if the DMA mapping
    fails, after freeing the socket buffer.
    Fix the mtk_star_netdev_start_xmit() function accordingly.
    
    Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
    Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
    Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Link: https://lore.kernel.org/r/20201112084833.21842-1-vincent.stehle@laposte.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1db09394f1af1ded819926fecb62d3735b766ded
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Thu Nov 12 19:34:39 2020 +0800

    net: ethernet: mtk-star-emac: fix error return code in mtk_star_enable()
    
    [ Upstream commit baee1991fad928d6c8dd5be3197ecb413c420c97 ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Link: https://lore.kernel.org/r/1605180879-2573-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9f5458679be294a66516fdcbd238a6f8a0d05ee0
Author: Tobias Waldekranz <tobias@waldekranz.com>
Date:   Thu Nov 12 12:43:35 2020 +0100

    net: dsa: mv88e6xxx: Avoid VTU corruption on 6097
    
    [ Upstream commit 92307069a96c07d9b6e74b96b79390e7cd7d2111 ]
    
    As soon as you add the second port to a VLAN, all other port
    membership configuration is overwritten with zeroes. The HW interprets
    this as all ports being "unmodified members" of the VLAN.
    
    In the simple case when all ports belong to the same VLAN, switching
    will still work. But using multiple VLANs or trying to set multiple
    ports as tagged members will not work.
    
    On the 6352, doing a VTU GetNext op, followed by an STU GetNext op
    will leave you with both the member- and state- data in the VTU/STU
    data registers. But on the 6097 (which uses the same implementation),
    the STU GetNext will override the information gathered from the VTU
    GetNext.
    
    Separate the two stages, parsing the result of the VTU GetNext before
    doing the STU GetNext.
    
    We opt to update the existing implementation for all applicable chips,
    as opposed to creating a separate callback for 6097, because although
    the previous implementation did work for (at least) 6352, the
    datasheet does not mention the masking behavior.
    
    Fixes: ef6fcea37f01 ("net: dsa: mv88e6xxx: get STU entry on VTU GetNext")
    Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
    Link: https://lore.kernel.org/r/20201112114335.27371-1-tobias@waldekranz.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e141fff2c5df19263c85d94d33af0c398210ac51
Author: Taehee Yoo <ap420073@gmail.com>
Date:   Sun Nov 15 10:30:41 2020 +0000

    netdevsim: set .owner to THIS_MODULE
    
    [ Upstream commit a5bbcbf29089a1252c201b1a7fd38151de355db9 ]
    
    If THIS_MODULE is not set, the module would be removed while debugfs is
    being used.
    It eventually makes kernel panic.
    
    Fixes: 82c93a87bf8b ("netdevsim: implement couple of testing devlink health reporters")
    Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support")
    Fixes: 4418f862d675 ("netdevsim: implement support for devlink region and snapshots")
    Fixes: d3cbb907ae57 ("netdevsim: add ACL trap reporting cookie as a metadata")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://lore.kernel.org/r/20201115103041.30701-1-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3f8fc9bfc8bffaa39c4b764aa43d50e4b4173f1f
Author: Heiner Kallweit <hkallweit1@gmail.com>
Date:   Fri Nov 13 10:27:27 2020 +0100

    net: bridge: add missing counters to ndo_get_stats64 callback
    
    [ Upstream commit 7a30ecc9237681bb125cbd30eee92bef7e86293d ]
    
    In br_forward.c and br_input.c fields dev->stats.tx_dropped and
    dev->stats.multicast are populated, but they are ignored in
    ndo_get_stats64.
    
    Fixes: 28172739f0a2 ("net: fix 64 bit counters on 32 bit arches")
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Link: https://lore.kernel.org/r/58ea9963-77ad-a7cf-8dfd-fc95ab95f606@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 67dd6d58c0a1b7fa785df614fe4b1eadfd9edcad
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Tue Nov 17 11:02:11 2020 +0800

    net: b44: fix error return code in b44_init_one()
    
    [ Upstream commit 7b027c249da54f492699c43e26cba486cfd48035 ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 39a6f4bce6b4 ("b44: replace the ssb_dma API with the generic DMA API")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Reviewed-by: Michael Chan <michael.chan@broadcom.com>
    Link: https://lore.kernel.org/r/1605582131-36735-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit ef5a35b7818acf9f0a047a12dcb7760cf2006d6e
Author: Ido Schimmel <idosch@nvidia.com>
Date:   Tue Nov 17 19:33:52 2020 +0200

    mlxsw: core: Use variable timeout for EMAD retries
    
    [ Upstream commit 1f492eab67bced119a0ac7db75ef2047e29a30c6 ]
    
    The driver sends Ethernet Management Datagram (EMAD) packets to the
    device for configuration purposes and waits for up to 200ms for a reply.
    A request is retried up to 5 times.
    
    When the system is under heavy load, replies are not always processed in
    time and EMAD transactions fail.
    
    Make the process more robust to such delays by using exponential
    backoff. First wait for up to 200ms, then retransmit and wait for up to
    400ms and so on.
    
    Fixes: caf7297e7ab5 ("mlxsw: core: Introduce support for asynchronous EMAD register access")
    Reported-by: Denis Yulevich <denisyu@nvidia.com>
    Tested-by: Denis Yulevich <denisyu@nvidia.com>
    Signed-off-by: Ido Schimmel <idosch@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 57429ca5891985f1340c4d8458b98210d45be674
Author: Sven Van Asbroeck <thesven73@gmail.com>
Date:   Thu Nov 12 15:47:41 2020 -0500

    lan743x: prevent entire kernel HANG on open, for some platforms
    
    [ Upstream commit 796a2665ca3e91ebaba7222f76fd9a035714e2d8 ]
    
    On arm imx6, when opening the chip's netdev, the whole Linux
    kernel intermittently hangs/freezes.
    
    This is caused by a bug in the driver code which tests if pcie
    interrupts are working correctly, using the software interrupt:
    
    1. open: enable the software interrupt
    2. open: tell the chip to assert the software interrupt
    3. open: wait for flag
    4. ISR: acknowledge s/w interrupt, set flag
    5. open: notice flag, disable the s/w interrupt, continue
    
    Unfortunately the ISR only acknowledges the s/w interrupt, but
    does not disable it. This will re-trigger the ISR in a tight
    loop.
    
    On some (lucky) platforms, open proceeds to disable the s/w
    interrupt even while the ISR is 'spinning'. On arm imx6,
    the spinning ISR does not allow open to proceed, resulting
    in a hung Linux kernel.
    
    Fix minimally by disabling the s/w interrupt in the ISR, which
    will prevent it from spinning. This won't break anything because
    the s/w interrupt is used as a one-shot interrupt.
    
    Note that this is a minimal fix, overlooking many possible
    cleanups, e.g.:
    - lan743x_intr_software_isr() is completely redundant and reads
      INT_STS twice for no apparent reason
    - disabling the s/w interrupt in lan743x_intr_test_isr() is now
      redundant, but harmless
    - waiting on software_isr_flag can be converted from a sleeping
      poll loop to wait_event_timeout()
    
    Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
    Tested-by: Sven Van Asbroeck <thesven73@gmail.com> # arm imx6 lan7430
    Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
    Link: https://lore.kernel.org/r/20201112204741.12375-1-TheSven73@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e9fa50915c00ca6cffaf2d3db05cfecf08ac963a
Author: Sven Van Asbroeck <thesven73@gmail.com>
Date:   Thu Nov 12 13:59:49 2020 -0500

    lan743x: fix issue causing intermittent kernel log warnings
    
    [ Upstream commit e35df62e04cc6fc4b9d90d054732f138349ff9b1 ]
    
    When running this chip on arm imx6, we intermittently observe
    the following kernel warning in the log, especially when the
    system is under high load:
    
    [   50.119484] ------------[ cut here ]------------
    [   50.124377] WARNING: CPU: 0 PID: 303 at kernel/softirq.c:169 __local_bh_enable_ip+0x100/0x184
    [   50.132925] IRQs not enabled as expected
    [   50.159250] CPU: 0 PID: 303 Comm: rngd Not tainted 5.7.8 #1
    [   50.164837] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
    [   50.171395] [<c0111a38>] (unwind_backtrace) from [<c010be28>] (show_stack+0x10/0x14)
    [   50.179162] [<c010be28>] (show_stack) from [<c05b9dec>] (dump_stack+0xac/0xd8)
    [   50.186408] [<c05b9dec>] (dump_stack) from [<c0122e40>] (__warn+0xd0/0x10c)
    [   50.193391] [<c0122e40>] (__warn) from [<c0123238>] (warn_slowpath_fmt+0x98/0xc4)
    [   50.200892] [<c0123238>] (warn_slowpath_fmt) from [<c012b010>] (__local_bh_enable_ip+0x100/0x184)
    [   50.209860] [<c012b010>] (__local_bh_enable_ip) from [<bf09ecbc>] (destroy_conntrack+0x48/0xd8 [nf_conntrack])
    [   50.220038] [<bf09ecbc>] (destroy_conntrack [nf_conntrack]) from [<c0ac9b58>] (nf_conntrack_destroy+0x94/0x168)
    [   50.230160] [<c0ac9b58>] (nf_conntrack_destroy) from [<c0a4aaa0>] (skb_release_head_state+0xa0/0xd0)
    [   50.239314] [<c0a4aaa0>] (skb_release_head_state) from [<c0a4aadc>] (skb_release_all+0xc/0x24)
    [   50.247946] [<c0a4aadc>] (skb_release_all) from [<c0a4b4cc>] (consume_skb+0x74/0x17c)
    [   50.255796] [<c0a4b4cc>] (consume_skb) from [<c081a2dc>] (lan743x_tx_release_desc+0x120/0x124)
    [   50.264428] [<c081a2dc>] (lan743x_tx_release_desc) from [<c081a98c>] (lan743x_tx_napi_poll+0x5c/0x18c)
    [   50.273755] [<c081a98c>] (lan743x_tx_napi_poll) from [<c0a6b050>] (net_rx_action+0x118/0x4a4)
    [   50.282306] [<c0a6b050>] (net_rx_action) from [<c0101364>] (__do_softirq+0x13c/0x53c)
    [   50.290157] [<c0101364>] (__do_softirq) from [<c012b29c>] (irq_exit+0x150/0x17c)
    [   50.297575] [<c012b29c>] (irq_exit) from [<c0196a08>] (__handle_domain_irq+0x60/0xb0)
    [   50.305423] [<c0196a08>] (__handle_domain_irq) from [<c05d44fc>] (gic_handle_irq+0x4c/0x90)
    [   50.313790] [<c05d44fc>] (gic_handle_irq) from [<c0100ed4>] (__irq_usr+0x54/0x80)
    [   50.321287] Exception stack(0xecd99fb0 to 0xecd99ff8)
    [   50.326355] 9fa0:                                     1cf1aa74 00000001 00000001 00000000
    [   50.334547] 9fc0: 00000001 00000000 00000000 00000000 00000000 00000000 00004097 b6d17d14
    [   50.342738] 9fe0: 00000001 b6d17c60 00000000 b6e71f94 800b0010 ffffffff
    [   50.349364] irq event stamp: 2525027
    [   50.352955] hardirqs last  enabled at (2525026): [<c0a6afec>] net_rx_action+0xb4/0x4a4
    [   50.360892] hardirqs last disabled at (2525027): [<c0d6d2fc>] _raw_spin_lock_irqsave+0x1c/0x50
    [   50.369517] softirqs last  enabled at (2524660): [<c01015b4>] __do_softirq+0x38c/0x53c
    [   50.377446] softirqs last disabled at (2524693): [<c012b29c>] irq_exit+0x150/0x17c
    [   50.385027] ---[ end trace c0b571db4bc8087d ]---
    
    The driver is calling dev_kfree_skb() from code inside a spinlock,
    where h/w interrupts are disabled. This is forbidden, as documented
    in include/linux/netdevice.h. The correct function to use
    dev_kfree_skb_irq(), or dev_kfree_skb_any().
    
    Fix by using the correct dev_kfree_skb_xxx() functions:
    
    in lan743x_tx_release_desc():
      called by lan743x_tx_release_completed_descriptors()
        called by in lan743x_tx_napi_poll()
        which holds a spinlock
      called by lan743x_tx_release_all_descriptors()
        called by lan743x_tx_close()
        which can-sleep
    conclusion: use dev_kfree_skb_any()
    
    in lan743x_tx_xmit_frame():
      which holds a spinlock
    conclusion: use dev_kfree_skb_irq()
    
    in lan743x_tx_close():
      which can-sleep
    conclusion: use dev_kfree_skb()
    
    in lan743x_rx_release_ring_element():
      called by lan743x_rx_close()
        which can-sleep
      called by lan743x_rx_open()
        which can-sleep
    conclusion: use dev_kfree_skb()
    
    Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
    Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
    Link: https://lore.kernel.org/r/20201112185949.11315-1-TheSven73@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 89a153f1ec632cdaab946e031a912cbbf1138bc7
Author: Zhang Qilong <zhangqilong3@huawei.com>
Date:   Thu Nov 12 16:09:50 2020 +0800

    ipv6: Fix error path to cancel the meseage
    
    [ Upstream commit ceb736e1d45c253f5e86b185ca9b497cdd43063f ]
    
    genlmsg_cancel() needs to be called in the error path of
    inet6_fill_ifmcaddr and inet6_fill_ifacaddr to cancel
    the message.
    
    Fixes: 6ecf4c37eb3e ("ipv6: enable IFA_TARGET_NETNSID for RTM_GETADDR")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
    Link: https://lore.kernel.org/r/20201112080950.1476302-1-zhangqilong3@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2d2c304ac10e80ce5e97c527b8f69704e87918db
Author: Wang Hai <wanghai38@huawei.com>
Date:   Mon Nov 16 16:20:18 2020 +0800

    inet_diag: Fix error path to cancel the meseage in inet_req_diag_fill()
    
    [ Upstream commit e33de7c5317e2827b2ba6fd120a505e9eb727b05 ]
    
    nlmsg_cancel() needs to be called in the error path of
    inet_req_diag_fill to cancel the message.
    
    Fixes: d545caca827b ("net: inet: diag: expose the socket mark to privileged processes.")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wang Hai <wanghai38@huawei.com>
    Link: https://lore.kernel.org/r/20201116082018.16496-1-wanghai38@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 886cb9edb9a15d424e97cea00d3d745216fcd24a
Author: Jeff Dike <jdike@akamai.com>
Date:   Thu Nov 12 20:58:15 2020 -0500

    Exempt multicast addresses from five-second neighbor lifetime
    
    [ Upstream commit 8cf8821e15cd553339a5b48ee555a0439c2b2742 ]
    
    Commit 58956317c8de ("neighbor: Improve garbage collection")
    guarantees neighbour table entries a five-second lifetime.  Processes
    which make heavy use of multicast can fill the neighour table with
    multicast addresses in five seconds.  At that point, neighbour entries
    can't be GC-ed because they aren't five seconds old yet, the kernel
    log starts to fill up with "neighbor table overflow!" messages, and
    sends start to fail.
    
    This patch allows multicast addresses to be thrown out before they've
    lived out their five seconds.  This makes room for non-multicast
    addresses and makes messages to all addresses more reliable in these
    circumstances.
    
    Fixes: 58956317c8de ("neighbor: Improve garbage collection")
    Signed-off-by: Jeff Dike <jdike@akamai.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Link: https://lore.kernel.org/r/20201113015815.31397-1-jdike@akamai.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7fe891cb8a8493081c06660507824e4276701964
Author: Alex Marginean <alexandru.marginean@nxp.com>
Date:   Thu Nov 12 20:26:08 2020 +0200

    enetc: Workaround for MDIO register access issue
    
    [ Upstream commit fd5736bf9f235d26c83cac8a16c70bbdafa55abe ]
    
    Due to a hardware issue, an access to MDIO registers
    that is concurrent with other ENETC register accesses
    may lead to the MDIO access being dropped or corrupted.
    The workaround introduces locking for all register accesses
    to the ENETC register space.  To reduce performance impact,
    a readers-writers locking scheme has been implemented.
    The writer in this case is the MDIO access code (irrelevant
    whether that MDIO access is a register read or write), and
    the reader is any access code to non-MDIO ENETC registers.
    Also, the datapath functions acquire the read lock fewer times
    and use _hot accessors.  All the rest of the code uses the _wa
    accessors which lock every register access.
    The commit introducing MDIO support is -
    commit ebfcb23d62ab ("enetc: Add ENETC PF level external MDIO support")
    but due to subsequent refactoring this patch is applicable on
    top of a later commit.
    
    Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl")
    Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
    Link: https://lore.kernel.org/r/20201112182608.26177-1-claudiu.manoil@nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5eeba43de957ebfa0b5fab285da5350f9632305a
Author: Wang Hai <wanghai38@huawei.com>
Date:   Fri Nov 13 19:16:22 2020 +0800

    devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
    
    [ Upstream commit 849920c703392957f94023f77ec89ca6cf119d43 ]
    
    If sb_occ_port_pool_get() failed in devlink_nl_sb_port_pool_fill(),
    msg should be canceled by genlmsg_cancel().
    
    Fixes: df38dafd2559 ("devlink: implement shared buffer occupancy monitoring interface")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wang Hai <wanghai38@huawei.com>
    Link: https://lore.kernel.org/r/20201113111622.11040-1-wanghai38@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1772da0f44eba424de92fda68ed16d9f7a565db9
Author: Edwin Peer <edwin.peer@broadcom.com>
Date:   Sun Nov 15 19:27:49 2020 -0500

    bnxt_en: read EEPROM A2h address using page 0
    
    [ Upstream commit 4260330b32b14330cfe427d568ac5f5b29b5be3d ]
    
    The module eeprom address range returned by bnxt_get_module_eeprom()
    should be 256 bytes of A0h address space, the lower half of the A2h
    address space, and page 0 for the upper half of the A2h address space.
    
    Fix the firmware call by passing page_number 0 for the A2h slave address
    space.
    
    Fixes: 42ee18fe4ca2 ("bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO")
    Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit de46a4d9dd4cfe54585710206fe8e2dac5f4158a
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Mon Nov 16 17:21:14 2020 +0100

    atm: nicstar: Unmap DMA on send error
    
    [ Upstream commit 6dceaa9f56e22d0f9b4c4ad2ed9e04e315ce7fe5 ]
    
    The `skb' is mapped for DMA in ns_send() but does not unmap DMA in case
    push_scqe() fails to submit the `skb'. The memory of the `skb' is
    released so only the DMA mapping is leaking.
    
    Unmap the DMA mapping in case push_scqe() failed.
    
    Fixes: 864a3ff635fa7 ("atm: [nicstar] remove virt_to_bus() and support 64-bit platforms")
    Cc: Chas Williams <3chas3@gmail.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 875a0170c65849df5b269a81d087d85ea392f7e2
Author: Zhang Changzhong <zhangchangzhong@huawei.com>
Date:   Tue Nov 17 10:45:05 2020 +0800

    ah6: fix error return code in ah6_input()
    
    [ Upstream commit a5ebcbdf34b65fcc07f38eaf2d60563b42619a59 ]
    
    Fix to return a negative error code from the error handling
    case instead of 0, as done elsewhere in this function.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
    Link: https://lore.kernel.org/r/1605581105-35295-1-git-send-email-zhangchangzhong@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>