[dm-devel] [PATCH] mpathpersist: memset length is wrong

Christophe Varoqui christophe.varoqui at opensvc.com
Tue Oct 11 06:41:20 UTC 2016


Seems right.
Merged, with thanks.

On Tue, Oct 11, 2016 at 8:37 AM, <tang.junhui at zte.com.cn> wrote:

> Please have a review for this patch, any comment will be highly
> appreciated.
>
>
>
>
> 发件人:         tang.junhui at zte.com.cn
> 收件人:         christophe varoqui <christophe.varoqui at free.fr>,
> Chauhan at redhat.com, Vijay <Vijay.Chauhan at netapp.com>, Benjamin Marzinski <
> bmarzins at redhat.com>,
> 抄送:        zhang.kai16 at zte.com.cn, dm-devel at redhat.com, "tang.junhui" <
> tang.junhui at zte.com.cn>
> 日期:         2016/09/21 16:54
> 主题:        [dm-devel] [PATCH] mpathpersist: memset length is wrong
> 发件人:        dm-devel-bounces at redhat.com
> ------------------------------
>
>
>
> From: "tang.junhui" <tang.junhui at 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 at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20161011/ea0e0777/attachment.htm>


More information about the dm-devel mailing list