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]
Date:   Tue, 11 Jan 2022 17:35:38 +0100
From:   Håkon Bugge <haakon.bugge@...cle.com>
To:     Jason Gunthorpe <jgg@...pe.ca>, Yishai Hadas <yishaih@...dia.com>,
        Or Gerlitz <ogerlitz@...lanox.com>
Cc:     linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC for-rc] IB/mlx4: Fix the fix for reading flow-counters

It is not logical to call iboe_process_mad() when the link-layer is
Infiniband. Nevertheless, the commit message in commit 43bfb9729ea8
("IB/mlx4: Fix use of flow-counters for process_mad") explicitly state
that iboe_process_mad() shall be called.

Without this fix, reading:

yields "Invalid argument", whereas with this commit, said counter can
be read.

Please note that mlx4_1 is a VF.

Fixes: 43bfb9729ea8 ("IB/mlx4: Fix use of flow-counters for process_mad")
Signed-off-by: Håkon Bugge <haakon.bugge@...cle.com>
---
 drivers/infiniband/hw/mlx4/mad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index d13ecbd..cc83782 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -998,8 +998,8 @@ int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u32 port_num,
 		     (in->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS ||
 		      in->mad_hdr.attr_id == IB_PMA_PORT_COUNTERS_EXT ||
 		      in->mad_hdr.attr_id == IB_PMA_CLASS_PORT_INFO)))
-			return iboe_process_mad(ibdev, mad_flags, port_num,
-						in_wc, in_grh, in, out);
+			return ib_process_mad(ibdev, mad_flags, port_num,
+					      in_wc, in_grh, in, out);
 
 		return ib_process_mad(ibdev, mad_flags, port_num, in_wc, in_grh,
 				      in, out);
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ