OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
From: no-reply@sashiko.virtuozzo.com
To: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>,
	khorenko@virtuozzo.com, ptikhomirov@virtuozzo.com
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 4/6] ms/cgroup/dmem: Return -ENOMEM on failed pool preallocation
Date: Sun, 1 Nov 2026 23:55:54 +0000	[thread overview]
Message-ID: <010701a1998a85da-a53432b2-ef86-4a65-8e1d-cb07c2873640-000000@eu-central-1.amazonses.com> (raw)
In-Reply-To: <20261101235155.124059-5-mirian.shilakadze@virtuozzo.com>

> From: Guopeng Zhang <zhangguopeng@kylinos.cn>
> 
> get_cg_pool_unlocked() handles allocation failures under dmemcg_lock by
> dropping the lock, preallocating a pool with GFP_KERNEL, and retrying the
> locked lookup and creation path.
> 
> If the fallback allocation fails too, pool remains NULL. Since the loop
> condition is while (!pool), the function can keep retrying instead of
> propagating the allocation failure to the caller.
> 
> Set pool to ERR_PTR(-ENOMEM) when the fallback allocation fails so the
> loop exits through the existing common return path. The callers already
> handle ERR_PTR() from get_cg_pool_unlocked(), so this restores the
> expected error path.
> 
> Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
> Cc: stable@vger.kernel.org # v6.14+
> Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> (cherry picked from commit 796ad622040f7f955ccc3973085e953415920496)
> 
> https://virtuozzo.atlassian.net/browse/VSTOR-152813
> Signed-off-by: Mirian Shilakadze <mirian.shilakadze@virtuozzo.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261101235155.124059-1-mirian.shilakadze@virtuozzo.com?part=4


_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-01 23:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 23:51 [Devel] [PATCH hci-8.1 0/6] cgroup/dmem: backport fixes and apply a lower dmem.max at once Mirian Shilakadze
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 1/6] ms/cgroup/dmem: fix NULL pointer dereference when setting max Mirian Shilakadze
2026-11-01 23:54   ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 2/6] ms/cgroup/dmem: avoid rcu warning when unregister region Mirian Shilakadze
2026-11-01 23:55   ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 3/6] ms/cgroup/dmem: avoid pool UAF Mirian Shilakadze
2026-11-01 23:56   ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 4/6] ms/cgroup/dmem: Return -ENOMEM on failed pool preallocation Mirian Shilakadze
2026-11-01 23:55   ` no-reply [this message]
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 5/6] ms/drm/ttm: Convert -EAGAIN from dmem_cgroup_try_charge to -ENOSPC Mirian Shilakadze
2026-11-01 23:56   ` no-reply
2026-11-01 23:51 ` [Devel] [PATCH hci-8.1 6/6] ms/cgroup/dmem: Add reclaim callback for lowering max below current usage Mirian Shilakadze
2026-11-01 23:57   ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=010701a1998a85da-a53432b2-ef86-4a65-8e1d-cb07c2873640-000000@eu-central-1.amazonses.com \
    --to=no-reply@sashiko.virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    --cc=mirian.shilakadze@virtuozzo.com \
    --cc=ptikhomirov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox