This is a note to let you know that I've just added the patch titled blk-cgroup: properly pin the parent in blkcg_css_online 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-properly-pin-the-parent-in-blkcg_css_online.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. >From d7dbd43f4a828fa1d9a8614d5b0ac40aee6375fe Mon Sep 17 00:00:00 2001 From: Chris Mason <clm@xxxxxx> Date: Mon, 14 Nov 2022 10:19:30 -0800 Subject: blk-cgroup: properly pin the parent in blkcg_css_online From: Chris Mason <clm@xxxxxx> commit d7dbd43f4a828fa1d9a8614d5b0ac40aee6375fe upstream. blkcg_css_online is supposed to pin the blkcg of the parent, but 397c9f46ee4d refactored things and along the way, changed it to pin the css instead. This results in extra pins, and we end up leaking blkcgs and cgroups. Fixes: 397c9f46ee4d ("blk-cgroup: move blkcg_{pin,unpin}_online out of line") Signed-off-by: Chris Mason <clm@xxxxxx> Spotted-by: Rik van Riel <riel@xxxxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> # v5.19+ Acked-by: Johannes Weiner <hannes@xxxxxxxxxxx> Link: https://lore.kernel.org/r/20221114181930.2093706-1-clm@xxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1251,7 +1251,7 @@ static int blkcg_css_online(struct cgrou * parent so that offline always happens towards the root. */ if (parent) - blkcg_pin_online(css); + blkcg_pin_online(&parent->css); return 0; } Patches currently in stable-queue which might be from clm@xxxxxx are queue-6.0/blk-cgroup-properly-pin-the-parent-in-blkcg_css_online.patch