lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] block: cancel all throttled bios in del_gendisk()
Hello,

On Tue, Nov 30, 2021 at 09:17:30AM +0800, Yu Kuai wrote:
> +void blk_throtl_cancel_bios(struct request_queue *q)
> +{
> + struct throtl_data *td = q->td;
> + struct blkcg_gq *blkg;
> + struct cgroup_subsys_state *pos_css;
> + struct bio *bio;
> + int rw;
> +
> + rcu_read_lock();

So, all of the draining is being performed without holding the q lock, which
*might* be okay given that we're in the del_gendisk path but is likely risky
- ie. there can still be timers or whatever racing against it.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2021-11-30 17:27    [W:0.152 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site