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] [day] [month] [year] [list]
Message-ID: <CAD-N9QXthA5JpsXkchx2rrgqWL6Z82FrVt4zF=ygRW9sYXFamA@mail.gmail.com>
Date:   Wed, 14 Jul 2021 10:24:04 +0800
From:   Dongliang Mu <mudongliangabcd@...il.com>
To:     Shannon Nelson <snelson@...sando.io>
Cc:     Jesse Brandeburg <jesse.brandeburg@...el.com>,
        Tony Nguyen <anthony.l.nguyen@...el.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Dinghao Liu <dinghao.liu@....edu.cn>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        Shannon Nelson <shannon.nelson@...el.com>,
        Catherine Sullivan <catherine.sullivan@...el.com>,
        intel-wired-lan@...ts.osuosl.org,
        "open list:NETWORKING [GENERAL]" <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] i40e: Fix error handling code of label err_set_queues

On Tue, Jul 13, 2021 at 11:16 PM Shannon Nelson <snelson@...sando.io> wrote:
>
> On 7/13/21 5:20 AM, Dongliang Mu wrote:
> > If i40e_up_complete fails in i40e_vsi_open, it goes to err_up_complete.
> > The label err_set_queues has an issue: if the else branch is executed,
> > there is no need to execute i40e_vsi_request_irq.
>
> This is unnecessary: if the else branch is executed then control will
> goto err_setup_rx, skipping over i40e_up_complete().

Oh, yes. Thank you. Please ignore this patch.

>
> sln
>
> >
> > Fix this by adding a condition of i40e_vsi_free_irq.
> >
> > Reported-by: Dongliang Mu (mudongliangabcd@...il.com)
> > Fixes: 9c04cfcd4aad ("i40e: Fix error handling in i40e_vsi_open")
> > Fixes: c22e3c6c7912 ("i40e: prep vsi_open logic for non-netdev cases")
> > Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
> > ---
> >   drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > index 861e59a350bd..ae54468c7001 100644
> > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> > @@ -8720,7 +8720,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
> >   err_up_complete:
> >       i40e_down(vsi);
> >   err_set_queues:
> > -     i40e_vsi_free_irq(vsi);
> > +     if ((vsi->netdev) || (vsi->type == I40E_VSI_FDIR))
> > +             i40e_vsi_free_irq(vsi);
> >   err_setup_rx:
> >       i40e_vsi_free_rx_resources(vsi);
> >   err_setup_tx:
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ