projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32bf85c
)
cgroup/misc: Store atomic64_t reads to u64
author
Haitao Huang
<haitao.huang@linux.intel.com>
Fri, 21 Jul 2023 12:02:31 +0000
(
05:02
-0700)
committer
Tejun Heo
<tj@kernel.org>
Fri, 21 Jul 2023 18:10:06 +0000
(08:10 -1000)
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>
kernel/cgroup/misc.c
patch
|
blob
|
history
diff --git
a/kernel/cgroup/misc.c
b/kernel/cgroup/misc.c
index abbe9aa5cdd17b0c20cf06c05ba562e7d46b8034..79a3717a5803aa40c7674edc8e0c37443168b33f 100644
(file)
--- 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;
-
s
64 new_usage;
+
u
64 new_usage;
if (!(valid_type(type) && cg && READ_ONCE(misc_res_capacity[type])))
return -EINVAL;