From: tang.junhui@zte.com.cn
To: christophe varoqui <christophe.varoqui@free.fr>,
Chauhan@redhat.com, Vijay <Vijay.Chauhan@netapp.com>,
Benjamin Marzinski <bmarzins@redhat.com>
Cc: zhang.kai16@zte.com.cn, dm-devel@redhat.com,
"tang.junhui" <tang.junhui@zte.com.cn>
Subject: [PATCH] mpathpersist: memset length is wrong
Date: Wed, 21 Sep 2016 16:44:46 +0800 [thread overview]
Message-ID: <1474447486-8892-1-git-send-email-tang.junhui@zte.com.cn> (raw)
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
next reply other threads:[~2016-09-21 8:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 8:44 tang.junhui [this message]
2016-10-11 6:37 ` [PATCH] mpathpersist: memset length is wrong tang.junhui
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=1474447486-8892-1-git-send-email-tang.junhui@zte.com.cn \
--to=tang.junhui@zte.com.cn \
--cc=Chauhan@redhat.com \
--cc=Vijay.Chauhan@netapp.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@free.fr \
--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.