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: <Y3u95fVsT/7zXQQp@boxer>
Date:   Mon, 21 Nov 2022 19:05:25 +0100
From:   Maciej Fijalkowski <maciej.fijalkowski@...el.com>
To:     Gaosheng Cui <cuigaosheng1@...wei.com>
CC:     "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
        "alexander.h.duyck@...el.com" <alexander.h.duyck@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net] intel/igbvf: free irq on the error path in
 igbvf_request_msix()

On Sun, Nov 20, 2022 at 07:17:57AM +0100, Gaosheng Cui wrote:
> In igbvf_request_msix(), irqs have not been freed on the err path,
> we need to free it. Fix it.
> 
> Fixes: d4e0fe01a38a ("igbvf: add new driver to support 82576 virtual functions")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@...wei.com>

Hi,

> ---
>  drivers/net/ethernet/intel/igbvf/netdev.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
> index 3a32809510fc..e212ca16df00 100644
> --- a/drivers/net/ethernet/intel/igbvf/netdev.c
> +++ b/drivers/net/ethernet/intel/igbvf/netdev.c
> @@ -1074,7 +1074,7 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
>  			  igbvf_intr_msix_rx, 0, adapter->rx_ring->name,
>  			  netdev);
>  	if (err)
> -		goto out;
> +		goto free_irq1;

s/free_irq1/free_irq_tx ?

>  
>  	adapter->rx_ring->itr_register = E1000_EITR(vector);
>  	adapter->rx_ring->itr_val = adapter->current_itr;
> @@ -1083,10 +1083,14 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter)
>  	err = request_irq(adapter->msix_entries[vector].vector,
>  			  igbvf_msix_other, 0, netdev->name, netdev);
>  	if (err)
> -		goto out;
> +		goto free_irq2;

s/free_irq2/free_irq_rx ?

>  
>  	igbvf_configure_msix(adapter);
>  	return 0;
> +free_irq2:
> +	free_irq(adapter->msix_entries[--vector].vector, netdev);
> +free_irq1:
> +	free_irq(adapter->msix_entries[--vector].vector, netdev);
>  out:
>  	return err;

Besides above suggestions, change LGTM.

Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@...el.com>

>  }
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ