• M
    IB/mlx5: Lock QP during page fault handling · 032080ab
    Moni Shoua 提交于
    When page fault event for a WQE arrives, the event data contains the
    resource (e.g. QP) number which will later be used by the page fault
    handler to retrieve the resource. Meanwhile, another context can destroy
    the resource and cause use-after-free. To avoid that, take a reference on the
    resource when handler starts and release it when it ends.
    
    Page fault events for RDMA operations don't need to be protected because
    the driver doesn't need to access the QP in the page fault handler.
    
    Fixes: d9aaed83 ("{net,IB}/mlx5: Refactor page fault handling")
    Signed-off-by: NMoni Shoua <monis@mellanox.com>
    Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
    032080ab
odp.c 32.5 KB