lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1e79b5d1-5d11-4157-a7f8-1e691e91af2a@collabora.com>
Date: Sun, 16 Mar 2025 00:06:16 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Cyan Yang <cyan.yang@...ive.com>, akpm@...ux-foundation.org,
 shuah@...nel.org, david@...hat.com
Cc: linux-mm@...ck.org, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] selftests/mm/cow: Fix the incorrect error handling

On 3/12/25 9:38 AM, Cyan Yang wrote:
> There is an error handling did not check the correct return value.
> This patch will fix it.
> 
> Fixes: f4b5fd6946e244cdedc3bbb9a1f24c8133b2077a ("selftests/vm: anon_cow: THP tests")
> Signed-off-by: Cyan Yang <cyan.yang@...ive.com>
After improving the description:
Reviewed-by: Muhammad Usama Anjum <usama.anjum@...labora.com>

> ---
>  tools/testing/selftests/mm/cow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/cow.c
> index 9446673645eb..f0cb14ea8608 100644
> --- a/tools/testing/selftests/mm/cow.c
> +++ b/tools/testing/selftests/mm/cow.c
> @@ -876,7 +876,7 @@ static void do_run_with_thp(test_fn fn, enum thp_run thp_run, size_t thpsize)
>  		mremap_size = thpsize / 2;
>  		mremap_mem = mmap(NULL, mremap_size, PROT_NONE,
>  				  MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
> -		if (mem == MAP_FAILED) {
> +		if (mremap_mem == MAP_FAILED) {
>  			ksft_test_result_fail("mmap() failed\n");
>  			goto munmap;
>  		}


-- 
Regards,
Usama

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ