Fix a race condition when performing a controller reset
Status from this message: applied to nvme-5.16.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest3 patches 6 repliesApplied
- v23 patches 6 repliesSuperseded
- v12 patches 18 repliesSuperseded
Changes in v3 from the cover letter
- rename nvmet_tcp_free_iovec() to nvmet_tcp_free_cmd_buffers()
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | nvmet-tcp: fix a race condition between release_queue and io_workdrivers/ | +3 | 1 reply | |
| 2/3 | nvmet-tcp: add an helper to free the cmd buffersdrivers/ | +19 | 2 replies | |
| 3/3 | nvmet-tcp: fix memory leak when performing a controller resetdrivers/ | +4 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Sagi Grimberg | John Meneghini | Keith Busch |
|---|---|---|---|
| Series | R-b | ||
| 1/3 | R-b | R-b | |
| 2/3 | R-b | R-b | |
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH V3 0/3] Fix a race condition when performing a controller reset
Memory leaks and kernel panics involving the nvmet driver have been observed when an initiator executes a reset_controller operation while doing I/O.
The problem is due to a race condition between io_work and release_queue, the latter may end up destroying the commands while io_work is still running, causing use-after-free and memory leaks.
V3:
- rename nvmet_tcp_free_iovec() to nvmet_tcp_free_cmd_buffers()
V2:
- Use "queue->rcv_state" to prevent the race condition, as suggested by Sagi Grimberg.
- Dropped the changes to nvmet_tcp_queue_response() because they are no longer necessary.
- Fix the memory leaks in a separate patch (PATCH 3/3).
Maurizio Lombardi (3):
nvmet-tcp: fix a race condition between release_queue and io_work
nvmet-tcp: add an helper to free the cmd buffers
nvmet-tcp: fix memory leak when performing a controller reset
drivers/nvme/target/tcp.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-)
Signature · 1 line
2.27.0