Skip to content

Commit

Permalink
[SCSI] bnx2fc: Validate vlan id in NETDEV_UNREGISTER handler
Browse files Browse the repository at this point in the history
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: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Nithin Nayak Sujir authored and James Bottomley committed Sep 17, 2011
1 parent c1c16bd commit 26b2982
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/scsi/bnx2fc/bnx2fc_fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,9 +838,9 @@ 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;
__bnx2fc_destroy(interface);
if (interface->hba == hba &&
interface->vlan_id == (vlan_id & VLAN_VID_MASK))
__bnx2fc_destroy(interface);
}
mutex_unlock(&bnx2fc_dev_lock);
return;
Expand Down

0 comments on commit 26b2982

Please sign in to comment.