[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7a1b930-2b02-4fd0-861b-cf0465c8d141@lucifer.local>
Date: Sun, 27 Aug 2023 10:22:50 +0100
From: Lorenzo Stoakes <lstoakes@...il.com>
To: "Joel Fernandes (Google)" <joel@...lfernandes.org>
Cc: linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-mm@...ck.org, Shuah Khan <shuah@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>,
Michal Hocko <mhocko@...e.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Kirill A Shutemov <kirill@...temov.name>,
"Liam R. Howlett" <liam.howlett@...cle.com>,
"Paul E. McKenney" <paulmck@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Kalesh Singh <kaleshsingh@...gle.com>,
Lokesh Gidra <lokeshgidra@...gle.com>
Subject: Re: [PATCH v5 3/7] selftests: mm: Fix failure case when new remap
region was not found
On Tue, Aug 22, 2023 at 01:54:56AM +0000, Joel Fernandes (Google) wrote:
> When a valid remap region could not be found, the source mapping is not
> cleaned up. Fix the goto statement such that the clean up happens.
>
> Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
> ---
> tools/testing/selftests/mm/mremap_test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/mremap_test.c b/tools/testing/selftests/mm/mremap_test.c
> index 5c3773de9f0f..6822d657f589 100644
> --- a/tools/testing/selftests/mm/mremap_test.c
> +++ b/tools/testing/selftests/mm/mremap_test.c
> @@ -316,7 +316,7 @@ static long long remap_region(struct config c, unsigned int threshold_mb,
> if (addr + c.dest_alignment < addr) {
> ksft_print_msg("Couldn't find a valid region to remap to\n");
> ret = -1;
> - goto out;
> + goto clean_up_src;
> }
> addr += c.dest_alignment;
> }
> --
> 2.42.0.rc1.204.g551eb34607-goog
>
Nice spot!
Reviewed-by: Lorenzo Stoakes <lstoakes@...il.com>
Powered by blists - more mailing lists