Skip to content

Commit 63a8158

Browse files
committed
rpcrdma: Always release the rpcrdma_device's xa_array
Dai pointed out that the xa_init_flags() in rpcrdma_add_one() needs to have a matching xa_destroy() in rpcrdma_remove_one() to release underlying memory that the xarray might have accrued during operation. Reported-by: Dai Ngo <dai.ngo@oracle.com> Fixes: 7e86845 ("rpcrdma: Implement generic device removal") Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 8286f8b commit 63a8158

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/xprtrdma/ib_client.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ static void rpcrdma_remove_one(struct ib_device *device,
153153
}
154154

155155
trace_rpcrdma_client_remove_one_done(device);
156+
xa_destroy(&rd->rd_xa);
156157
kfree(rd);
157158
}
158159

0 commit comments

Comments
 (0)