mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 00:42:16 +00:00
xprtrdma: Do not leak an MW during a DMA map failure
Based on code audit. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
505bbe64dd
commit
42fe28f607
@ -257,6 +257,7 @@ fmr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
|
||||
out_dmamap_err:
|
||||
pr_err("rpcrdma: failed to dma map sg %p sg_nents %u\n",
|
||||
mw->mw_sg, mw->mw_nents);
|
||||
rpcrdma_defer_mr_recovery(mw);
|
||||
return -ENOMEM;
|
||||
|
||||
out_maperr:
|
||||
|
@ -438,6 +438,7 @@ frwr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
|
||||
out_dmamap_err:
|
||||
pr_err("rpcrdma: failed to dma map sg %p sg_nents %u\n",
|
||||
mw->mw_sg, mw->mw_nents);
|
||||
rpcrdma_defer_mr_recovery(mw);
|
||||
return -ENOMEM;
|
||||
|
||||
out_mapmr_err:
|
||||
|
Loading…
Reference in New Issue
Block a user