Re: [PATCH v3 3/3] 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 3/26/21 1:44 AM, Shinichiro Kawasaki wrote:
> I applied this series on v5.12-rc4 and ran blktests block/005 with a HDD behind
> SAS-HBA, and I observed kernel INFO and WARNING [1]. It looks like that
> tags->iter_rwsem is not initialized. I found blk_mq_init_tags() has two paths
> to "return tags". I think when blk_mq_init_tags() returns at the first path to
> "return tags", tags->iter_rwsem misses the initialization. To confirm it, I
> moved the init_rwsem() before the first "return tags", then saw the kernel
> messages disappeared (use-after-free disappeared also).

Hi Shinichiro,

Thanks for the quick feedback. I agree with your analysis and will fix
this in v4 of this patch series.

Bart.



[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