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]
Message-ID: <CAKgsOu-PH2OJRKxLWj=UEp=XuQCpu0e_pNL2_Nkbbz8Hx2bhEw@mail.gmail.com>
Date:	Sat, 27 Oct 2012 12:36:52 -0600
From:	Konstantin Stepanyuk <konstantin.stepanyuk@...il.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, Greg Rose <gregory.v.rose@...el.com>,
	netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 02/12] ixgbe: Fix return value from macvlan filter function

On Fri, Oct 26, 2012 at 6:08 PM, Jeff Kirsher
<jeffrey.t.kirsher@...el.com> wrote:
> From: Greg Rose <gregory.v.rose@...el.com>
>
> The function to set the macvlan filter should return success or failure
> instead of the index of the filter.  The message processing function was
> misinterpreting the index as a non-zero return code indicating failure and
> NACKing MAC filter set messages that actually succeeded.
>
> Signed-off-by: Greg Rose <gregory.v.rose@...el.com>
> Tested-by: Robert Garrett <robertx.e.garrett@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> index 96876b7..b68bf0f 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
> @@ -742,7 +742,8 @@ static int ixgbe_set_vf_macvlan_msg(struct ixgbe_adapter *adapter,
>                 e_warn(drv,
>                        "VF %d has requested a MACVLAN filter but there is no space for it\n",
>                        vf);
> -       return err;
> +
> +       return !!err < 0;
This expression always resolves to false, either 0 < 0 or 1 < 0,
because '!' has higher precedence than '<'.

Thanks,
Konstantin
--
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