Skip to content

Commit 50db6b1

Browse files
Seokmann JuJames Bottomley
Seokmann Ju
authored and
James Bottomley
committed
[SCSI] qla2xxx: Add a filter to compare port_name against the physical on vport creation.
During vport creation, there was a possibility to get create a vport with same port_name as pport. A new filter has added to compare given port_name with the port_name of the pport. Signed-Off-by: Seokmann Ju <[email protected]> Signed-off-by: Andrew Vasquez <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 0b05a1f commit 50db6b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/scsi/qla2xxx/qla_mid.c

+2
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ qla24xx_vport_create_req_sanity_check(struct fc_vport *fc_vport)
341341

342342
/* Check up unique WWPN */
343343
u64_to_wwn(fc_vport->port_name, port_name);
344+
if (!memcmp(port_name, ha->port_name, WWN_SIZE))
345+
return VPCERR_BAD_WWN;
344346
vha = qla24xx_find_vhost_by_name(ha, port_name);
345347
if (vha)
346348
return VPCERR_BAD_WWN;

0 commit comments

Comments
 (0)