commit fc944ddc0b4a019d4ece166909e65fa2a11c7e0e
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Feb 23 15:02:26 2021 +0100

    Linux 5.4.100
    
    Tested-by: Florian Fainelli <f.fainelli@gmail.com>
    Tested-by: Guenter Roeck <linux@roeck-us.net>
    Tested-by: Igor Matheus Andrade Torrente <igormtorrente@gmail.com>
    Tested-by: Jason Self <jason@bluehome.net>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Link: https://lore.kernel.org/r/20210222121013.583922436@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38d777aaf2c3231c471400a9d0bd4291b8569964
Author: David Sterba <dsterba@suse.cz>
Date:   Mon Feb 22 13:16:39 2021 +0100

    btrfs: fix backport of 2175bf57dc952 in 5.4.95
    
    There's a mistake in backport of upstream commit 2175bf57dc95 ("btrfs:
    fix possible free space tree corruption with online conversion") as
    5.4.95 commit e1ae9aab8029.
    
    The enum value BTRFS_FS_FREE_SPACE_TREE_UNTRUSTED has been added to the
    wrong enum set, colliding with value of BTRFS_FS_QUOTA_ENABLE. This
    could cause problems during the tree conversion, where the quotas
    wouldn't be set up properly but the related code executed anyway due to
    the bit set.
    
    Link: https://lore.kernel.org/linux-btrfs/20210219111741.95DD.409509F4@e16-tech.com
    Reported-by: Wang Yugui <wangyugui@e16-tech.com>
    CC: stable@vger.kernel.org # 5.4.95+
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c6dd8545fe383830c632dfd74e8fb1015d064304
Author: Matwey V. Kornilov <matwey@sai.msu.ru>
Date:   Mon Jan 4 18:00:07 2021 +0100

    media: pwc: Use correct device for DMA
    
    commit 69c9e825e812ec6d663e64ebf14bd3bc7f37e2c7 upstream.
    
    This fixes the following newly introduced warning:
    
    [   15.518253] ------------[ cut here ]------------
    [   15.518941] WARNING: CPU: 0 PID: 246 at kernel/dma/mapping.c:149 dma_map_page_attrs+0x1a8/0x1d0
    [   15.520634] Modules linked in: pwc videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc efivarfs
    [   15.522335] CPU: 0 PID: 246 Comm: v4l2-test Not tainted 5.11.0-rc1+ #1
    [   15.523281] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
    [   15.524438] RIP: 0010:dma_map_page_attrs+0x1a8/0x1d0
    [   15.525135] Code: 10 5b 5d 41 5c 41 5d c3 4d 89 d0 eb d7 4d 89 c8 89 e9 48 89 da e8 68 29 00 00 eb d1 48 89 f2 48 2b 50 18 48 89 d0 eb 83 0f 0b <0f> 0b 48 c7 c0 ff ff ff ff eb b8 48 89 d9 48 8b 40 40 e8 61 69 d2
    [   15.527938] RSP: 0018:ffffa2694047bca8 EFLAGS: 00010246
    [   15.528716] RAX: 0000000000000000 RBX: 0000000000002580 RCX: 0000000000000000
    [   15.529782] RDX: 0000000000000000 RSI: ffffcdce000ecc00 RDI: ffffa0b4bdb888a0
    [   15.530849] RBP: 0000000000000002 R08: 0000000000000002 R09: 0000000000000000
    [   15.531881] R10: 0000000000000004 R11: 000000000002d8c0 R12: 0000000000000000
    [   15.532911] R13: ffffa0b4bdb88800 R14: ffffa0b483820000 R15: ffffa0b4bdb888a0
    [   15.533942] FS:  00007fc5fbb5e4c0(0000) GS:ffffa0b4fc000000(0000) knlGS:0000000000000000
    [   15.535141] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   15.535988] CR2: 00007fc5fb6ea138 CR3: 0000000003812000 CR4: 00000000001506f0
    [   15.537025] Call Trace:
    [   15.537425]  start_streaming+0x2e9/0x4b0 [pwc]
    [   15.538143]  vb2_start_streaming+0x5e/0x110 [videobuf2_common]
    [   15.538989]  vb2_core_streamon+0x107/0x140 [videobuf2_common]
    [   15.539831]  __video_do_ioctl+0x18f/0x4a0 [videodev]
    [   15.540670]  video_usercopy+0x13a/0x5b0 [videodev]
    [   15.541349]  ? video_put_user+0x230/0x230 [videodev]
    [   15.542096]  ? selinux_file_ioctl+0x143/0x200
    [   15.542752]  v4l2_ioctl+0x40/0x50 [videodev]
    [   15.543360]  __x64_sys_ioctl+0x89/0xc0
    [   15.543930]  do_syscall_64+0x33/0x40
    [   15.544448]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
    [   15.545236] RIP: 0033:0x7fc5fb671587
    [   15.545780] Code: b3 66 90 48 8b 05 11 49 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 48 2c 00 f7 d8 64 89 01 48
    [   15.548486] RSP: 002b:00007fff0f71f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    [   15.549578] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fc5fb671587
    [   15.550664] RDX: 00007fff0f71f060 RSI: 0000000040045612 RDI: 0000000000000003
    [   15.551706] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
    [   15.552738] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff0f71f060
    [   15.553817] R13: 00007fff0f71f1d0 R14: 0000000000de1270 R15: 0000000000000000
    [   15.554914] ---[ end trace 7be03122966c2486 ]---
    
    Fixes: 1161db6776bd ("media: usb: pwc: Don't use coherent DMA buffers for ISO transfer")
    Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 524a77aa5d69e726369b38813333f20c6511b66c
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:56:44 2021 +0100

    xen-blkback: fix error handling in xen_blkbk_map()
    
    commit 871997bc9e423f05c7da7c9178e62dde5df2a7f8 upstream.
    
    The function uses a goto-based loop, which may lead to an earlier error
    getting discarded by a later iteration. Exit this ad-hoc loop when an
    error was encountered.
    
    The out-of-memory error path additionally fails to fill a structure
    field looked at by xen_blkbk_unmap_prepare() before inspecting the
    handle which does get properly set (to BLKBACK_INVALID_HANDLE).
    
    Since the earlier exiting from the ad-hoc loop requires the same field
    filling (invalidation) as that on the out-of-memory path, fold both
    paths. While doing so, drop the pr_alert(), as extra log messages aren't
    going to help the situation (the kernel will log oom conditions already
    anyway).
    
    This is XSA-365.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Julien Grall <julien@xen.org>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit be05138a9cdd54f6586ec356c0a24d4bd8559735
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:55:57 2021 +0100

    xen-scsiback: don't "handle" error by BUG()
    
    commit 7c77474b2d22176d2bfb592ec74e0f2cb71352c9 upstream.
    
    In particular -ENOMEM may come back here, from set_foreign_p2m_mapping().
    Don't make problems worse, the more that handling elsewhere (together
    with map's status fields now indicating whether a mapping wasn't even
    attempted, and hence has to be considered failed) doesn't require this
    odd way of dealing with errors.
    
    This is part of XSA-362.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 52e8f43af5407af6761421d30826ca48cf1585b9
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:55:31 2021 +0100

    xen-netback: don't "handle" error by BUG()
    
    commit 3194a1746e8aabe86075fd3c5e7cf1f4632d7f16 upstream.
    
    In particular -ENOMEM may come back here, from set_foreign_p2m_mapping().
    Don't make problems worse, the more that handling elsewhere (together
    with map's status fields now indicating whether a mapping wasn't even
    attempted, and hence has to be considered failed) doesn't require this
    odd way of dealing with errors.
    
    This is part of XSA-362.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7109f61d25ff4dc2041f4be71042219869112e4c
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:54:51 2021 +0100

    xen-blkback: don't "handle" error by BUG()
    
    commit 5a264285ed1cd32e26d9de4f3c8c6855e467fd63 upstream.
    
    In particular -ENOMEM may come back here, from set_foreign_p2m_mapping().
    Don't make problems worse, the more that handling elsewhere (together
    with map's status fields now indicating whether a mapping wasn't even
    attempted, and hence has to be considered failed) doesn't require this
    odd way of dealing with errors.
    
    This is part of XSA-362.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 55ccf71c098579287da7cdfa4383f4485106bc27
Author: Stefano Stabellini <stefano.stabellini@xilinx.com>
Date:   Mon Feb 15 08:53:44 2021 +0100

    xen/arm: don't ignore return errors from set_phys_to_machine
    
    commit 36bf1dfb8b266e089afa9b7b984217f17027bf35 upstream.
    
    set_phys_to_machine can fail due to lack of memory, see the kzalloc call
    in arch/arm/xen/p2m.c:__set_phys_to_machine_multi.
    
    Don't ignore the potential return error in set_foreign_p2m_mapping,
    returning it to the caller instead.
    
    This is part of XSA-361.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Julien Grall <jgrall@amazon.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit feda880969a50a70e036cfda7757fffe3d914ea4
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:52:27 2021 +0100

    Xen/gntdev: correct error checking in gntdev_map_grant_pages()
    
    commit ebee0eab08594b2bd5db716288a4f1ae5936e9bc upstream.
    
    Failure of the kernel part of the mapping operation should also be
    indicated as an error to the caller, or else it may assume the
    respective kernel VA is okay to access.
    
    Furthermore gnttab_map_refs() failing still requires recording
    successfully mapped handles, so they can be unmapped subsequently. This
    in turn requires there to be a way to tell full hypercall failure from
    partial success - preset map_op status fields such that they won't
    "happen" to look as if the operation succeeded.
    
    Also again use GNTST_okay instead of implying its value (zero).
    
    This is part of XSA-361.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0e382682dda42a41ed78661330f14a3929e35c7e
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:51:07 2021 +0100

    Xen/gntdev: correct dev_bus_addr handling in gntdev_map_grant_pages()
    
    commit dbe5283605b3bc12ca45def09cc721a0a5c853a2 upstream.
    
    We may not skip setting the field in the unmap structure when
    GNTMAP_device_map is in use - such an unmap would fail to release the
    respective resources (a page ref in the hypervisor). Otoh the field
    doesn't need setting at all when GNTMAP_device_map is not in use.
    
    To record the value for unmapping, we also better don't use our local
    p2m: In particular after a subsequent change it may not have got updated
    for all the batch elements. Instead it can simply be taken from the
    respective map's results.
    
    We can additionally avoid playing this game altogether for the kernel
    part of the mappings in (x86) PV mode.
    
    This is part of XSA-361.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit da92e41f010ea0dc98791093dd7f3124fe1e7247
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:50:08 2021 +0100

    Xen/x86: also check kernel mapping in set_foreign_p2m_mapping()
    
    commit b512e1b077e5ccdbd6e225b15d934ab12453b70a upstream.
    
    We should not set up further state if either mapping failed; paying
    attention to just the user mapping's status isn't enough.
    
    Also use GNTST_okay instead of implying its value (zero).
    
    This is part of XSA-361.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 104eef95231497cdb4e4de24a1ddef7c831a8b44
Author: Jan Beulich <jbeulich@suse.com>
Date:   Mon Feb 15 08:49:34 2021 +0100

    Xen/x86: don't bail early from clear_foreign_p2m_mapping()
    
    commit a35f2ef3b7376bfd0a57f7844bd7454389aae1fc upstream.
    
    Its sibling (set_foreign_p2m_mapping()) as well as the sibling of its
    only caller (gnttab_map_refs()) don't clean up after themselves in case
    of error. Higher level callers are expected to do so. However, in order
    for that to really clean up any partially set up state, the operation
    should not terminate upon encountering an entry in unexpected state. It
    is particularly relevant to notice here that set_foreign_p2m_mapping()
    would skip setting up a p2m entry if its grant mapping failed, but it
    would continue to set up further p2m entries as long as their mappings
    succeeded.
    
    Arguably down the road set_foreign_p2m_mapping() may want its page state
    related WARN_ON() also converted to an error return.
    
    This is part of XSA-361.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 49de0a17e68f815c1f8c832421262ba029fbe122
Author: Wang Hai <wanghai38@huawei.com>
Date:   Fri Dec 11 20:29:21 2020 +0800

    net: bridge: Fix a warning when del bridge sysfs
    
    [ Upstream commit 989a1db06eb18ff605377eec87e18d795e0ec74b ]
    
    I got a warining report:
    
    br_sysfs_addbr: can't create group bridge4/bridge
    ------------[ cut here ]------------
    sysfs group 'bridge' not found for kobject 'bridge4'
    WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group fs/sysfs/group.c:279 [inline]
    WARNING: CPU: 2 PID: 9004 at fs/sysfs/group.c:279 sysfs_remove_group+0x153/0x1b0 fs/sysfs/group.c:270
    Modules linked in: iptable_nat
    ...
    Call Trace:
      br_dev_delete+0x112/0x190 net/bridge/br_if.c:384
      br_dev_newlink net/bridge/br_netlink.c:1381 [inline]
      br_dev_newlink+0xdb/0x100 net/bridge/br_netlink.c:1362
      __rtnl_newlink+0xe11/0x13f0 net/core/rtnetlink.c:3441
      rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500
      rtnetlink_rcv_msg+0x385/0x980 net/core/rtnetlink.c:5562
      netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2494
      netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
      netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1330
      netlink_sendmsg+0x793/0xc80 net/netlink/af_netlink.c:1919
      sock_sendmsg_nosec net/socket.c:651 [inline]
      sock_sendmsg+0x139/0x170 net/socket.c:671
      ____sys_sendmsg+0x658/0x7d0 net/socket.c:2353
      ___sys_sendmsg+0xf8/0x170 net/socket.c:2407
      __sys_sendmsg+0xd3/0x190 net/socket.c:2440
      do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46
      entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    In br_device_event(), if the bridge sysfs fails to be added,
    br_device_event() should return error. This can prevent warining
    when removing bridge sysfs that do not exist.
    
    Fixes: bb900b27a2f4 ("bridge: allow creating bridge devices with netlink")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Wang Hai <wanghai38@huawei.com>
    Tested-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Acked-by: Nikolay Aleksandrov <nikolay@nvidia.com>
    Link: https://lore.kernel.org/r/20201211122921.40386-1-wanghai38@huawei.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit c35ce3d38caa2cda4c2fad80dcec98dd81d1de43
Author: Loic Poulain <loic.poulain@linaro.org>
Date:   Fri Nov 6 18:33:26 2020 +0100

    net: qrtr: Fix port ID for control messages
    
    [ Upstream commit ae068f561baa003d260475c3e441ca454b186726 ]
    
    The port ID for control messages was uncorrectly set with broadcast
    node ID value, causing message to be dropped on remote side since
    not passing packet filtering (cb->dst_port != QRTR_PORT_CTRL).
    
    Fixes: d27e77a3de28 ("net: qrtr: Reset the node and port ID of broadcast messages")
    Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit f49731dfdb2031c185081c09a730d4b38fe84c27
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Feb 18 13:40:58 2021 -0500

    KVM: SEV: fix double locking due to incorrect backport
    
    Fix an incorrect line in the 5.4.y and 4.19.y backports of commit
    19a23da53932bc ("Fix unsynchronized access to sev members through
    svm_register_enc_region"), first applied to 5.4.98 and 4.19.176.
    
    Fixes: 1e80fdc09d12 ("KVM: SVM: Pin guest memory when SEV is active")
    Reported-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
    Cc: stable@vger.kernel.org # 5.4.x
    Cc: stable@vger.kernel.org # 4.19.x
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>