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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1587032223-49460-5-git-send-email-xiangxia.m.yue@gmail.com>
Date:   Thu, 16 Apr 2020 18:17:02 +0800
From:   xiangxia.m.yue@...il.com
To:     pshelar@....org, azhou@....org, blp@....org, u9012063@...il.com
Cc:     netdev@...r.kernel.org, dev@...nvswitch.org,
        Tonghao Zhang <xiangxia.m.yue@...il.com>
Subject: [PATCH net-next v2 4/5] net: openvswitch: make EINVAL return value more obvious

From: Tonghao Zhang <xiangxia.m.yue@...il.com>

Cc: Pravin B Shelar <pshelar@....org>
Cc: Andy Zhou <azhou@....org>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@...il.com>
---
 net/openvswitch/meter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index f552c64ae8df..77fe39cf4f18 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -390,9 +390,8 @@ static int ovs_meter_cmd_set(struct sk_buff *skb, struct genl_info *info)
 	u32 meter_id;
 	bool failed;
 
-	if (!a[OVS_METER_ATTR_ID]) {
-		return -ENODEV;
-	}
+	if (!a[OVS_METER_ATTR_ID])
+		return -EINVAL;
 
 	meter = dp_meter_create(a);
 	if (IS_ERR_OR_NULL(meter))
-- 
2.23.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ