* [PATCH] mpathpersist: memset length is wrong
@ 2016-09-21 8:44 tang.junhui
2016-10-11 6:37 ` tang.junhui
0 siblings, 1 reply; 3+ messages in thread
From: tang.junhui @ 2016-09-21 8:44 UTC (permalink / raw)
To: christophe varoqui, Chauhan, Vijay, Benjamin Marzinski
Cc: zhang.kai16, dm-devel, tang.junhui
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mpathpersist: memset length is wrong
2016-09-21 8:44 [PATCH] mpathpersist: memset length is wrong tang.junhui
@ 2016-10-11 6:37 ` tang.junhui
2016-10-11 6:41 ` Christophe Varoqui
0 siblings, 1 reply; 3+ messages in thread
From: tang.junhui @ 2016-10-11 6:37 UTC (permalink / raw)
To: christophe.varoqui, Vijay.Chauhan, Benjamin Marzinski, bart.vanassche
Cc: zhang.kai16, dm-devel, tang.junhui
[-- 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 --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mpathpersist: memset length is wrong
2016-10-11 6:37 ` tang.junhui
@ 2016-10-11 6:41 ` Christophe Varoqui
0 siblings, 0 replies; 3+ messages in thread
From: Christophe Varoqui @ 2016-10-11 6:41 UTC (permalink / raw)
To: tang.junhui
Cc: Bart Van Assche, Vijay.Chauhan, device-mapper development, zhang.kai16
[-- Attachment #1.1: Type: text/plain, Size: 1742 bytes --]
Seems right.
Merged, with thanks.
On Tue, Oct 11, 2016 at 8:37 AM, <tang.junhui@zte.com.cn> wrote:
> 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: 3854 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-11 6:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 8:44 [PATCH] mpathpersist: memset length is wrong tang.junhui
2016-10-11 6:37 ` tang.junhui
2016-10-11 6:41 ` Christophe Varoqui
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.