blk-mq: Fix a race between iterating over requests and freeing requests
Status from this message: Applied, thanks Bart.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest5 patches 15 repliesApplied
- v65 patches 17 repliesSuperseded
- v53 patches 8 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 3 patches | 8 replies | Superseded | |
| v3 | 3 patches | 2 replies | Superseded | |
| v2 | 1 patch | 2 replies | Superseded | |
| v1 | 1 patch | 8 replies | Superseded |
Changes in v7 from the cover letter
- Changed one comment.
- Updated Reviewed-by / Tested-by tags.
Patches in v7 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | blk-mq: Move the elevator_exit() definitionblock/ block/ | +8 | 0 replies | |
| 2/5 | blk-mq: Introduce atomic variants of blk_mq_(all_tag|tagset_busy)_iterblock/ block/ block/ +3 more | +47 | 0 replies | |
| 3/5 | blk-mq: Fix races between iterating over requests and freeing requestsblock/ block/ block/ +4 more | +102 | 14 replies | |
| 4/5 | blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_listblock/ | +6 | 0 replies | |
| 5/5 | blk-mq: Fix races between blk_mq_update_nr_hw_queues() and iterating over tagsblock/ | +39 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | Martin K. Petersen | Khazhismel Kumykov | Daniel Wagner | Shin'ichiro Kawasaki |
|---|---|---|---|---|---|
| 1/5 | R-b | A-b | R-b | R-b | T-b |
| 2/5 | R-b | A-b | R-b | R-b | T-b |
| 3/5 | R-b | T-b | |||
| 4/5 | R-b | T-b | |||
| 5/5 | R-b | T-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 5 reviewers.
Cover letter [PATCH v7 0/5] blk-mq: Fix a race between iterating over requests and freeing requests
Hi Jens,
This patch series fixes the race between iterating over requests and freeing requests that has been reported by multiple different users over the past two years. Please consider this patch series for kernel v5.13.
Thanks,
Bart.
Changes between v6 and v7:
- Changed one comment.
- Updated Reviewed-by / Tested-by tags.
Changes between v5 and v6:
- Fixed an additional race between iterating over tags and freeing scheduler requests that was spotted by Khazhy.
- Added two patches to fix the race conditions between updating the number of hardware queues and iterating over a tag set.
Changes between v4 and v5:
- Addressed Khazhy's review comments. Note: the changes that have been made in v5 only change behavior in case CONFIG_PROVE_RCU=y.
Changes between v3 and v4:
- Fixed support for tag sets shared across hardware queues.
- Renamed blk_mq_wait_for_tag_readers() into blk_mq_wait_for_tag_iter().
- Removed the fourth argument of blk_mq_queue_tag_busy_iter() again.
Changes between v2 and v3:
- Converted the single v2 patch into a series of three patches.
- Switched from SRCU to a combination of RCU and semaphores.
Changes between v1 and v2:
- Reformatted patch description.
- Added Tested-by/Reviewed-by tags.
- Changed srcu_barrier() calls into synchronize_srcu() calls.
Bart Van Assche (5):
blk-mq: Move the elevator_exit() definition
blk-mq: Introduce atomic variants of blk_mq_(all_tag|tagset_busy)_iter
blk-mq: Fix races between iterating over requests and freeing requests
blk-mq: Make it safe to use RCU to iterate over
blk_mq_tag_set.tag_list
blk-mq: Fix races between blk_mq_update_nr_hw_queues() and iterating
over tags
block/blk-core.c | 34 +++++++++- block/blk-mq-tag.c | 128 ++++++++++++++++++++++++++++++++++---- block/blk-mq-tag.h | 6 +- block/blk-mq.c | 31 ++++++--- block/blk-mq.h | 1 + block/blk.h | 11 +--- block/elevator.c | 9 +++ drivers/scsi/hosts.c | 16 ++--- drivers/scsi/ufs/ufshcd.c | 4 +- include/linux/blk-mq.h | 2 + 10 files changed, 202 insertions(+), 40 deletions(-)