netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] net/mlx4_core: Fix the error flow when probing with invalid VF configuration
@ 2014-06-22 10:21 Or Gerlitz
  2014-06-23  0:14 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Or Gerlitz @ 2014-06-22 10:21 UTC (permalink / raw)
  To: davem; +Cc: netdev, amirv, matanb, jackm, Or Gerlitz

Single ported VF are currently not supported on configurations where
one or both ports are IB. When we hit this case, the relevant flow in
the driver didn't return error and jumped to the wrong label. Fix that.

Fixes: dd41cc3 ('net/mlx4: Adapt num_vfs/probed_vf params for single port VF')
Reported-by: Shirley Ma <shirley.ma@oracle.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
---

Dave, 

The bug was introduced in 3.15-rc1, can you please push the 
fix to -stable of 3.15.y?

Thanks,

Or.

 drivers/net/ethernet/mellanox/mlx4/main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 5f42f6d..82ab427 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -2439,7 +2439,8 @@ slave_start:
 			    (num_vfs_argc > 1 || probe_vfs_argc > 1)) {
 				mlx4_err(dev,
 					 "Invalid syntax of num_vfs/probe_vfs with IB port - single port VFs syntax is only supported when all ports are configured as ethernet\n");
-				goto err_close;
+				err = -EINVAL;
+				goto err_master_mfunc;
 			}
 			for (i = 0; i < sizeof(nvfs)/sizeof(nvfs[0]); i++) {
 				unsigned j;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] net/mlx4_core: Fix the error flow when probing with invalid VF configuration
  2014-06-22 10:21 [PATCH net] net/mlx4_core: Fix the error flow when probing with invalid VF configuration Or Gerlitz
@ 2014-06-23  0:14 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-06-23  0:14 UTC (permalink / raw)
  To: ogerlitz; +Cc: netdev, amirv, matanb, jackm

From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Sun, 22 Jun 2014 13:21:34 +0300

> Single ported VF are currently not supported on configurations where
> one or both ports are IB. When we hit this case, the relevant flow in
> the driver didn't return error and jumped to the wrong label. Fix that.
> 
> Fixes: dd41cc3 ('net/mlx4: Adapt num_vfs/probed_vf params for single port VF')
> Reported-by: Shirley Ma <shirley.ma@oracle.com>
> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-23  0:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-22 10:21 [PATCH net] net/mlx4_core: Fix the error flow when probing with invalid VF configuration Or Gerlitz
2014-06-23  0:14 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).