• Roland Dreier's avatar
    IB/mlx4: Fix error path in create_qp_common() · 23f1b384
    Roland Dreier authored
        
    The error handling code at err_wrid in create_qp_common() does not
    handle a userspace QP attached to an SRQ correctly, since it ends up
    in the else clause of the if statement.  This means it tries to
    kfree() the uninitialized qp->sq.wrid and qp->rq.wrid pointers.  Fix
    this so we only free the wrid arrays for kernel QPs.
    
    Pointed out by Michael S. Tsirkin <mst@dev.mellanox.co.il>.
    Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
    23f1b384
qp.c 43.6 KB