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-prev] [day] [month] [year] [list]
Date:	Thu, 14 Jul 2016 08:56:37 +0300
From:	Leon Romanovsky <leonro@...lanox.com>
To:	Jason Gunthorpe <jgunthorpe@...idianresearch.com>
CC:	Dan Carpenter <dan.carpenter@...cle.com>,
	Matan Barak <matanb@...lanox.com>,
	Or Gerlitz <ogerlitz@...lanox.com>, <netdev@...r.kernel.org>,
	<linux-rdma@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [patch v2] net/mlx5: missing error code in
 esw_create_offloads_fdb_table()

On Wed, Jul 13, 2016 at 11:54:54AM -0600, Jason Gunthorpe wrote:
> On Wed, Jul 13, 2016 at 02:48:44PM +0300, Dan Carpenter wrote:
> > We accidentally return success when we had intended to return an error
> > code.
> > 
> > Fixes: 69697b6e2086 ('net/mlx5: E-Switch, Add support for the sriov offloads mode')
> > Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> > v2: return -ENOTSUPP instead --EINVAL
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> > index 1842dfb..7d982cf 100644
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> > @@ -183,6 +183,7 @@ static int esw_create_offloads_fdb_table(struct mlx5_eswitch *esw, int nvports)
> >  
> >  	root_ns = mlx5_get_flow_namespace(dev, MLX5_FLOW_NAMESPACE_FDB);
> >  	if (!root_ns) {
> > +		err = -ENOTSUPP;
> 
> Did you mean ENOTSUP?
> 
> I thought ENOTSUPP was not to be used outside NFS, and isn't properly
> exported to userspace..
> 
> $ find /usr/include -name "*errno*" | xargs grep 524

I asked similar question [1] with different return value in reply
to this patch.

[1] http://marc.info/?l=linux-netdev&m=146843171508230&w=2

> 
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ