[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <322f3167-d5e4-502a-ccb0-1f79ae254d3e@huawei.com>
Date: Tue, 22 Nov 2022 10:55:42 +0800
From: cuigaosheng <cuigaosheng1@...wei.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.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()
> 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 ?
>
Thanks for taking time to review this patch, I have made a patch v2 and submit it.
link: https://patchwork.kernel.org/project/netdevbpf/patch/20221122022852.1384927-1-cuigaosheng1@huawei.com/
On 2022/11/22 2:05, Maciej Fijalkowski wrote:
> 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