Re: [PATCH v6 0/5] blk-mq: Fix a race between iterating over requests and freeing requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Apr 06, 2021 / 14:49, Bart Van Assche wrote:
> 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 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.

I applied this v6 series on top of the kernel v5.12-rc6 and tested again.
I needed to apply another dependent fix patch [1] also to avoid conflict.

[1] https://marc.info/?l=linux-block&m=161545067909064&w=2

I confirmed this series fixes the use-after-free issue, and observed no
regression in my test set. For the series, especially for the patches #3-5,

Tested-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

-- 
Best Regards,
Shin'ichiro Kawasaki



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux