Skip to content

loop: fix memcg css leak on read-only I/O path - #1113

Closed
blktests-ci-kpd[bot] wants to merge 1 commit into
linus-master_basefrom
series/1143433=>linus-master
Closed

loop: fix memcg css leak on read-only I/O path#1113
blktests-ci-kpd[bot] wants to merge 1 commit into
linus-master_basefrom
series/1143433=>linus-master

Conversation

@blktests-ci-kpd

Copy link
Copy Markdown

Pull request for series with
subject: loop: fix memcg css leak on read-only I/O path
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1143433

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 06cf618
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: d58772d
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 6d57925 to f73d401 Compare August 10, 2026 22:32
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: f5bbbfe
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from f73d401 to 804048f Compare August 12, 2026 13:30
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 3d6d817
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 804048f to 02890f9 Compare August 12, 2026 19:19
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 3aa1dca
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 02890f9 to 852dc35 Compare August 13, 2026 19:21
@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the linus-master_base branch 2 times, most recently from d89ab11 to fdba928 Compare August 16, 2026 18:34
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: fd923b3
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 852dc35 to c897157 Compare August 16, 2026 19:33
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 8d3ae59
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from c897157 to 16ea90b Compare August 17, 2026 14:34
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: bd5f485
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 16ea90b to 36effca Compare August 19, 2026 06:00
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 66498c7
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 36effca to ac702d8 Compare August 25, 2026 03:57
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 502d457
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from ac702d8 to 3c7325f Compare August 26, 2026 21:16
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: cf72cbb
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 3c7325f to 114eaa5 Compare August 29, 2026 07:14
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: cee9395
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 114eaa5 to da9e5dd Compare August 31, 2026 10:59
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 89a3129
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from da9e5dd to b350054 Compare September 2, 2026 09:33
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: bc35965
series: https://patchwork.kernel.org/project/linux-block/list/?series=1143433
version: 1

@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from b350054 to eaedcc3 Compare September 4, 2026 06:47
@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: df29080
series: https://patchwork.kernel.org/series/1143433/
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1143433/
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To record the empty patch as an empty commit, run "git am --allow-empty".
To restore the original branch and stop patching, run "git am --abort".'

conflict:


@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 28924df
series: https://patchwork.kernel.org/series/1143433/
version: 1

@blktests-ci-kpd

Copy link
Copy Markdown
Author

Upstream branch: 893e117
series: https://patchwork.kernel.org/series/1143433/
version: 1

loop_queue_rq() takes a reference on the effective memcg css via
cgroup_get_e_css() and stores it in cmd->memcg_css. loop_handle_cmd()
is supposed to drop that reference after use, but the early exit for
writes to a read-only loop device jumps past css_put().

When testing on cgroup v2, stack a dm-linear device on a read-only
loop and issue writes to it from a child cgroup, then remove that
cgroup: nr_dying_subsys_memory in cgroup.stat increases and never goes
back down until reboot. The same test no longer shows the leak with
this patch.

Fix by moving css_put() onto the shared exit path so the read-only
failure case drops the reference as well.

Fixes: c74d40e ("loop: charge i/o to mem and blk cg")
Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
@blktests-ci-kpd
blktests-ci-kpd Bot force-pushed the series/1143433=>linus-master branch from 8ee11a3 to 2a52908 Compare September 9, 2026 08:30
@blktests-ci-kpd

Copy link
Copy Markdown
Author

At least one diff in series https://patchwork.kernel.org/series/1143433/ irrelevant now for [{'archived': False, 'project': 241}] search patterns

@blktests-ci-kpd blktests-ci-kpd Bot closed this Sep 9, 2026
@blktests-ci-kpd
blktests-ci-kpd Bot deleted the series/1143433=>linus-master branch September 11, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants