diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2009-02-08 23:50:13 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-02-10 11:15:20 -0500 |
commit | cf5a163127118325296c90670093b14afebb8424 (patch) | |
tree | 0903c4b619cea915aab9cee53793e64724043f4f /drivers/scsi | |
parent | 8a659571eccfde1df9bd057d67be51d1aaa0e2db (diff) |
[SCSI] qla2xxx: Correct slab-error overwrite during vport creation and deletion.
The clearing of a vha's req_ques were overrunning during vport
creation. During deletion, vport queues should be torn-down
after all cleanup has occurred.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 13 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 33a3c13fd893..f4c57227ec18 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -1265,13 +1265,6 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
1265 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) | 1265 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) |
1266 | msleep(1000); | 1266 | msleep(1000); |
1267 | 1267 | ||
1268 | if (ha->mqenable) { | ||
1269 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
1270 | qla_printk(KERN_WARNING, ha, | ||
1271 | "Queue delete failed.\n"); | ||
1272 | vha->req_ques[0] = ha->req_q_map[0]->id; | ||
1273 | } | ||
1274 | |||
1275 | qla24xx_disable_vp(vha); | 1268 | qla24xx_disable_vp(vha); |
1276 | 1269 | ||
1277 | fc_remove_host(vha->host); | 1270 | fc_remove_host(vha->host); |
@@ -1293,6 +1286,12 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
1293 | vha->host_no, vha->vp_idx, vha)); | 1286 | vha->host_no, vha->vp_idx, vha)); |
1294 | } | 1287 | } |
1295 | 1288 | ||
1289 | if (ha->mqenable) { | ||
1290 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
1291 | qla_printk(KERN_WARNING, ha, | ||
1292 | "Queue delete failed.\n"); | ||
1293 | } | ||
1294 | |||
1296 | scsi_host_put(vha->host); | 1295 | scsi_host_put(vha->host); |
1297 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); | 1296 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); |
1298 | return 0; | 1297 | return 0; |
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index d27ceda50791..3f23932210c4 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -396,7 +396,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
396 | 396 | ||
397 | qla2x00_start_timer(vha, qla2x00_timer, WATCH_INTERVAL); | 397 | qla2x00_start_timer(vha, qla2x00_timer, WATCH_INTERVAL); |
398 | 398 | ||
399 | memset(vha->req_ques, 0, sizeof(vha->req_ques) * QLA_MAX_HOST_QUES); | 399 | memset(vha->req_ques, 0, sizeof(vha->req_ques)); |
400 | vha->req_ques[0] = ha->req_q_map[0]->id; | 400 | vha->req_ques[0] = ha->req_q_map[0]->id; |
401 | host->can_queue = ha->req_q_map[0]->length + 128; | 401 | host->can_queue = ha->req_q_map[0]->length + 128; |
402 | host->this_id = 255; | 402 | host->this_id = 255; |