提交 26b2982f 编写于 作者: N Nithin Nayak Sujir 提交者: James Bottomley

[SCSI] bnx2fc: Validate vlan id in NETDEV_UNREGISTER handler

When bnx2fc receives an UNREGISTER event on a vlan interface it calls
destroy on all interfaces that matches the physical interface. Add
vlan_id check to destroy only the vlan interface that generated the
event.
Signed-off-by: NNithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 c1c16bd5
...@@ -838,9 +838,9 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event, ...@@ -838,9 +838,9 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
return; return;
mutex_lock(&bnx2fc_dev_lock); mutex_lock(&bnx2fc_dev_lock);
list_for_each_entry_safe(interface, tmp, &if_list, list) { list_for_each_entry_safe(interface, tmp, &if_list, list) {
if (interface->hba != hba) if (interface->hba == hba &&
continue; interface->vlan_id == (vlan_id & VLAN_VID_MASK))
__bnx2fc_destroy(interface); __bnx2fc_destroy(interface);
} }
mutex_unlock(&bnx2fc_dev_lock); mutex_unlock(&bnx2fc_dev_lock);
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册