In main func of kpartx.c, we should check return value of
malloc before using it.
V1->V2: change malloc to xmalloc
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
---
kpartx/kpartx.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
In assemble_map func, if add_feature fails and mp->features is
default value (NULL), STRDUP(mp->features) will cause a seg-fault.
In addition, f = STRDUP(mp->features) is just used for APPEND().
We can directly pass mp->features to APPEND().
Here, we firstly check whether mp->features is null.
V1
In handle_args func, we donot check whether malloc paramp and
each paramp->trnptid_list[j] fails before using them, it may
cause access NULL pointer.
Here, we add alloc_prout_param_descriptor to allocate and init
paramp, and we add free_prout_param_descriptor to free paramp
and each paramp->trnpti
The return values of dm_get_map, disassemble_map in get_mpvec
were not checked. Use update_multipath_table/status to instead
of them.
V1->V2: delete continue and add remove_map
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmpathpersist/mpath_persist.c
In handle_args, the tmp isn't used. We delete it.
V1->V2: modify patch because of "mpathpersist: check whether
malloc paramp->trnptid_list fails in handle_args func" changing
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
mpathpersist/main.c | 1 -
1 file
On Tue, 2020-09-08 at 14:50 +0800, lixiaokeng wrote:
> Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes.
Thanks.
What about No. 08? Did you drop it? If yes, please say so.
Regards,
Martin
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2020/9/8 15:10, Martin Wilck wrote:
> On Tue, 2020-09-08 at 14:50 +0800, lixiaokeng wrote:
>> Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes.
>
> Thanks.
> What about No. 08? Did you drop it? If yes, please say so.
>
> Regards,
> Martin
>
Hi Martin,
I drop No. 08. I'm sor
Hello lixiaokeng,
On Tue, 2020-09-08 at 14:50 +0800, lixiaokeng wrote:
> Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes.
I have problems applying your patches. It seems to me that the
whitespace has been messed up by your mail program (tab indentation has
been replaced by spaces).
On 2020/9/8 16:15, Martin Wilck wrote:
> Hello lixiaokeng,
>
> On Tue, 2020-09-08 at 14:50 +0800, lixiaokeng wrote:
>> Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes.
>
> I have problems applying your patches. It seems to me that the
> whitespace has been messed up by your mail p
Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes.
V3 is same as V2.
Changes in V2:
- patch 01: set major and minor to -1 at begining, as suggested
by Martin Wilck
- patch 02: chanege malloc to calloc to calloc, as suggested by
Martin Wilck
- patch 04: delete seting ret when jump t
If dm_get_major_minor failed, log with major and minor should not
be printed to avoid major and minor used before initialization.
V1->V2: set major and minor to -1 at begining
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipathd/cli_handlers.c | 2 +-
We check the return value of malloc in print_foreign_topology.
V1->V2: chanege malloc to calloc
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/foreign.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/forei
In mpath_pr_event_handler_fn, we use MALLOC instead of malloc, and check
the return value of MALLOC.
V1->V2: delete seting ret when jump to out
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipathd/main.c | 8
1 file changed, 4 insertions(+),
In cli_getprkey func, we use MALLOC instead of malloc, and check
the return value of MALLOC.
V1->V2: turn back MALLOC to malloc and reomve error message
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
Signed-off-by: Linfeilong
---
multipathd/cli_handlers.c | 2 ++
1 file changed, 2 inse
In main func of kpartx.c, we should check return value of
malloc before using it.
V1->V2: change malloc to xmalloc
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
---
kpartx/kpartx.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
In assemble_map func, if add_feature fails and mp->features is
default value (NULL), STRDUP(mp->features) will cause a seg-fault.
In addition, f = STRDUP(mp->features) is just used for APPEND().
We can directly pass mp->features to APPEND().
Here, we firstly check whether mp->features is null.
V1
In handle_args, the tmp isn't used. We delete it.
V1->V2: modify patch because of "mpathpersist: check whether
malloc paramp->trnptid_list fails in handle_args func" changing
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
mpathpersist/main.c | 1 -
1 file
The return values of dm_get_map, disassemble_map in get_mpvec
were not checked. Use update_multipath_table/status to instead
of them.
V1->V2: delete continue and add remove_map
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmpathpersist/mpath_persist.c
In handle_args func, we donot check whether malloc paramp and
each paramp->trnptid_list[j] fails before using them, it may
cause access NULL pointer.
Here, we add alloc_prout_param_descriptor to allocate and init
paramp, and we add free_prout_param_descriptor to free paramp
and each paramp->trnpti
On Tue, 2020-09-08 at 16:49 +0800, lixiaokeng wrote:
> In main func of kpartx.c, we should check return value of
> malloc before using it.
>
> V1->V2: change malloc to xmalloc
>
> Signed-off-by: Zhiqiang Liu
> Signed-off-by: Lixiaokeng
> ---
> kpartx/kpartx.c | 5 -
> 1 file changed, 4 ins
On Tue, 2020-09-08 at 16:49 +0800, lixiaokeng wrote:
> In cli_getprkey func, we use MALLOC instead of malloc, and check
> the return value of MALLOC.
>
> V1->V2: turn back MALLOC to malloc and reomve error message
Ok, but now you need to change the patch subject as well...
Also, please don't inc
On Mon, Sep 07, 2020 at 08:21:28PM +0800, lixiaokeng wrote:
>
> >> @@ -86,9 +86,12 @@ assemble_map (struct multipath * mp, char * params, int
> >> len)
> >>get_linux_version_code() < KERNEL_VERSION(4, 3, 0))
> >>add_feature(&mp->features, retain_hwhandler);
> >>
> >> - f = ST
On Tue, 2020-09-08 at 10:45 -0500, Benjamin Marzinski wrote:
> On Mon, Sep 07, 2020 at 08:21:28PM +0800, lixiaokeng wrote:
> > > > @@ -86,9 +86,12 @@ assemble_map (struct multipath * mp, char *
> > > > params, int len)
> > > > get_linux_version_code() < KERNEL_VERSION(4, 3, 0))
> > > >
On Tue, Sep 08, 2020 at 06:35:45PM +0200, Martin Wilck wrote:
> On Tue, 2020-09-08 at 10:45 -0500, Benjamin Marzinski wrote:
> > On Mon, Sep 07, 2020 at 08:21:28PM +0800, lixiaokeng wrote:
> > > > > @@ -86,9 +86,12 @@ assemble_map (struct multipath * mp, char *
> > > > > params, int len)
> > > > >
On 2020/9/8 22:25, Martin Wilck wrote:
> On Tue, 2020-09-08 at 16:49 +0800, lixiaokeng wrote:
>> In main func of kpartx.c, we should check return value of
>> malloc before using it.
>>
>> V1->V2: change malloc to xmalloc
>>
>> Signed-off-by: Zhiqiang Liu
>> Signed-off-by: Lixiaokeng
>> ---
>>
On 2020/9/8 22:32, Martin Wilck wrote:
> On Tue, 2020-09-08 at 16:49 +0800, lixiaokeng wrote:
>> In cli_getprkey func, we use MALLOC instead of malloc, and check
>> the return value of MALLOC.
>>
>> V1->V2: turn back MALLOC to malloc and reomve error message
>
> Ok, but now you need to change t
On 2020/9/9 0:35, Martin Wilck wrote:
> On Tue, 2020-09-08 at 10:45 -0500, Benjamin Marzinski wrote:
>> On Mon, Sep 07, 2020 at 08:21:28PM +0800, lixiaokeng wrote:
> @@ -86,9 +86,12 @@ assemble_map (struct multipath * mp, char *
> params, int len)
> get_linux_version_code() < K
27 matches
Mail list logo