The patch titled qla2xxx: fix Null ptr dereference in fail path in queue create code has been removed from the -mm tree. Its filename was qla2xxx-fix-null-ptr-dereference-in-fail-path-in-queue-create-code.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: qla2xxx: fix Null ptr dereference in fail path in queue create code From: Anirban Chakraborty <anirban.chakraborty@xxxxxxxxxx> Current code jumps to fail path in queue create functions and there it invokes the queue free call with a (NULL) pointer to the queue which could not be allocated. Fix it by returning ENOMEM directly without invoking the queue free call. Report-by Jiri Slaby <jirislaby@xxxxxxxxx> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@xxxxxxxxxx> Cc: Andrew Vasquez <andrew.vasquez@xxxxxxxxxx> Cc: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/scsi/qla2xxx/qla_mid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/scsi/qla2xxx/qla_mid.c~qla2xxx-fix-null-ptr-dereference-in-fail-path-in-queue-create-code drivers/scsi/qla2xxx/qla_mid.c --- a/drivers/scsi/qla2xxx/qla_mid.c~qla2xxx-fix-null-ptr-dereference-in-fail-path-in-queue-create-code +++ a/drivers/scsi/qla2xxx/qla_mid.c @@ -568,7 +568,7 @@ qla25xx_create_req_que(struct qla_hw_dat if (req == NULL) { qla_printk(KERN_WARNING, ha, "could not allocate memory" "for request que\n"); - goto que_failed; + return 0; } req->length = REQUEST_ENTRY_CNT_24XX; @@ -659,7 +659,7 @@ qla25xx_create_rsp_que(struct qla_hw_dat if (rsp == NULL) { qla_printk(KERN_WARNING, ha, "could not allocate memory for" " response que\n"); - goto que_failed; + return 0; } rsp->length = RESPONSE_ENTRY_CNT_MQ; _ Patches currently in -mm which might be from anirban.chakraborty@xxxxxxxxxx are linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html