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-next>] [day] [month] [year] [list]
Message-ID: <CAM5t4r_uaRPJT0kiaqNkygu1ciCoVSVQhj5MLkn69uieXx1MHA@mail.gmail.com>
Date:	Fri, 25 Sep 2015 10:39:21 -0400
From:	Robb Manes <rmanes@...hat.com>
To:	netdev <netdev@...r.kernel.org>
Cc:	Amir Vadai <amirv@...lanox.com>, Eyal Perry <eyalpe@...lanox.com>,
	ogerlitz@...lanox.com
Subject: [PATCH] net/mlx4: Handle return codes in mlx4_qp_attach_common

Both new_steering_entry() and existing_steering_entry() return values
based on their success or failure, but currently they fall through
silently.  This can make troubleshooting difficult, as we were unable
to tell which one of these two functions returned errors or
specifically what code was returned.  This patch remedies that
situation by passing the return codes to err, which is returned by
mlx4_qp_attach_common() itself.

This also addresses a leak in the call to mlx4_bitmap_free() as well.

Signed-off-by: Robb Manes <rmanes@...hat.com>
---
 drivers/net/ethernet/mellanox/mlx4/mcg.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c
b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index bd9ea0d..1d4e2e0 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -1184,10 +1184,11 @@ out:
     if (prot == MLX4_PROT_ETH) {
         /* manage the steering entry for promisc mode */
         if (new_entry)
-            new_steering_entry(dev, port, steer, index, qp->qpn);
+            err = new_steering_entry(dev, port, steer,
+                         index, qp->qpn);
         else
-            existing_steering_entry(dev, port, steer,
-                        index, qp->qpn);
+            err = existing_steering_entry(dev, port, steer,
+                              index, qp->qpn);
     }
     if (err && link && index != -1) {
         if (index < dev->caps.num_mgms)
-- 
2.4.3
--
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