mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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 | ||