Thanks for fixing this!
On 01.09.2023 20:44, Alexander Atanasov wrote:
check_freezer_timeout(...) is called under spin_lock_irq(...) from
update_if_frozen(...) the issue is that it does allocations under GFP_KERNEL
context - fix that by using GFP_ATOMIC.
Fixes: aab9c2fafb6b ("cgroup_freezer: print information about unfreezable
process")
https://jira.vzint.dev/browse/PSBM-150293
Reviewed-by: Pavel Tikhomirov <ptikhomi...@virtuozzo.com>
Signed-off-by: Alexander Atanasov <alexander.atana...@virtuozzo.com>
---
kernel/cgroup_freezer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
index d4747ff98090..e5da9a63813d 100644
--- a/kernel/cgroup_freezer.c
+++ b/kernel/cgroup_freezer.c
@@ -269,7 +269,7 @@ static void check_freezer_timeout(struct cgroup *cgroup,
if (!__ratelimit(&freeze_timeout_rs))
return;
- freezer_cg_name = kmalloc(PATH_MAX, GFP_KERNEL);
+ freezer_cg_name = kmalloc(PATH_MAX, GFP_ATOMIC);
if (!freezer_cg_name)
return;
@@ -283,7 +283,7 @@ static void check_freezer_timeout(struct cgroup *cgroup,
freezer_cg_name, __freeze_timeout/HZ, tgid, task->comm);
entries = kmalloc(MAX_STACK_TRACE_DEPTH * sizeof(*entries),
- GFP_KERNEL);
+ GFP_ATOMIC);
if (!entries)
goto free_cg_name;
--
Best regards, Tikhomirov Pavel
Senior Software Developer, Virtuozzo.
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel