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 Nov 2023 20:29:28 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Paolo Abeni <pabeni@...hat.com>, <yisen.zhuang@...wei.com>,
	<salil.mehta@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>
CC: <shaojijie@...wei.com>, <shenjian15@...wei.com>, <wangjie125@...wei.com>,
	<liuyonglong@...wei.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net 1/7] net: hns3: fix add VLAN fail issue


on 2023/11/2 18:31, Paolo Abeni wrote:
> On Sat, 2023-10-28 at 10:59 +0800, Jijie Shao wrote:
>
>   	/* when port base vlan enabled, we use port base vlan as the vlan
>   	 * filter entry. In this case, we don't update vlan filter table
> @@ -10481,7 +10482,9 @@ int hclge_set_vlan_filter(struct hnae3_handle *handle, __be16 proto,
>   		 * and try to remove it from hw later, to be consistence
>   		 * with stack
>   		 */
> +		mutex_lock(&hdev->vport_lock);
>   		set_bit(vlan_id, vport->vlan_del_fail_bmap);
> +		mutex_unlock(&hdev->vport_lock);
> It looks like that the 'hclge_rm_vport_vlan_table()' call a few lines
> above will now happen with the vport_lock unlocked.
>
> That looks racy and would deserve at least a comment explaining why
> it's safe.
>
> Thanks,
>
> Paolo

Yeah, this is a problem that causes the function to be invoked when it 
is not locked. We'll get lock before the function be invoked in V2 
Thanks, Jijie


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ