Re: [PATCH] blk-mq: move bio merge attempt to blk_mq_submit_bio()

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

 



On 8/12/22 2:39 AM, Chengming Zhou wrote:
> We will try to get request from cache before alloc request, in
> both cases will first attempt bio merge.
> 
> This patch move this common part to blk_mq_submit_bio(), which
> simplify the code and avoid passing in the pointer of bio.

I don't think this will work. If we get a cached request, then we
know we have a reference to the queue. If you swap these around,
then that's no longer the case and we can have a use-after-free if
the queue goes away.

-- 
Jens Axboe




[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