From: tang.junhui@zte.com.cn
To: christophe.varoqui@opensvc.com, Vijay.Chauhan@netapp.com,
Benjamin Marzinski <bmarzins@redhat.com>,
bart.vanassche@sandisk.com
Cc: zhang.kai16@zte.com.cn, dm-devel@redhat.com,
"tang.junhui" <tang.junhui@zte.com.cn>
Subject: Re: [PATCH] mpathpersist: memset length is wrong
Date: Tue, 11 Oct 2016 14:37:24 +0800 [thread overview]
Message-ID: <OF9BE89F56.9D2DAD11-ON48258049.00234303-48258049.002461FF@zte.com.cn> (raw)
In-Reply-To: <1474447486-8892-1-git-send-email-tang.junhui@zte.com.cn>
[-- Attachment #1.1: Type: text/plain, Size: 1483 bytes --]
Please have a review for this patch, any comment will be highly
appreciated.
发件人: tang.junhui@zte.com.cn
收件人: christophe varoqui <christophe.varoqui@free.fr>,
Chauhan@redhat.com, Vijay <Vijay.Chauhan@netapp.com>, Benjamin Marzinski
<bmarzins@redhat.com>,
抄送: zhang.kai16@zte.com.cn, dm-devel@redhat.com, "tang.junhui"
<tang.junhui@zte.com.cn>
日期: 2016/09/21 16:54
主题: [dm-devel] [PATCH] mpathpersist: memset length is wrong
发件人: dm-devel-bounces@redhat.com
From: "tang.junhui" <tang.junhui@zte.com.cn>
variable transportids is cleared by memset() with wrong length
MPATH_MX_TIDS,
the length should be MPATH_MX_TIDS*sizeof(struct transportid).
Signed-off-by: tang.junhui <tang.junhui@zte.com.cn>
---
mpathpersist/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
index a55865f..8e8cc35 100644
--- a/mpathpersist/main.c
+++ b/mpathpersist/main.c
@@ -105,7 +105,7 @@ int main (int argc, char * argv[])
udev = udev_new();
conf = mpath_lib_init(udev);
- memset(transportids,0,MPATH_MX_TIDS);
+ memset(transportids, 0, MPATH_MX_TIDS * sizeof(struct
transportid));
multipath_conf = conf;
while (1)
--
2.8.1.windows.1
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
[-- Attachment #1.2: Type: text/html, Size: 2896 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2016-10-11 6:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 8:44 [PATCH] mpathpersist: memset length is wrong tang.junhui
2016-10-11 6:37 ` tang.junhui [this message]
2016-10-11 6:41 ` Christophe Varoqui
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=OF9BE89F56.9D2DAD11-ON48258049.00234303-48258049.002461FF@zte.com.cn \
--to=tang.junhui@zte.com.cn \
--cc=Vijay.Chauhan@netapp.com \
--cc=bart.vanassche@sandisk.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=zhang.kai16@zte.com.cn \
/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.