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-next>] [day] [month] [year] [list]
Message-ID: <20241030072609.1645401-1-quic_shaojied@quicinc.com>
Date: Wed, 30 Oct 2024 15:26:09 +0800
From: Shaojie Dong <quic_shaojied@...cinc.com>
To: Richard Weinberger <richard@....at>,
        Anton Ivanov
	<anton.ivanov@...bridgegreys.com>,
        Johannes Berg <johannes@...solutions.net>
CC: Benjamin Berg <benjamin.berg@...el.com>,
        Tiwei Bie
	<tiwei.btw@...group.com>,
        Shaojie Dong <quic_shaojied@...cinc.com>,
        <linux-um@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] um: Remove double zero check

free_pages() performs a parameter null check inside
therefore remove double zero check here.

Signed-off-by: Shaojie Dong <quic_shaojied@...cinc.com>
---
 arch/um/kernel/skas/mmu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index d3fb506d5bd6..0eb5a1d3ba70 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -46,8 +46,7 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
 	return 0;
 
  out_free:
-	if (new_id->stack != 0)
-		free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
+	free_pages(new_id->stack, ilog2(STUB_DATA_PAGES));
  out:
 	return ret;
 }
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ