mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
selftests/mm: mrelease_test: fix retry limit
mrelease_test doubles the child allocation when process_mrelease() returns
ESRCH.
When size is already MAX_SIZE_MB, the current <= check still allows
another retry, causing the allocation to grow from 1024 MB to 2048 MB.
Use < instead of <= so the largest allocation attempted remains
MAX_SIZE_MB.
LLM used in discovering bug. Changes were made and reviewed manually.
Link: https://lore.kernel.org/CANOyQmFzsssM_BXHUDrV+UuVD5SZMBmSkg3UQnmw9Ns1PV7GCQ@mail.gmail.com
Fixes: 33776141b8 ("selftests: vm: add process_mrelease tests")
Signed-off-by: Aveline Noir <jm5905938@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org>
Reviewed-by: SJ Park <sj@kernel.org>
Assisted-by: LLM
Cc: Shuah Khan <shuah@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Muhammad Usama Anjum <usama.anjum@arm.com>
This commit is contained in:
parent
b3d752e23c
commit
8930760d46
|
|
@ -157,7 +157,7 @@ int main(void)
|
|||
* Retry until we succeed or reach MAX_SIZE_MB.
|
||||
*/
|
||||
if (errno == ESRCH) {
|
||||
retry = (size <= MAX_SIZE_MB);
|
||||
retry = (size < MAX_SIZE_MB);
|
||||
} else {
|
||||
waitpid(pid, NULL, 0);
|
||||
ksft_exit_fail_msg("process_mrelease: %s\n", strerror(errno));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user