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]
Message-Id: <1519809862-61464-1-git-send-email-arkadis@mellanox.com>
Date:   Wed, 28 Feb 2018 11:24:22 +0200
From:   Arkadi Sharshevsky <arkadis@...lanox.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net, stephen@...workplumber.org,
        dsa@...ulusnetworks.com, mlxsw@...lanox.com,
        Arkadi Sharshevsky <arkadis@...lanox.com>
Subject: [PATCH iproute2] devlink: Fix error reporting

The current code doesn't set errno in case of extended ack.

Fixes: 049c58539f5d ("devlink: mnlg: Add support for extended ack")
Signed-off-by: Arkadi Sharshevsky <arkadis@...lanox.com>
Acked-by: Jiri Pirko <jiri@...lanox.com>
---
 devlink/mnlg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/devlink/mnlg.c b/devlink/mnlg.c
index 37c5687..3d28453 100644
--- a/devlink/mnlg.c
+++ b/devlink/mnlg.c
@@ -71,15 +71,15 @@ static int mnlg_cb_error(const struct nlmsghdr *nlh, void *data)
 {
 	const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh);
 
-	if (nl_dump_ext_ack(nlh, NULL))
-		return MNL_CB_STOP;
-
 	/* Netlink subsystems returns the errno value with different signess */
 	if (err->error < 0)
 		errno = -err->error;
 	else
 		errno = err->error;
 
+	if (nl_dump_ext_ack(nlh, NULL))
+		return MNL_CB_ERROR;
+
 	return err->error == 0 ? MNL_CB_STOP : MNL_CB_ERROR;
 }
 
-- 
2.4.11

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ