Add dynamic type conversion from unsigned int to uint64_t to solve the
overflow problem. Previously, it tries to left shift operation
on a single unsigned int (32bit) variable by PAGE_SIZE bits,
it may cause an issue exceeding 32bit.
Change-Id: I29aa9e6c6c38db1fea4778bca896f91a21cde104
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
Name: resourced
Summary: Resource management daemon
-Version: 9.0.0
+Version: 9.0.1
Release: 1
Group: System/Libraries
License: Apache-2.0
return r;
}
- swap_size_bytes = swap_size_pages <<= PAGE_SHIFT;
+ swap_size_bytes = ((uint64_t) swap_size_pages) << PAGE_SHIFT;
if (swap_size_bytes <= zswap_control.zswap_reclaim_bytes)
return 0;