Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=53772a2cb40748ea0b26db8101d632ddb3875b51 Commit: 53772a2cb40748ea0b26db8101d632ddb3875b51 Parent: 142009a3df39ecd4e96601d8bdabbe0c5f6e2f4e Author: Seokmann Ju <[EMAIL PROTECTED]> AuthorDate: Mon Jul 30 11:01:07 2007 -0700 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Tue Jul 31 10:45:07 2007 -0500
[SCSI] qla2xxx: fix panic caused by previous patch - this patch will fix a panic caused by omitted memory allocation for the nvram. Signed-off-by: Seokmann Ju <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/qla2xxx/qla_os.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c488996..93c0c7e 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -2154,6 +2154,19 @@ qla2x00_mem_alloc(scsi_qla_host_t *ha) } } + /* Get memory for cached NVRAM */ + ha->nvram = kzalloc(MAX_NVRAM_SIZE, GFP_KERNEL); + if (ha->nvram == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - nvram cache\n"); + + qla2x00_mem_free(ha); + msleep(100); + + continue; + } + /* Done all allocations without any error. */ status = 0; @@ -2266,6 +2279,7 @@ qla2x00_mem_free(scsi_qla_host_t *ha) ha->fw_dump_reading = 0; vfree(ha->optrom_buffer); + kfree(ha->nvram); } /* - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html