lkml.org 
[lkml]   [2023]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next 3/4] block/rq_qos: use a global mutex to protect rq_qos apis
On Wed, Jan 04, 2023 at 04:53:53PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> This patch fix following problems:
>
> 1) rq_qos_add() and rq_qos_del() is protected, while rq_qos_exit() is
> not.

This part makes sense.

> 2) rq_qos_add() and blkcg_activate_policy() is not atomic, if
> rq_qos_exit() is done before blkcg_activate_policy(),
> null-ptr-deference can be triggered.

I'm not sure this part does. I think it'd be better to guarantee that device
destruction is blocked while these configuration operations are in progress
which can be built into blkg_conf helpers.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2023-03-26 23:27    [W:0.046 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site