* [merged] qla2xxx-fix-null-ptr-dereference-in-fail-path-in-queue-create-code.patch removed from -mm tree
@ 2009-10-05 18:40 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2009-10-05 18:40 UTC (permalink / raw)
To: anirban.chakraborty, James.Bottomley, andrew.vasquez, jirislaby,
mm-commits
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@qlogic.com>
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@gmail.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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@qlogic.com are
linux-next.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-05 18:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-05 18:40 [merged] qla2xxx-fix-null-ptr-dereference-in-fail-path-in-queue-create-code.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).