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:	Wed, 29 Jun 2016 09:38:59 -0700
From:	Greg <gvrose8192@...il.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	davem@...emloft.net, Xin Long <lucien.xin@...il.com>,
	netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com,
	jogreene@...hat.com
Subject: Re: [net 2/2] ixgbevf: ixgbevf_write/read_posted_mbx should use
 IXGBE_ERR_MBX to initialize ret_val

On Wed, 2016-06-29 at 09:30 -0700, Jeff Kirsher wrote:
> From: Xin Long <lucien.xin@...il.com>
> 
> Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative
> return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(),
> it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta,
> and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we
> should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX.

I believe "initiative" should be "initial", "cause" should be "because"
and "it use err" should be "it uses err".  And I won't be a grammar nazi
about all the commas.

- Greg

> 
> With this fix, the other functions that called it also can work well,
> cause they only care about if err is 0 or not.
> 
> Signed-off-by: Xin Long <lucien.xin@...il.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
>  drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbevf/mbx.c b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> index 61a80da..2819abc 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/mbx.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/mbx.c
> @@ -85,7 +85,7 @@ static s32 ixgbevf_poll_for_ack(struct ixgbe_hw *hw)
>  static s32 ixgbevf_read_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
>  {
>  	struct ixgbe_mbx_info *mbx = &hw->mbx;
> -	s32 ret_val = -IXGBE_ERR_MBX;
> +	s32 ret_val = IXGBE_ERR_MBX;
>  
>  	if (!mbx->ops.read)
>  		goto out;
> @@ -111,7 +111,7 @@ out:
>  static s32 ixgbevf_write_posted_mbx(struct ixgbe_hw *hw, u32 *msg, u16 size)
>  {
>  	struct ixgbe_mbx_info *mbx = &hw->mbx;
> -	s32 ret_val = -IXGBE_ERR_MBX;
> +	s32 ret_val = IXGBE_ERR_MBX;
>  
>  	/* exit if either we can't write or there isn't a defined timeout */
>  	if (!mbx->ops.write || !mbx->timeout)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ