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:   Mon, 2 Aug 2021 19:40:42 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Geetha sowjanya <gakula@...vell.com>,
        Sunil Kovvuri Goutham <Sunil.Goutham@...ium.com>,
        "David S. Miller" <davem@...emloft.net>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 5.10 45/67] octeontx2-pf: Fix interface down flag on error

Hi!

> This patch fixes the issue by setting the INTF_DOWN flag on
> error and free the resources in otx2_stop only if the flag is
> not set.

Ok.

ernet/marvell/octeontx2/nic/otx2_ethtool.c
> index 662fb80dbb9d..c6d408de0605 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> @@ -230,15 +230,14 @@ static int otx2_set_channels(struct net_device *dev,
>  	err = otx2_set_real_num_queues(dev, channel->tx_count,
>  				       channel->rx_count);
>  	if (err)
> -		goto fail;
> +		return err;
>

But with the new flag, this change is not neccessary, right?

Plus, it will lead to surprising result of otx2_set_channels() downing
interface on failure, no?

>  	pfvf->hw.rx_queues = channel->rx_count;
>  	pfvf->hw.tx_queues = channel->tx_count;
>  	pfvf->qset.cq_cnt = pfvf->hw.tx_queues +  pfvf->hw.rx_queues;
>  
> -fail:
>  	if (if_up)
> -		dev->netdev_ops->ndo_open(dev);
> +		err = dev->netdev_ops->ndo_open(dev);

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ