mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
6e051971b0
siw_fastreg_mr() invokes siw_mem_id2obj(), which returns a local reference
of the siw_mem object to "mem" with increased refcnt. When
siw_fastreg_mr() returns, "mem" becomes invalid, so the refcount should be
decreased to keep refcount balanced.
The issue happens in one error path of siw_fastreg_mr(). When "base_mr"
equals to NULL but "mem" is not NULL, the function forgets to decrease the
refcnt increased by siw_mem_id2obj() and causes a refcnt leak.
Reorganize the flow so that the goto unwind can be used as expected.
Fixes:
|
||
---|---|---|
.. | ||
iwarp.h | ||
Kconfig | ||
Makefile | ||
siw_cm.c | ||
siw_cm.h | ||
siw_cq.c | ||
siw_main.c | ||
siw_mem.c | ||
siw_mem.h | ||
siw_qp_rx.c | ||
siw_qp_tx.c | ||
siw_qp.c | ||
siw_verbs.c | ||
siw_verbs.h | ||
siw.h |