diff options
author | Haitao Huang <haitao.huang@linux.intel.com> | 2023-07-21 15:02:31 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2023-07-21 21:10:06 +0300 |
commit | 714e08cc3ec564dc1717000f5a4c1f40ca8c8878 (patch) | |
tree | 38b6d65c545aeba8022187fe40e6839f2fddfadb /kernel/cgroup/misc.c | |
parent | 32bf85c60ca3584a7ba3bef19da2779b73b2e7d6 (diff) | |
download | linux-714e08cc3ec564dc1717000f5a4c1f40ca8c8878.tar.xz |
cgroup/misc: Store atomic64_t reads to u64
Change 'new_usage' type to u64 so it can be compared with unsigned 'max'
and 'capacity' properly even if the value crosses the signed boundary.
Signed-off-by: Haitao Huang <haitao.huang@linux.intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup/misc.c')
-rw-r--r-- | kernel/cgroup/misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup/misc.c b/kernel/cgroup/misc.c index abbe9aa5cdd1..79a3717a5803 100644 --- a/kernel/cgroup/misc.c +++ b/kernel/cgroup/misc.c @@ -142,7 +142,7 @@ int misc_cg_try_charge(enum misc_res_type type, struct misc_cg *cg, u64 amount) struct misc_cg *i, *j; int ret; struct misc_res *res; - s64 new_usage; + u64 new_usage; if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type]))) return -EINVAL; |