From nobody Tue Dec 23 14:20:21 2025 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C21401474B8 for ; Mon, 13 Jan 2025 03:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736739010; cv=none; b=jztokBPLE5AGXDvIx1ZIAlx6vkLcDW8z17kJVuZNBobD1wiY0JbD6RcoWOUQCjY44il4S/htMPT2GgrrKlRTfCnaT/kSjQepDQm1+ld+8cq3Fk7lbMXeHqNDKl046XWWcahy9i/QB00XddItI7YEmZv3TEDC6K+kdlLbsxjVFPQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736739010; c=relaxed/simple; bh=Ewqwnd+/ah5GoAMn2GSz9F/fLFjVA9NDczmnTpzbEiQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Ap9JdOWkHPj0XbJXNMYnbMCXX0JUc+dBYNn5d4FdLtIzd7+durwPRk9r1mvl6qIahU0oDp/53YlIM12/q6u9SMple+QbTO4nfMmLI4bu2/9hF/fhe0c+2uz/dL2AeTEnNG88QIGtbfxcVyk+vk3rYpGEf1IqrmT9Qyr0Hors2/U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=E32UpTCP; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="E32UpTCP" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1736738989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=X2PZYMbjMztwng0pKClJp1s6F1vIoijyzdKqPaUaI2U=; b=E32UpTCPu46MD9WsZcIMek+xEFu8oOaY8IFMzMtaWDaAB2ik9KdUinv06+zpnLPhLG/Pia z43BrmCLRffY7nVF13Ul0ebfdqvcFZPOsQGBqAYhZa01BNy7SAMNBCY3FYtuExaWHsO1pJ iA70r9qLG4gpWkBcMr6yJNa9joPHnW8= From: Hao Ge To: akpm@linux-foundation.org, shuah@kernel.org Cc: sj@kernel.org, linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, hao.ge@linux.dev, Hao Ge Subject: [PATCH] selftests/mm/cow: Modify the incorrect checking parameters Date: Mon, 13 Jan 2025 11:28:58 +0800 Message-Id: <20250113032858.63670-1-hao.ge@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Hao Ge In the run_with_memfd_hugetlb function, some error handle have passed incorrect parameters. It should be "smem", but it was mistakenly written as "mem". Let's fix it. Fixes: baa489fabd01 ("selftests/vm: rename selftests/vm to selftests/mm") Signed-off-by: Hao Ge --- tools/testing/selftests/mm/cow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/mm/cow.c b/tools/testing/selftests/mm/= cow.c index 32c6ccc2a6be..7a89680d1566 100644 --- a/tools/testing/selftests/mm/cow.c +++ b/tools/testing/selftests/mm/cow.c @@ -1684,7 +1684,7 @@ static void run_with_memfd_hugetlb(non_anon_test_fn f= n, const char *desc, goto close; } smem =3D mmap(NULL, hugetlbsize, PROT_READ, MAP_SHARED, fd, 0); - if (mem =3D=3D MAP_FAILED) { + if (smem =3D=3D MAP_FAILED) { ksft_test_result_fail("mmap() failed\n"); goto munmap; } @@ -1696,7 +1696,7 @@ static void run_with_memfd_hugetlb(non_anon_test_fn f= n, const char *desc, fn(mem, smem, hugetlbsize); munmap: munmap(mem, hugetlbsize); - if (mem !=3D MAP_FAILED) + if (smem !=3D MAP_FAILED) munmap(smem, hugetlbsize); close: close(fd); --=20 2.25.1