[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250823022128.3183940-1-ynaffit@google.com>
Date: Fri, 22 Aug 2025 19:21:28 -0700
From: Tiffany Yang <ynaffit@...gle.com>
To: linux-kernel@...r.kernel.org
Cc: kernel test robot <lkp@...el.com>, Tejun Heo <tj@...nel.org>, kernel-team@...roid.com,
Johannes Weiner <hannes@...xchg.org>, "Michal Koutný" <mkoutny@...e.com>, cgroups@...r.kernel.org
Subject: [PATCH] cgroup: Fix 64-bit division in cgroup.stat.local
Fix the following build error for 32-bit systems:
arm-linux-gnueabi-ld: kernel/cgroup/cgroup.o: in function `cgroup_core_local_stat_show':
>> kernel/cgroup/cgroup.c:3781:(.text+0x28f4): undefined reference to `__aeabi_uldivmod'
arm-linux-gnueabi-ld: (__aeabi_uldivmod): Unknown destination type (ARM/Thumb) in kernel/cgroup/cgroup.o
>> kernel/cgroup/cgroup.c:3781:(.text+0x28f4): dangerous relocation: unsupported relocation
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508230604.KyvqOy81-lkp@intel.com/
Signed-off-by: Tiffany Yang <ynaffit@...gle.com>
Cc: Tejun Heo <tj@...nel.org>
---
This patch is based on top of tj/cgroup.git:for-6.18
---
kernel/cgroup/cgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index ab096b884bbc..b38d7a847ed4 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -3778,8 +3778,8 @@ static int cgroup_core_local_stat_show(struct seq_file *seq, void *v)
cgrp->freezer.freeze_start_nsec);
} while (read_seqcount_retry(&cgrp->freezer.freeze_seq, sequence));
- seq_printf(seq, "frozen_usec %llu\n",
- (unsigned long long) freeze_time / NSEC_PER_USEC);
+ do_div(freeze_time, NSEC_PER_USEC);
+ seq_printf(seq, "frozen_usec %llu\n", freeze_time);
return 0;
}
--
2.51.0.rc2.233.g662b1ed5c5-goog
Powered by blists - more mailing lists