Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26b2982f authored by Nithin Nayak Sujir's avatar Nithin Nayak Sujir Committed by James Bottomley
Browse files

[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: default avatarNithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: default avatarBhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent c1c16bd5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -838,8 +838,8 @@ static void bnx2fc_indicate_netevent(void *context, unsigned long event,
			return;
		mutex_lock(&bnx2fc_dev_lock);
		list_for_each_entry_safe(interface, tmp, &if_list, list) {
			if (interface->hba != hba)
				continue;
			if (interface->hba == hba &&
			    interface->vlan_id == (vlan_id & VLAN_VID_MASK))
				__bnx2fc_destroy(interface);
		}
		mutex_unlock(&bnx2fc_dev_lock);