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]
Message-ID: <65f17b12-860e-4cd0-a996-459fee71b4f8@intel.com>
Date: Thu, 5 Sep 2024 08:19:58 +0200
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
CC: <netdev@...r.kernel.org>, <wojciech.drewek@...el.com>,
	<intel-wired-lan@...ts.osuosl.org>
Subject: Re: [Intel-wired-lan] [iwl-net v1] iavf: allow changing VLAN state
 without calling PF

On 9/4/24 14:00, Michal Swiatkowski wrote:
> First case:

[...]

> Second case:

[...]

> With fix for previous case we end up with no VLAN filters in hardware.
> We have to remove VLAN filters if the state is IAVF_VLAN_ADD and delete
> VLAN was called. It is save as IAVF_VLAN_ADD means that virtchnl message
> wasn't sent yet.

I'm fine with combining the two cases into one commit as that is related

> 
> Fixes: 0c0da0e95105 ("iavf: refactor VLAN filter states")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> ---
>   drivers/net/ethernet/intel/iavf/iavf_main.c | 18 ++++++++++++++++--
>   1 file changed, 16 insertions(+), 2 deletions(-)

[...]

> @@ -793,8 +798,17 @@ static void iavf_del_vlan(struct iavf_adapter *adapter, struct iavf_vlan vlan)
>   
>   	f = iavf_find_vlan(adapter, vlan);
>   	if (f) {
> -		f->state = IAVF_VLAN_REMOVE;

you forgot to put this line in else case below

> -		iavf_schedule_aq_request(adapter, IAVF_FLAG_AQ_DEL_VLAN_FILTER);
> +		/* IAVF_ADD_VLAN means that VLAN wasn't even added yet.
> +		 * Remove it from the list.
> +		 */
> +		if (f->state == IAVF_VLAN_ADD) {
> +			list_del(&f->list);
> +			kfree(f);
> +			adapter->num_vlan_filters--;
> +		} else {
> +			iavf_schedule_aq_request(adapter,
> +						 IAVF_FLAG_AQ_DEL_VLAN_FILTER);
> +		}
>   	}
>   
>   	spin_unlock_bh(&adapter->mac_vlan_list_lock);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ