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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091124104049.GB21600@Chamillionaire.breakpoint.cc>
Date:	Tue, 24 Nov 2009 11:40:49 +0100
From:	Florian Westphal <fw@...len.de>
To:	Stefan Assmann <sassmann@...hat.com>
Cc:	netdev <netdev@...r.kernel.org>,
	Andy Gospodarek <gospo@...hat.com>,
	alexander.h.duyck@...el.com, davem@...emloft.net
Subject: Re: [PATCH] igb: fix misinterpreted return value of pci_enable_msix

Stefan Assmann <sassmann@...hat.com> wrote:
> From: Stefan Assmann <sassmann@...hat.com>
> 
> In the igb driver a return value of 0 of function pci_enable_msix is
> interpreted as an error case. The correct behaviour is to check < 0 for error
> values.
> 
> Signed-off-by: Stefan Assmann <sassmann@...hat.com>
> ---
>  drivers/net/igb/igb_main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
> index bb1a6ee..745481d 100644
> --- a/drivers/net/igb/igb_main.c
> +++ b/drivers/net/igb/igb_main.c
> @@ -694,7 +694,7 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter)
>  	err = pci_enable_msix(adapter->pdev,
>  			      adapter->msix_entries,
>  			      numvecs);
> -	if (err == 0)
> +	if (err < 0)
>  		goto out;
>

The existing code looks correct to me:

      if (err == 0)
            goto out;

      igb_reset_interrupt_capability(adapter);

      /* If we can't do MSI-X, try MSI * */
msi_only:


so the "goto out" appears to be the "success" case.
--
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