diff options
author | Nithin Nayak Sujir <nsujir@broadcom.com> | 2011-08-31 02:54:50 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-09-17 18:03:18 +0400 |
commit | 26b2982f78c1fc6f486a67271b1d0a0d305dd54b (patch) | |
tree | 4e7a639854bd6cb0cef5e147196bad7625a671d0 /drivers/scsi/bnx2fc/bnx2fc_fcoe.c | |
parent | c1c16bd51a29eea8843f20161ddd32cddc524142 (diff) | |
download | linux-26b2982f78c1fc6f486a67271b1d0a0d305dd54b.tar.xz |
[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: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index ba88ddb4580b..886938d025cd 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -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; |