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, 11 May 2008 21:57:40 +0200
From:	Marcin Slusarz <marcin.slusarz@...il.com>
To:	LKML <linux-kernel@...r.kernel.org>
Cc:	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: [RFC] [PATCH] s390/net/claw: don't ignore return value of find_link

find_link checked some conditions but then ignored it - fix it.
return negative error for consistency with the rest of kernel

Signed-off-by: Marcin Slusarz <marcin.slusarz@...il.com>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
---
please check if it's correct patch
---
 drivers/s390/net/claw.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -1722,18 +1722,18 @@ find_link(struct net_device *dev, char *host_name, char *ws_name )
 		case  PACKING_ASK:
 			if ((memcmp(WS_APPL_NAME_PACKED, host_name, 8)!=0) ||
 			    (memcmp(WS_APPL_NAME_PACKED, ws_name, 8)!=0 ))
-        	             rc = EINVAL;
+				rc = -EINVAL;
 			break;
 		case  DO_PACKED:
 		case  PACK_SEND:
 			if ((memcmp(WS_APPL_NAME_IP_NAME, host_name, 8)!=0) ||
 			    (memcmp(WS_APPL_NAME_IP_NAME, ws_name, 8)!=0 ))
-        	        	rc = EINVAL;
+				rc = -EINVAL;
 			break;
 		default:
 	       		if ((memcmp(HOST_APPL_NAME, host_name, 8)!=0) ||
 		    	    (memcmp(p_env->api_type , ws_name, 8)!=0))
-        	        	rc = EINVAL;
+				rc = -EINVAL;
 			break;
 	}
 
@@ -1741,7 +1741,7 @@ find_link(struct net_device *dev, char *host_name, char *ws_name )
         printk(KERN_INFO "%s:%s Exit on line %d\n",
 		dev->name,__func__,__LINE__);
 #endif
-        return 0;
+	return rc;
 }    /*    end of find_link    */
 
 /*-------------------------------------------------------------------*
-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ