• Leon Romanovsky's avatar
    RDMA/rxe: Return CQE error if invalid lkey was supplied · dc07628b
    Leon Romanovsky authored
    RXE is missing update of WQE status in LOCAL_WRITE failures.  This caused
    the following kernel panic if someone sent an atomic operation with an
    explicitly wrong lkey.
    
    [leonro@vm ~]$ mkt test
    test_atomic_invalid_lkey (tests.test_atomic.AtomicTest) ...
     WARNING: CPU: 5 PID: 263 at drivers/infiniband/sw/rxe/rxe_comp.c:740 rxe_completer+0x1a6d/0x2e30 [rdma_rxe]
     Modules linked in: crc32_generic rdma_rxe ip6_udp_tunnel udp_tunnel rdma_ucm rdma_cm ib_umad ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core mlx5_core ptp pps_core
     CPU: 5 PID: 263 Comm: python3 Not tainted 5.13.0-rc1+ #2936
     Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
     RIP: 0010:rxe_completer+0x1a6d/0x2e30 [rdma_rxe]
     Code: 03 0f 8e 65 0e 00 00 3b 93 10 06 00 00 0f 84 82 0a 00 00 4c 89 ff 4c 89 44 24 38 e8 2d 74 a9 e1 4c 8b 44 24 38 e9 1c f5 ff ff <0f> 0b e9 0c e8 ff ff b8 05 00 00 00 41 bf 05 00 00 00 e9 ab e7 ff
     RSP: 0018:f...
    dc07628b
rxe_comp.c 18 KB