]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: avoid putting a large struct rxe_qp on stack
authorArnd Bergmann <arnd@arndb.de>
Mon, 19 Sep 2016 11:57:26 +0000 (13:57 +0200)
committerDoug Ledford <dledford@redhat.com>
Mon, 12 Dec 2016 21:31:45 +0000 (16:31 -0500)
commit5977f4d9c4cde217005f44935be8d3f2d4c70d7e
tree5222fc413b272f38aa61ca3c7811c04f05444087
parent46d2731db432a7e17598b925ae026564771065fb
IB/rxe: avoid putting a large struct rxe_qp on stack

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: e7afe54206c5 ("IB/rxe: Fix race condition between requester and completer")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_req.c