diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2017-12-04 23:45:10 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-12-08 03:07:07 +0100 |
commit | 063b36d6b0ad74c748d536f5cb47bac2f850a0fa (patch) | |
tree | 6b9d12eac67693b61328b7d737490ee5cf7d090d | |
parent | scsi: qla2xxx: Fix abort command deadlock due to spinlock (diff) | |
download | linux-063b36d6b0ad74c748d536f5cb47bac2f850a0fa.tar.xz linux-063b36d6b0ad74c748d536f5cb47bac2f850a0fa.zip |
scsi: qla2xxx: Replace fcport alloc with qla2x00_alloc_fcport
Current code manually allocate an fcport structure that is not properly
initialize. Replace kzalloc with qla2x00_alloc_fcport, so that all
fields are initialized. Also set set scan flag to port found
Cc: <stable@vger.kernel.org>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 283ff316e4b2..8558dd52aeef 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -5782,7 +5782,7 @@ static fc_port_t *qlt_get_port_database(struct scsi_qla_host *vha, unsigned long flags; u8 newfcport = 0; - fcport = kzalloc(sizeof(*fcport), GFP_KERNEL); + fcport = qla2x00_alloc_fcport(vha, GFP_KERNEL); if (!fcport) { ql_dbg(ql_dbg_tgt_mgt, vha, 0xf06f, "qla_target(%d): Allocation of tmp FC port failed", |