cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* blk-cgroup: fix wrong unlock order when parse per blkg config
@ 2017-04-21  1:23 Joseph Qi
  0 siblings, 0 replies; only message in thread
From: Joseph Qi @ 2017-04-21  1:23 UTC (permalink / raw)
  To: tj-DgEjT+Ai2ygdnm+yROfE0A; +Cc: cgroups-u79uwXL29TY76Z2rM5mHXA

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 <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] only message in thread

only message in thread, other threads:[~2017-04-21  1:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21  1:23 blk-cgroup: fix wrong unlock order when parse per blkg config Joseph Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).