From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kashyap Desai <kashyap.desai@avagotech.com>
Cc: Sumit Saxena <sumit.saxena@avagotech.com>,
Uday Lingala <uday.lingala@avagotech.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
megaraidlinux.pdl@avagotech.com, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] megaraid_sas: harmless memory corruption in megasas_mgmt_fw_ioctl()
Date: Wed, 25 Feb 2015 13:22:36 +0000 [thread overview]
Message-ID: <20150225132236.GI19745@mwanda> (raw)
The intent here was for the "kbuff_arr[i] = NULL;" to be inside the
loop but, because the curly braces were missing, it's after the loop.
This means we corrupt a little memory one step beyond the array.
Fortunately, we weren't going to use that memory anyway so it's
harmless. Also we aren't going to use kbuff_arr[] again so we don't
need to set it to NULL.
I have deleted that line of code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 890637f..834bfc0 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -6208,7 +6208,6 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
le32_to_cpu(kern_sge32[i].length),
kbuff_arr[i],
le32_to_cpu(kern_sge32[i].phys_addr));
- kbuff_arr[i] = NULL;
}
if (instance->ctrl_context && cmd->mpt_pthr_cmd_blocked)
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kashyap Desai <kashyap.desai@avagotech.com>
Cc: Sumit Saxena <sumit.saxena@avagotech.com>,
Uday Lingala <uday.lingala@avagotech.com>,
"James E.J. Bottomley" <JBottomley@parallels.com>,
megaraidlinux.pdl@avagotech.com, linux-scsi@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [patch] megaraid_sas: harmless memory corruption in megasas_mgmt_fw_ioctl()
Date: Wed, 25 Feb 2015 16:22:36 +0300 [thread overview]
Message-ID: <20150225132236.GI19745@mwanda> (raw)
The intent here was for the "kbuff_arr[i] = NULL;" to be inside the
loop but, because the curly braces were missing, it's after the loop.
This means we corrupt a little memory one step beyond the array.
Fortunately, we weren't going to use that memory anyway so it's
harmless. Also we aren't going to use kbuff_arr[] again so we don't
need to set it to NULL.
I have deleted that line of code.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 890637f..834bfc0 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -6208,7 +6208,6 @@ megasas_mgmt_fw_ioctl(struct megasas_instance *instance,
le32_to_cpu(kern_sge32[i].length),
kbuff_arr[i],
le32_to_cpu(kern_sge32[i].phys_addr));
- kbuff_arr[i] = NULL;
}
if (instance->ctrl_context && cmd->mpt_pthr_cmd_blocked)
next reply other threads:[~2015-02-25 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 13:22 Dan Carpenter [this message]
2015-02-25 13:22 ` [patch] megaraid_sas: harmless memory corruption in megasas_mgmt_fw_ioctl() Dan Carpenter
2015-02-25 13:46 ` Sumit Saxena
2015-02-25 13:58 ` Sumit Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150225132236.GI19745@mwanda \
--to=dan.carpenter@oracle.com \
--cc=JBottomley@parallels.com \
--cc=kashyap.desai@avagotech.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=megaraidlinux.pdl@avagotech.com \
--cc=sumit.saxena@avagotech.com \
--cc=uday.lingala@avagotech.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.