]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure
authorBill Kuzeja <William.Kuzeja@stratus.com>
Mon, 5 Mar 2018 05:02:55 +0000 (00:02 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 7 Mar 2018 03:07:49 +0000 (22:07 -0500)
commita504a61ef220ba8cb5fd51275cdca9e655000ab9
tree56f12e3b1b65e6912480361c93b5a61442eac9d8
parentbfda478c8f9e08eff900b230b8005a098c836025
scsi: qla2xxx: Fix crashes in qla2x00_probe_one on probe failure

Because of the shifting around of code in qla2x00_probe_one recently,
failures during adapter initialization can lead to problems, i.e. NULL
pointer crashes and doubly freed data structures which cause eventual
panics.

This V2 version makes the relevant memory free routines idempotent, so
repeat calls won't cause any harm. I also removed the problematic
probe_init_failed exit point as it is not needed.

Fixes: 284e529b9c57 ("scsi: qla2xxx: Fix NULL pointer crash due to probe failure")
Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_os.c