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: <ZNyTaPtGSsEIHLXe@vergenet.net>
Date: Wed, 16 Aug 2023 11:14:16 +0200
From: Simon Horman <horms@...nel.org>
To: Wenjun Wu <wenjun1.wu@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
	xuejun.zhang@...el.com, madhu.chittim@...el.com,
	qi.z.zhang@...el.com, anthony.l.nguyen@...el.com
Subject: Re: [PATCH iwl-next v3 5/5] iavf: Add VIRTCHNL Opcodes Support for
 Queue bw Setting

On Wed, Aug 16, 2023 at 11:33:53AM +0800, Wenjun Wu wrote:
> From: Jun Zhang <xuejun.zhang@...el.com>
> 
> iavf rate tree with root node and queue nodes is created and registered
> with devlink rate when iavf adapter is configured.
> 
> User can configure the tx_max and tx_share of each queue. If any one of
> the queues have been fully updated by user, i.e. both tx_max and
> tx_share have been updated for that queue, VIRTCHNL opcodes of
> VIRTCHNL_OP_CONFIG_QUEUE_BW and VIRTCHNL_OP_CONFIG_QUANTA will be sent
> to PF to configure queues allocated to VF if PF indicates support of
> VIRTCHNL_VF_OFFLOAD_QOS through VF Resource / Capability Exchange.
> 
> Signed-off-by: Jun Zhang <xuejun.zhang@...el.com>

...

> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c

...

> @@ -5005,10 +5035,18 @@ static int iavf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	/* Setup the wait queue for indicating virtchannel events */
>  	init_waitqueue_head(&adapter->vc_waitqueue);
>  
> +	len = struct_size(adapter->qos_caps, cap, IAVF_MAX_QOS_TC_NUM);
> +	adapter->qos_caps = kzalloc(len, GFP_KERNEL);
> +	if (!adapter->qos_caps)

Hi Jun Zhang and Wenjun Wu,

The goto below leads to the function returning err.
Should err be set to an error value here?

As flagged by Smatch and Coccinelle.

> +		goto err_ioremap;
> +
>  	/* Register iavf adapter with devlink */
>  	err = iavf_devlink_register(adapter);
> -	if (err)
> +	if (err) {
>  		dev_err(&pdev->dev, "devlink registration failed: %d\n", err);
> +		kfree(adapter->qos_caps);
> +		goto err_ioremap;
> +	}
>  
>  	/* Keep driver interface even on devlink registration failure */
>  	return 0;

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ