* [PATCH] blk-cgroup: fix wrong unlock order when parse per blkg config
@ 2017-04-24 10:52 Joseph Qi
[not found] ` <be8d9709-84fe-d2df-f294-a12701675e27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Joseph Qi @ 2017-04-24 10:52 UTC (permalink / raw)
To: tj-DgEjT+Ai2ygdnm+yROfE0A
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
wenqing.lz-3b8fjiQLQpfQT0dZR+AlfA,
boyu.mt-3b8fjiQLQpfQT0dZR+AlfA,
qijiang.qj-gPhfCIXyaqCqndwCJWfcng
From: Joseph Qi <qijiang.qj-gPhfCIXyaqCqndwCJWfcng@public.gmane.org>
In case of error blkg in blkg_conf_prep, we should unlock
queue->queue_lock first and then rcu, just like blkg_conf_finish.
Signed-off-by: Joseph Qi <qijiang.qj-gPhfCIXyaqCqndwCJWfcng@public.gmane.org>
Signed-off-by: Joseph Qi <jiangqi903-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
block/blk-cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index bbe7ee0..cc017b2 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -823,8 +823,8 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
if (IS_ERR(blkg)) {
ret = PTR_ERR(blkg);
- rcu_read_unlock();
spin_unlock_irq(disk->queue->queue_lock);
+ rcu_read_unlock();
owner = disk->fops->owner;
put_disk(disk);
module_put(owner);
--
1.9.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-cgroup: fix wrong unlock order when parse per blkg config
[not found] ` <be8d9709-84fe-d2df-f294-a12701675e27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-04-28 21:22 ` Tejun Heo
[not found] ` <20170428212233.GE22354-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2017-04-28 21:22 UTC (permalink / raw)
To: Joseph Qi
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
wenqing.lz-3b8fjiQLQpfQT0dZR+AlfA,
boyu.mt-3b8fjiQLQpfQT0dZR+AlfA,
qijiang.qj-gPhfCIXyaqCqndwCJWfcng
Hello,
On Mon, Apr 24, 2017 at 06:52:05PM +0800, Joseph Qi wrote:
> From: Joseph Qi <qijiang.qj-gPhfCIXyaqCqndwCJWfcng@public.gmane.org>
>
> In case of error blkg in blkg_conf_prep, we should unlock
> queue->queue_lock first and then rcu, just like blkg_conf_finish.
I get that this is inconsistent but why is this wrong? If this is for
consistency, can you please explain so in the commit so that people
don't confuse it for an actual bug fix?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-cgroup: fix wrong unlock order when parse per blkg config
[not found] ` <20170428212233.GE22354-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
@ 2017-05-02 0:41 ` Joseph Qi
[not found] ` <c39a752d-034e-02a0-3c46-892e42c6616a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Joseph Qi @ 2017-05-02 0:41 UTC (permalink / raw)
To: Tejun Heo
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
wenqing.lz-3b8fjiQLQpfQT0dZR+AlfA,
boyu.mt-3b8fjiQLQpfQT0dZR+AlfA,
qijiang.qj-gPhfCIXyaqCqndwCJWfcng
Fine, I will explain so and resend it later.
Thanks,
Joseph
On 17/4/29 05:22, Tejun Heo wrote:
> Hello,
>
> On Mon, Apr 24, 2017 at 06:52:05PM +0800, Joseph Qi wrote:
>> From: Joseph Qi <qijiang.qj-gPhfCIXyaqCqndwCJWfcng@public.gmane.org>
>>
>> In case of error blkg in blkg_conf_prep, we should unlock
>> queue->queue_lock first and then rcu, just like blkg_conf_finish.
>
> I get that this is inconsistent but why is this wrong? If this is for
> consistency, can you please explain so in the commit so that people
> don't confuse it for an actual bug fix?
>
> Thanks.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] blk-cgroup: fix wrong unlock order when parse per blkg config
[not found] ` <c39a752d-034e-02a0-3c46-892e42c6616a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-05-02 1:10 ` Joseph Qi
0 siblings, 0 replies; 4+ messages in thread
From: Joseph Qi @ 2017-05-02 1:10 UTC (permalink / raw)
To: Tejun Heo
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
wenqing.lz-3b8fjiQLQpfQT0dZR+AlfA,
boyu.mt-3b8fjiQLQpfQT0dZR+AlfA,
qijiang.qj-gPhfCIXyaqCqndwCJWfcng
Hi Tejun,
I've checked the upstream mainline and found that this is already fixed
as part of your commit 457e490f2b74 ("blkcg: allocate struct blkcg_gq
outside request queue spinlock"). So I do not have to resend it any
more, thanks.
Thanks,
Joseph
On 17/5/2 08:41, Joseph Qi wrote:
> Fine, I will explain so and resend it later.
>
> Thanks,
> Joseph
>
> On 17/4/29 05:22, Tejun Heo wrote:
>> Hello,
>>
>> On Mon, Apr 24, 2017 at 06:52:05PM +0800, Joseph Qi wrote:
>>> From: Joseph Qi <qijiang.qj-gPhfCIXyaqCqndwCJWfcng@public.gmane.org>
>>>
>>> In case of error blkg in blkg_conf_prep, we should unlock
>>> queue->queue_lock first and then rcu, just like blkg_conf_finish.
>>
>> I get that this is inconsistent but why is this wrong? If this is for
>> consistency, can you please explain so in the commit so that people
>> don't confuse it for an actual bug fix?
>>
>> Thanks.
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-02 1:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 10:52 [PATCH] blk-cgroup: fix wrong unlock order when parse per blkg config Joseph Qi
[not found] ` <be8d9709-84fe-d2df-f294-a12701675e27-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-28 21:22 ` Tejun Heo
[not found] ` <20170428212233.GE22354-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2017-05-02 0:41 ` Joseph Qi
[not found] ` <c39a752d-034e-02a0-3c46-892e42c6616a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-05-02 1:10 ` Joseph Qi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.