blk-cgroup: properly pin the parent in blkcg_css_online
Subsystems (2)
PATCH 1/1 blk-cgroup: properly pin the parent in blkcg_css_online
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.
--- block/blk-cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
block/blk-cgroup.c +1 -1
@@ -1213,7 +1213,7 @@ static int blkcg_css_online(struct cgroup_subsys_state *css)* parent so that offline always happens towards the root. */ if (parent) -blkcg_pin_online (css); +blkcg_pin_online (&parent->css);return 0 ; }
Signature · 1 line
2.30.2
Quoted 9 lines · Chris Mason
blkcg_css_onlineis supposed to pin the blkcg of the parent, but397c9f46ee4drefactored 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 <[email protected]>Spotted-by Rik van Riel <[email protected]>Cc <[email protected]> # v5.19+
Quoted 6 lines · Chris Mason
blkcg_css_onlineis supposed to pin the blkcg of the parent, but397c9f46ee4drefactored 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.
Applied, thanks!
[1/1] blk-cgroup: properly pin the parent in blkcg_css_online
commit: d7dbd43f4a828fa1d9a8614d5b0ac40aee6375fe
Best regards,
Signature · 1 line
Jens Axboe
Looks good: