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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 28 May 2013 14:31:16 +0800
From:	Fan Du <fan.du@...driver.com>
To:	<jesse@...ira.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: [PATCH] openvswitch: use -EEXIST as return error to be more precise

ovs_vport_cmd_new create a new vport with port num specified by user.
when this port num is already occupied, it's more clear to return
-EEXIST as the reason than -EBUSY.

Signed-off-by: Fan Du <fan.du@...driver.com>
---
 net/openvswitch/datapath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index d12d6b8..1e31095 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1755,7 +1755,7 @@ static int ovs_vport_cmd_new(struct sk_buff *skb, struct genl_info *info)
 			goto exit_unlock;
 
 		vport = ovs_vport_ovsl(dp, port_no);
-		err = -EBUSY;
+		err = -EEXIST;
 		if (vport)
 			goto exit_unlock;
 	} else {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ