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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 21 Mar 2016 11:42:38 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	Yisen.Zhuang@...wei.com
Cc:	yankejian@...wei.com, huangdaode@...ilicon.com,
	salil.mehta@...wei.com, lisheng011@...wei.com,
	lipeng321@...wei.com, liguozhu@...wei.com, arnd@...db.de,
	xieqianqian@...wei.com, andrew@...n.ch, ivecera@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linuxarm@...wei.com
Subject: Re: [PATCH net 06/10] net: hns: fix return value of the function
 about rss

From: Yisen Zhuang <Yisen.Zhuang@...wei.com>
Date: Mon, 21 Mar 2016 19:06:37 +0800

> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> index 3c4a3bc..f3a5e05 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
 ...
> @@ -1235,12 +1226,11 @@ hns_set_rss(struct net_device *netdev, const u32 *indir, const u8 *key,
>  {
>  	struct hns_nic_priv *priv = netdev_priv(netdev);
>  	struct hnae_ae_ops *ops;
> -	int ret;
>  
>  	if (AE_IS_VER1(priv->enet_ver)) {
>  		netdev_err(netdev,
>  			   "RSS feature is not supported on this hardware\n");
> -		return -EOPNOTSUPP;
> +		return (u32)-EOPNOTSUPP;
>  	}
>  

This is incredibly broken, you cannot cast this negative error return value to
an unsigned integer.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ