1. 20 7月, 2021 29 次提交
  2. 14 7月, 2021 1 次提交
  3. 03 7月, 2021 3 次提交
    • A
      IB/mlx5: Fix initializing CQ fragments buffer · 8594ce6b
      Alaa Hleihel 提交于
      stable inclusion
      from stable-5.10.44
      commit 91f7fdc4cc10542ca1045c06aad23365f0d067e0
      bugzilla: 109295
      CVE: NA
      
      --------------------------------
      
      commit 2ba0aa2f upstream.
      
      The function init_cq_frag_buf() can be called to initialize the current CQ
      fragments buffer cq->buf, or the temporary cq->resize_buf that is filled
      during CQ resize operation.
      
      However, the offending commit started to use function get_cqe() for
      getting the CQEs, the issue with this change is that get_cqe() always
      returns CQEs from cq->buf, which leads us to initialize the wrong buffer,
      and in case of enlarging the CQ we try to access elements beyond the size
      of the current cq->buf and eventually hit a kernel panic.
      
       [exception RIP: init_cq_frag_buf+103]
        [ffff9f799ddcbcd8] mlx5_ib_resize_cq at ffffffffc0835d60 [mlx5_ib]
        [ffff9f799ddcbdb0] ib_resize_cq at ffffffffc05270df [ib_core]
        [ffff9f799ddcbdc0] llt_rdma_setup_qp at ffffffffc0a6a712 [llt]
        [ffff9f799ddcbe10] llt_rdma_cc_event_action at ffffffffc0a6b411 [llt]
        [ffff9f799ddcbe98] llt_rdma_client_conn_thread at ffffffffc0a6bb75 [llt]
        [ffff9f799ddcbec8] kthread at ffffffffa66c5da1
        [ffff9f799ddcbf50] ret_from_fork_nospec_begin at ffffffffa6d95ddd
      
      Fix it by getting the needed CQE by calling mlx5_frag_buf_get_wqe() that
      takes the correct source buffer as a parameter.
      
      Fixes: 388ca8be ("IB/mlx5: Implement fragmented completion queue (CQ)")
      Link: https://lore.kernel.org/r/90a0e8c924093cfa50a482880ad7e7edb73dc19a.1623309971.git.leonro@nvidia.comSigned-off-by: NAlaa Hleihel <alaa@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      8594ce6b
    • S
      RDMA/mlx4: Do not map the core_clock page to user space unless enabled · e4f418ff
      Shay Drory 提交于
      stable inclusion
      from stable-5.10.44
      commit cb1aa1da04882d1860f733e24aeebdbbc85724d7
      bugzilla: 109295
      CVE: NA
      
      --------------------------------
      
      commit 404e5a12 upstream.
      
      Currently when mlx4 maps the hca_core_clock page to the user space there
      are read-modifiable registers, one of which is semaphore, on this page as
      well as the clock counter. If user reads the wrong offset, it can modify
      the semaphore and hang the device.
      
      Do not map the hca_core_clock page to the user space unless the device has
      been put in a backwards compatibility mode to support this feature.
      
      After this patch, mlx4 core_clock won't be mapped to user space on the
      majority of existing devices and the uverbs device time feature in
      ibv_query_rt_values_ex() will be disabled.
      
      Fixes: 52033cfb ("IB/mlx4: Add mmap call to map the hardware clock")
      Link: https://lore.kernel.org/r/9632304e0d6790af84b3b706d8c18732bc0d5e27.1622726305.git.leonro@nvidia.comSigned-off-by: NShay Drory <shayd@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      e4f418ff
    • K
      RDMA/ipoib: Fix warning caused by destroying non-initial netns · b4ae54c6
      Kamal Heib 提交于
      stable inclusion
      from stable-5.10.44
      commit 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27
      bugzilla: 109295
      CVE: NA
      
      --------------------------------
      
      commit a3e74fb9 upstream.
      
      After the commit 5ce2dced ("RDMA/ipoib: Set rtnl_link_ops for ipoib
      interfaces"), if the IPoIB device is moved to non-initial netns,
      destroying that netns lets the device vanish instead of moving it back to
      the initial netns, This is happening because default_device_exit() skips
      the interfaces due to having rtnl_link_ops set.
      
      Steps to reporoduce:
        ip netns add foo
        ip link set mlx5_ib0 netns foo
        ip netns delete foo
      
      WARNING: CPU: 1 PID: 704 at net/core/dev.c:11435 netdev_exit+0x3f/0x50
      Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT
      nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack
      nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun d
       fuse
      CPU: 1 PID: 704 Comm: kworker/u64:3 Tainted: G S      W  5.13.0-rc1+ #1
      Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 04/11/2016
      Workqueue: netns cleanup_net
      RIP: 0010:netdev_exit+0x3f/0x50
      Code: 48 8b bb 30 01 00 00 e8 ef 81 b1 ff 48 81 fb c0 3a 54 a1 74 13 48
      8b 83 90 00 00 00 48 81 c3 90 00 00 00 48 39 d8 75 02 5b c3 <0f> 0b 5b
      c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00
      RSP: 0018:ffffb297079d7e08 EFLAGS: 00010206
      RAX: ffff8eb542c00040 RBX: ffff8eb541333150 RCX: 000000008010000d
      RDX: 000000008010000e RSI: 000000008010000d RDI: ffff8eb440042c00
      RBP: ffffb297079d7e48 R08: 0000000000000001 R09: ffffffff9fdeac00
      R10: ffff8eb5003be000 R11: 0000000000000001 R12: ffffffffa1545620
      R13: ffffffffa1545628 R14: 0000000000000000 R15: ffffffffa1543b20
      FS:  0000000000000000(0000) GS:ffff8ed37fa00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00005601b5f4c2e8 CR3: 0000001fc8c10002 CR4: 00000000003706e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       ops_exit_list.isra.9+0x36/0x70
       cleanup_net+0x234/0x390
       process_one_work+0x1cb/0x360
       ? process_one_work+0x360/0x360
       worker_thread+0x30/0x370
       ? process_one_work+0x360/0x360
       kthread+0x116/0x130
       ? kthread_park+0x80/0x80
       ret_from_fork+0x22/0x30
      
      To avoid the above warning and later on the kernel panic that could happen
      on shutdown due to a NULL pointer dereference, make sure to set the
      netns_refund flag that was introduced by commit 3a5ca857 ("can: dev:
      Move device back to init netns on owning netns delete") to properly
      restore the IPoIB interfaces to the initial netns.
      
      Fixes: 5ce2dced ("RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces")
      Link: https://lore.kernel.org/r/20210525150134.139342-1-kamalheib1@gmail.comSigned-off-by: NKamal Heib <kamalheib1@gmail.com>
      Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      b4ae54c6
  4. 03 6月, 2021 7 次提交
    • D
      RDMA/uverbs: Fix a NULL vs IS_ERR() bug · 906eac38
      Dan Carpenter 提交于
      stable inclusion
      from stable-5.10.40
      commit 7cf4decefa0558ca000f1b6f01336e211b9ed052
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit 463a3f66 ]
      
      The uapi_get_object() function returns error pointers, it never returns
      NULL.
      
      Fixes: 149d3845 ("RDMA/uverbs: Add a method to introspect handles in a context")
      Link: https://lore.kernel.org/r/YJ6Got+U7lz+3n9a@mwandaSigned-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      906eac38
    • M
      RDMA/mlx5: Fix query DCT via DEVX · d74764ae
      Maor Gottlieb 提交于
      stable inclusion
      from stable-5.10.40
      commit c62c907ccc63b5ba59609ceecda1b04998d41962
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit cfa3b797 ]
      
      When executing DEVX command to query QP object, we need to take the QP
      type from the mlx5_ib_qp struct which hold the driver specific QP types as
      well, such as DC.
      
      Fixes: 34613eb1 ("IB/mlx5: Enable modify and query verbs objects via DEVX")
      Link: https://lore.kernel.org/r/6eee15d63f09bb70787488e0cf96216e2957f5aa.1621413654.git.leonro@nvidia.comReviewed-by: NYishai Hadas <yishaih@nvidia.com>
      Signed-off-by: NMaor Gottlieb <maorg@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      d74764ae
    • S
      RDMA/core: Don't access cm_id after its destruction · 6299c0ed
      Shay Drory 提交于
      stable inclusion
      from stable-5.10.40
      commit bd538f2f136fe5463458351a5ae045ed0a201cae
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit 889d916b ]
      
      restrack should only be attached to a cm_id while the ID has a valid
      device pointer. It is set up when the device is first loaded, but not
      cleared when the device is removed. There is also two copies of the device
      pointer, one private and one in the public API, and these were left out of
      sync.
      
      Make everything go to NULL together and manipulate restrack right around
      the device assignments.
      
      Found by syzcaller:
      BUG: KASAN: wild-memory-access in __list_del include/linux/list.h:112 [inline]
      BUG: KASAN: wild-memory-access in __list_del_entry include/linux/list.h:135 [inline]
      BUG: KASAN: wild-memory-access in list_del include/linux/list.h:146 [inline]
      BUG: KASAN: wild-memory-access in cma_cancel_listens drivers/infiniband/core/cma.c:1767 [inline]
      BUG: KASAN: wild-memory-access in cma_cancel_operation drivers/infiniband/core/cma.c:1795 [inline]
      BUG: KASAN: wild-memory-access in cma_cancel_operation+0x1f4/0x4b0 drivers/infiniband/core/cma.c:1783
      Write of size 8 at addr dead000000000108 by task syz-executor716/334
      
      CPU: 0 PID: 334 Comm: syz-executor716 Not tainted 5.11.0+ #271
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
      rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
      Call Trace:
       __dump_stack lib/dump_stack.c:79 [inline]
       dump_stack+0xbe/0xf9 lib/dump_stack.c:120
       __kasan_report mm/kasan/report.c:400 [inline]
       kasan_report.cold+0x5f/0xd5 mm/kasan/report.c:413
       __list_del include/linux/list.h:112 [inline]
       __list_del_entry include/linux/list.h:135 [inline]
       list_del include/linux/list.h:146 [inline]
       cma_cancel_listens drivers/infiniband/core/cma.c:1767 [inline]
       cma_cancel_operation drivers/infiniband/core/cma.c:1795 [inline]
       cma_cancel_operation+0x1f4/0x4b0 drivers/infiniband/core/cma.c:1783
       _destroy_id+0x29/0x460 drivers/infiniband/core/cma.c:1862
       ucma_close_id+0x36/0x50 drivers/infiniband/core/ucma.c:185
       ucma_destroy_private_ctx+0x58d/0x5b0 drivers/infiniband/core/ucma.c:576
       ucma_close+0x91/0xd0 drivers/infiniband/core/ucma.c:1797
       __fput+0x169/0x540 fs/file_table.c:280
       task_work_run+0xb7/0x100 kernel/task_work.c:140
       exit_task_work include/linux/task_work.h:30 [inline]
       do_exit+0x7da/0x17f0 kernel/exit.c:825
       do_group_exit+0x9e/0x190 kernel/exit.c:922
       __do_sys_exit_group kernel/exit.c:933 [inline]
       __se_sys_exit_group kernel/exit.c:931 [inline]
       __x64_sys_exit_group+0x2d/0x30 kernel/exit.c:931
       do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: 255d0c14 ("RDMA/cma: rdma_bind_addr() leaks a cma_dev reference count")
      Link: https://lore.kernel.org/r/3352ee288fe34f2b44220457a29bfc0548686363.1620711734.git.leonro@nvidia.comSigned-off-by: NShay Drory <shayd@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      6299c0ed
    • M
      RDMA/mlx5: Recover from fatal event in dual port mode · 747450d4
      Maor Gottlieb 提交于
      stable inclusion
      from stable-5.10.40
      commit 75bdfe7837322788eca2aa321f6160e35361ff41
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit 97f30d32 ]
      
      When there is fatal event on the slave port, the device is marked as not
      active. We need to mark it as active again when the slave is recovered to
      regain full functionality.
      
      Fixes: d69a24e0 ("IB/mlx5: Move IB event processing onto a workqueue")
      Link: https://lore.kernel.org/r/8906754455bb23019ef223c725d2c0d38acfb80b.1620711734.git.leonro@nvidia.comSigned-off-by: NMaor Gottlieb <maorg@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      747450d4
    • L
      RDMA/rxe: Clear all QP fields if creation failed · 7a6b447f
      Leon Romanovsky 提交于
      stable inclusion
      from stable-5.10.40
      commit 2ee4d79c364914989c80de382c0b1a7259a7e4b3
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit 67f29896 ]
      
      rxe_qp_do_cleanup() relies on valid pointer values in QP for the properly
      created ones, but in case rxe_qp_from_init() failed it was filled with
      garbage and caused tot the following error.
      
        refcount_t: underflow; use-after-free.
        WARNING: CPU: 1 PID: 12560 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
        Modules linked in:
        CPU: 1 PID: 12560 Comm: syz-executor.4 Not tainted 5.12.0-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
        RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28
        Code: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
        RSP: 0018:ffffc900097ceba8 EFLAGS: 00010286
        RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
        RDX: 0000000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67
        RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
        R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff8880322a4800
        R13: ffff8880322a4940 R14: ffff888033044e00 R15: 0000000000000000
        FS:  00007f6eb2be3700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 00007fdbe5d41000 CR3: 000000001d181000 CR4: 00000000001506e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         __refcount_sub_and_test include/linux/refcount.h:283 [inline]
         __refcount_dec_and_test include/linux/refcount.h:315 [inline]
         refcount_dec_and_test include/linux/refcount.h:333 [inline]
         kref_put include/linux/kref.h:64 [inline]
         rxe_qp_do_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe_qp.c:805
         execute_in_process_context+0x37/0x150 kernel/workqueue.c:3327
         rxe_elem_release+0x9f/0x180 drivers/infiniband/sw/rxe/rxe_pool.c:391
         kref_put include/linux/kref.h:65 [inline]
         rxe_create_qp+0x2cd/0x310 drivers/infiniband/sw/rxe/rxe_verbs.c:425
         _ib_create_qp drivers/infiniband/core/core_priv.h:331 [inline]
         ib_create_named_qp+0x2ad/0x1370 drivers/infiniband/core/verbs.c:1231
         ib_create_qp include/rdma/ib_verbs.h:3644 [inline]
         create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2920
         ib_mad_port_open drivers/infiniband/core/mad.c:3001 [inline]
         ib_mad_init_device+0xd6f/0x1400 drivers/infiniband/core/mad.c:3092
         add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:717
         enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331
         ib_register_device drivers/infiniband/core/device.c:1413 [inline]
         ib_register_device+0x7c7/0xa50 drivers/infiniband/core/device.c:1365
         rxe_register_device+0x3d5/0x4a0 drivers/infiniband/sw/rxe/rxe_verbs.c:1147
         rxe_add+0x12fe/0x16d0 drivers/infiniband/sw/rxe/rxe.c:247
         rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:503
         rxe_newlink drivers/infiniband/sw/rxe/rxe.c:269 [inline]
         rxe_newlink+0xb7/0xe0 drivers/infiniband/sw/rxe/rxe.c:250
         nldev_newlink+0x30e/0x550 drivers/infiniband/core/nldev.c:1555
         rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195
         rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
         rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259
         netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline]
         netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338
         netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927
         sock_sendmsg_nosec net/socket.c:654 [inline]
         sock_sendmsg+0xcf/0x120 net/socket.c:674
         ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350
         ___sys_sendmsg+0xf3/0x170 net/socket.c:2404
         __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433
         do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47
         entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 8700e3e7 ("Soft RoCE driver")
      Link: https://lore.kernel.org/r/7bf8d548764d406dbbbaf4b574960ebfd5af8387.1620717918.git.leonro@nvidia.com
      Reported-by: syzbot+36a7f280de4e11c6f04e@syzkaller.appspotmail.com
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NZhu Yanjun <zyjzyj2000@gmail.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      7a6b447f
    • L
      RDMA/core: Prevent divide-by-zero error triggered by the user · 36deb7ef
      Leon Romanovsky 提交于
      stable inclusion
      from stable-5.10.40
      commit 66ab7fcdac34b890017f04f391507ef5b2b89a13
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit 54d87913 ]
      
      The user_entry_size is supplied by the user and later used as a
      denominator to calculate number of entries. The zero supplied by the user
      will trigger the following divide-by-zero error:
      
       divide error: 0000 [#1] SMP KASAN PTI
       CPU: 4 PID: 497 Comm: c_repro Not tainted 5.13.0-rc1+ #281
       Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
       RIP: 0010:ib_uverbs_handler_UVERBS_METHOD_QUERY_GID_TABLE+0x1b1/0x510
       Code: 87 59 03 00 00 e8 9f ab 1e ff 48 8d bd a8 00 00 00 e8 d3 70 41 ff 44 0f b7 b5 a8 00 00 00 e8 86 ab 1e ff 31 d2 4c 89 f0 31 ff <49> f7 f5 48 89 d6 48 89 54 24 10 48 89 04 24 e8 1b ad 1e ff 48 8b
       RSP: 0018:ffff88810416f828 EFLAGS: 00010246
       RAX: 0000000000000008 RBX: 1ffff1102082df09 RCX: ffffffff82183f3d
       RDX: 0000000000000000 RSI: ffff888105f2da00 RDI: 0000000000000000
       RBP: ffff88810416fa98 R08: 0000000000000001 R09: ffffed102082df5f
       R10: ffff88810416faf7 R11: ffffed102082df5e R12: 0000000000000000
       R13: 0000000000000000 R14: 0000000000000008 R15: ffff88810416faf0
       FS:  00007f5715efa740(0000) GS:ffff88811a700000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000000020000840 CR3: 000000010c2e0001 CR4: 0000000000370ea0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        ? ib_uverbs_handler_UVERBS_METHOD_INFO_HANDLES+0x4b0/0x4b0
        ib_uverbs_cmd_verbs+0x1546/0x1940
        ib_uverbs_ioctl+0x186/0x240
        __x64_sys_ioctl+0x38a/0x1220
        do_syscall_64+0x3f/0x80
        entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      Fixes: 9f85cbe5 ("RDMA/uverbs: Expose the new GID query API to user space")
      Link: https://lore.kernel.org/r/b971cc70a8b240a8b5eda33c99fa0558a0071be2.1620657876.git.leonro@nvidia.comReviewed-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      36deb7ef
    • L
      RDMA/siw: Release xarray entry · e038e455
      Leon Romanovsky 提交于
      stable inclusion
      from stable-5.10.40
      commit 15357010e0e155b61bb60bddcd6dad6c0430eabc
      bugzilla: 51882
      CVE: NA
      
      --------------------------------
      
      [ Upstream commit a3d83276 ]
      
      The xarray entry is allocated in siw_qp_add(), but release was
      missed in case zero-sized SQ was discovered.
      
      Fixes: 661f3859 ("RDMA/siw: Fix handling of zero-sized Read and Receive Queues.")
      Link: https://lore.kernel.org/r/f070b59d5a1114d5a4e830346755c2b3f141cde5.1620560472.git.leonro@nvidia.comSigned-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NBernard Metzler <bmt@zurich.ibm.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      Signed-off-by: NSasha Levin <sashal@kernel.org>
      Signed-off-by: NChen Jun <chenjun102@huawei.com>
      Acked-by: NWeilong Chen <chenweilong@huawei.com>
      Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
      e038e455