Patch "blk-cgroup: fix error unwinding in blkcg_init_queue" has been added to the 6.0-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    blk-cgroup: fix error unwinding in blkcg_init_queue

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     blk-cgroup-fix-error-unwinding-in-blkcg_init_queue.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 06b1a6a63c8fffaeef0d5f5ffe630222f54e5412
Author: Christoph Hellwig <hch@xxxxxx>
Date:   Wed Sep 21 20:04:45 2022 +0200

    blk-cgroup: fix error unwinding in blkcg_init_queue
    
    [ Upstream commit 33dc62796cb657a633050138a86253fb2a553713 ]
    
    When blk_throtl_init fails, we need to call blk_ioprio_exit.  Switch to
    proper goto based unwinding to fix this.
    
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Andreas Herrmann <aherrmann@xxxxxxx>
    Acked-by: Tejun Heo <tj@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220921180501.1539876-2-hch@xxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Stable-dep-of: 813e693023ba ("blk-iolatency: Fix memory leak on add_disk() failures")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index c8f0c865bf4e..bcd3873ac5ff 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1297,17 +1297,18 @@ int blkcg_init_queue(struct request_queue *q)
 
 	ret = blk_throtl_init(q);
 	if (ret)
-		goto err_destroy_all;
+		goto err_ioprio_exit;
 
 	ret = blk_iolatency_init(q);
-	if (ret) {
-		blk_throtl_exit(q);
-		blk_ioprio_exit(q);
-		goto err_destroy_all;
-	}
+	if (ret)
+		goto err_throtl_exit;
 
 	return 0;
 
+err_throtl_exit:
+	blk_throtl_exit(q);
+err_ioprio_exit:
+	blk_ioprio_exit(q);
 err_destroy_all:
 	blkg_destroy_all(q);
 	return ret;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux