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:   Thu, 2 Feb 2023 10:44:39 +0200
From:   Leon Romanovsky <leon@...nel.org>
To:     Shannon Nelson <shannon.nelson@....com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
        drivers@...sando.io
Subject: Re: [PATCH net 3/6] ionic: add check for NULL t/rxqcqs in reconfig

On Wed, Feb 01, 2023 at 05:29:59PM -0800, Shannon Nelson wrote:
> Make sure there are qcqs to clean before trying to swap resources
> or clean their interrupt assignments.
> 
> Fixes: 101b40a0171f ("ionic: change queue count with no reset")
> Signed-off-by: Shannon Nelson <shannon.nelson@....com>
> ---
>  .../net/ethernet/pensando/ionic/ionic_lif.c   | 27 ++++++++++++++++---
>  1 file changed, 24 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.c b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> index 8499165b1563..c08d0762212c 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
> @@ -2741,6 +2741,14 @@ int ionic_reconfigure_queues(struct ionic_lif *lif,
>  			sg_desc_sz = sizeof(struct ionic_txq_sg_desc);
>  
>  		for (i = 0; i < qparam->nxqs; i++) {
> +			/* If missing, short placeholder qcq needed for swap */
> +			if (!lif->txqcqs[i]) {
> +				flags = IONIC_QCQ_F_TX_STATS | IONIC_QCQ_F_SG;
> +				err = ionic_qcq_alloc(lif, IONIC_QTYPE_TXQ, i, "tx", flags,
> +						      4, desc_sz, comp_sz, sg_desc_sz,
> +						      lif->kern_pid, &lif->txqcqs[i]);

You are not checking return value, so you don't really need to store
returned value in err variable.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ