• Arnd Bergmann's avatar
    IB/rxe: avoid putting a large struct rxe_qp on stack · a0fa7268
    Arnd Bergmann authored
    A race condition fix added an rxe_qp structure to the stack in order
    to be able to perform rollback in rxe_requester(), but the structure
    is large enough to trigger the warning for possible stack overflow:
    
    drivers/infiniband/sw/rxe/rxe_req.c: In function 'rxe_requester':
    drivers/infiniband/sw/rxe/rxe_req.c:757:1: error: the frame size of 2064 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
    
    This changes the rollback function to only save the psn inside
    the qp, which is the only field we access in the rollback_qp
    anyway.
    
    Fixes: 3050b998 ("IB/rxe: Fix race condition between requester and completer")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarLeon Romanovsky <leonro@mellanox.com>
    Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
    a0fa7268
rxe_req.c 18.7 KB