mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
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: 7e86845a03
("rpcrdma: Implement generic device removal")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
8286f8b622
commit
63a81588cd
@ -153,6 +153,7 @@ static void rpcrdma_remove_one(struct ib_device *device,
|
||||
}
|
||||
|
||||
trace_rpcrdma_client_remove_one_done(device);
|
||||
xa_destroy(&rd->rd_xa);
|
||||
kfree(rd);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user