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]
Message-ID: <20240409103144.175377-6-thorsten.blum@toblux.com>
Date: Tue,  9 Apr 2024 12:31:49 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Michal Simek <monstr@...str.eu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Hugh Dickins <hughd@...gle.com>
Cc: linux-kernel@...r.kernel.org,
	Thorsten Blum <thorsten.blum@...lux.com>
Subject: [PATCH] microblaze: Improve data type of return variable

Since restore_sigcontext() returns an int and err is its return variable,
which can be negative, it should be of type int instead of unsigned int.

Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
---
 arch/microblaze/kernel/signal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index c78a0ff48066..51f718a42e2c 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -57,7 +57,7 @@ struct rt_sigframe {
 static int restore_sigcontext(struct pt_regs *regs,
 				struct sigcontext __user *sc, int *rval_p)
 {
-	unsigned int err = 0;
+	int err = 0;
 
 #define COPY(x)		{err |= __get_user(regs->x, &sc->regs.x); }
 	COPY(r0);
-- 
2.44.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ