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>] [day] [month] [year] [list]
Date:   Sun, 17 Sep 2023 20:12:41 +0300
From:   mohammed0x00 <mmansour.mm5@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     mohammed0x00 <mmansour.mm5@...il.com>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] ipc: Using unlikely macro is more efficient.

Signed-off-by: Mohammed Mansour <mmansour.mm5@...il.com>
---
 ipc/shm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/shm.c b/ipc/shm.c
index 576a543b7..8ce67ae16 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -734,7 +734,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
 
 	shp->shm_perm.security = NULL;
 	error = security_shm_alloc(&shp->shm_perm);
-	if (error) {
+	if (unlikely(error)) {
 		kfree(shp);
 		return error;
 	}
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ