rpcrdma: Always release the rpcrdma_device's xa_array
authorChuck Lever <chuck.lever@oracle.com>
Wed, 30 Oct 2024 20:11:30 +0000 (16:11 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Wed, 30 Oct 2024 20:14:00 +0000 (16:14 -0400)
commit63a81588cd2025e75fbaf30b65930b76825c456f
treee3cde3c3eb3426867520ca25d4617f481d552e31
parent8286f8b622990194207df9ab852e0f87c60d35e9
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: 7e86845a0346 ("rpcrdma: Implement generic device removal")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/ib_client.c