]> git.baikalelectronics.ru Git - kernel.git/commit
IB/rxe: put the pool on allocation failure
authorDoug Ledford <dledford@redhat.com>
Mon, 9 Oct 2017 13:11:32 +0000 (09:11 -0400)
committerDoug Ledford <dledford@redhat.com>
Mon, 9 Oct 2017 16:10:41 +0000 (12:10 -0400)
commit2460b8925320ffcb1a846bd12b1447c2d878aa22
treefce782ea21e76433cd4eeeb3cf4eb5280809b36a
parent68833144b0aa9f2022213aba72cdf69cc2aded08
IB/rxe: put the pool on allocation failure

If the allocation of elem fails, it is not sufficient to simply check
for NULL and return.  We need to also put our reference on the pool or
else we will leave the pool with a permanent ref count and we will never
be able to free it.

Fixes: 68833144b0aa ("IB/rxe: check for allocation failure on elem")
Suggested-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_pool.c