* [PATCH] cgroup: Fix 64-bit division in cgroup.stat.local
@ 2025-08-23 2:21 Tiffany Yang
2025-08-25 18:18 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Tiffany Yang @ 2025-08-23 2:21 UTC (permalink / raw)
To: linux-kernel
Cc: kernel test robot, Tejun Heo, kernel-team, Johannes Weiner,
Michal Koutný, cgroups
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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508230604.KyvqOy81-lkp@intel.com/
Signed-off-by: Tiffany Yang <ynaffit@google.com>
Cc: Tejun Heo <tj@kernel.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cgroup: Fix 64-bit division in cgroup.stat.local
2025-08-23 2:21 [PATCH] cgroup: Fix 64-bit division in cgroup.stat.local Tiffany Yang
@ 2025-08-25 18:18 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2025-08-25 18:18 UTC (permalink / raw)
To: Tiffany Yang
Cc: linux-kernel, kernel test robot, kernel-team, Johannes Weiner,
Michal Koutný, cgroups
On Fri, Aug 22, 2025 at 07:21:28PM -0700, Tiffany Yang wrote:
> 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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508230604.KyvqOy81-lkp@intel.com/
> Signed-off-by: Tiffany Yang <ynaffit@google.com>
> Cc: Tejun Heo <tj@kernel.org>
Applied to cgroup/for-6.18.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-25 18:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-23 2:21 [PATCH] cgroup: Fix 64-bit division in cgroup.stat.local Tiffany Yang
2025-08-25 18:18 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).