mbox series

[ndctl,0/8] fix serverl issues reported by Coverity

Message ID bed3b3b3-1f30-6751-c0bf-15ecf70192f9@huawei.com (mailing list archive)
Headers show
Series fix serverl issues reported by Coverity | expand

Message

Zhiqiang Liu Nov. 6, 2020, 9:23 a.m. UTC
Recently, we use Coverity to analysis the ndctl package.
Several issues should be resolved to make Coverity happy.

lihaotian9 (8):
  namespace: check whether pfn|dax|btt is NULL in setup_namespace
  lib/libndctl: fix memory leakage problem in add_bus
  libdaxctl: fix memory leakage in add_dax_region()
  dimm: fix potential fd leakage in dimm_action()
  util/help: check whether strdup returns NULL in exec_man_konqueror
  lib/inject: check whether cmd is created successfully
  libndctl: check whether ndctl_btt_get_namespace returns NULL in
    callers
  namespace: check whether seed is NULL in validate_namespace_options

 daxctl/lib/libdaxctl.c |  3 +++
 ndctl/dimm.c           | 12 +++++++-----
 ndctl/lib/inject.c     |  8 ++++++++
 ndctl/lib/libndctl.c   |  1 +
 ndctl/namespace.c      | 23 ++++++++++++++++++-----
 test/libndctl.c        | 16 +++++++++++-----
 test/parent-uuid.c     |  2 +-
 util/help.c            |  8 +++++++-
 util/json.c            |  3 +++
 9 files changed, 59 insertions(+), 17 deletions(-)

Comments

Zhiqiang Liu Nov. 10, 2020, 10:58 a.m. UTC | #1
friendly ping...

On 2020/11/6 17:23, Zhiqiang Liu wrote:
> 
> Recently, we use Coverity to analysis the ndctl package.
> Several issues should be resolved to make Coverity happy.
> 
> lihaotian9 (8):
>   namespace: check whether pfn|dax|btt is NULL in setup_namespace
>   lib/libndctl: fix memory leakage problem in add_bus
>   libdaxctl: fix memory leakage in add_dax_region()
>   dimm: fix potential fd leakage in dimm_action()
>   util/help: check whether strdup returns NULL in exec_man_konqueror
>   lib/inject: check whether cmd is created successfully
>   libndctl: check whether ndctl_btt_get_namespace returns NULL in
>     callers
>   namespace: check whether seed is NULL in validate_namespace_options
> 
>  daxctl/lib/libdaxctl.c |  3 +++
>  ndctl/dimm.c           | 12 +++++++-----
>  ndctl/lib/inject.c     |  8 ++++++++
>  ndctl/lib/libndctl.c   |  1 +
>  ndctl/namespace.c      | 23 ++++++++++++++++++-----
>  test/libndctl.c        | 16 +++++++++++-----
>  test/parent-uuid.c     |  2 +-
>  util/help.c            |  8 +++++++-
>  util/json.c            |  3 +++
>  9 files changed, 59 insertions(+), 17 deletions(-)
>
Zhiqiang Liu Nov. 20, 2020, 2:45 a.m. UTC | #2
Friendly ping...

I just wonder if this kind of patches will not be reviewed
and processed.

I`d be very happy to receive any feedback.

On 2020/11/6 17:23, Zhiqiang Liu wrote:
> 
> Recently, we use Coverity to analysis the ndctl package.
> Several issues should be resolved to make Coverity happy.
> 
> lihaotian9 (8):
>   namespace: check whether pfn|dax|btt is NULL in setup_namespace
>   lib/libndctl: fix memory leakage problem in add_bus
>   libdaxctl: fix memory leakage in add_dax_region()
>   dimm: fix potential fd leakage in dimm_action()
>   util/help: check whether strdup returns NULL in exec_man_konqueror
>   lib/inject: check whether cmd is created successfully
>   libndctl: check whether ndctl_btt_get_namespace returns NULL in
>     callers
>   namespace: check whether seed is NULL in validate_namespace_options
> 
>  daxctl/lib/libdaxctl.c |  3 +++
>  ndctl/dimm.c           | 12 +++++++-----
>  ndctl/lib/inject.c     |  8 ++++++++
>  ndctl/lib/libndctl.c   |  1 +
>  ndctl/namespace.c      | 23 ++++++++++++++++++-----
>  test/libndctl.c        | 16 +++++++++++-----
>  test/parent-uuid.c     |  2 +-
>  util/help.c            |  8 +++++++-
>  util/json.c            |  3 +++
>  9 files changed, 59 insertions(+), 17 deletions(-)
>
Verma, Vishal L Nov. 20, 2020, 2:47 a.m. UTC | #3
On Fri, 2020-11-20 at 10:45 +0800, Zhiqiang Liu wrote:
> Friendly ping...
> 
> I just wonder if this kind of patches will not be reviewed
> and processed.
> 
> I`d be very happy to receive any feedback.

Hi Zhiqiang,

These are definitely on my list to look at, I've just not had the time
to do so yet. I'm hoping to clear up my ndctl backlog in the next couple
of weeks though and get a v71 release out.

Thanks for the patience!

-Vishal

> 
> On 2020/11/6 17:23, Zhiqiang Liu wrote:
> > Recently, we use Coverity to analysis the ndctl package.
> > Several issues should be resolved to make Coverity happy.
> > 
> > lihaotian9 (8):
> >   namespace: check whether pfn|dax|btt is NULL in setup_namespace
> >   lib/libndctl: fix memory leakage problem in add_bus
> >   libdaxctl: fix memory leakage in add_dax_region()
> >   dimm: fix potential fd leakage in dimm_action()
> >   util/help: check whether strdup returns NULL in exec_man_konqueror
> >   lib/inject: check whether cmd is created successfully
> >   libndctl: check whether ndctl_btt_get_namespace returns NULL in
> >     callers
> >   namespace: check whether seed is NULL in validate_namespace_options
> > 
> >  daxctl/lib/libdaxctl.c |  3 +++
> >  ndctl/dimm.c           | 12 +++++++-----
> >  ndctl/lib/inject.c     |  8 ++++++++
> >  ndctl/lib/libndctl.c   |  1 +
> >  ndctl/namespace.c      | 23 ++++++++++++++++++-----
> >  test/libndctl.c        | 16 +++++++++++-----
> >  test/parent-uuid.c     |  2 +-
> >  util/help.c            |  8 +++++++-
> >  util/json.c            |  3 +++
> >  9 files changed, 59 insertions(+), 17 deletions(-)
> > 
> _______________________________________________
> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
Zhiqiang Liu Nov. 20, 2020, 3:01 a.m. UTC | #4
On 2020/11/20 10:47, Verma, Vishal L wrote:
> On Fri, 2020-11-20 at 10:45 +0800, Zhiqiang Liu wrote:
>> Friendly ping...
>>
>> I just wonder if this kind of patches will not be reviewed
>> and processed.
>>
>> I`d be very happy to receive any feedback.
> 
> Hi Zhiqiang,
> 
> These are definitely on my list to look at, I've just not had the time
> to do so yet. I'm hoping to clear up my ndctl backlog in the next couple
> of weeks though and get a v71 release out.
> 
> Thanks for the patience!
> 
> -Vishal
> 

Thanks for your reply.
Looking forward to the new release.

Thank you again.

-Zhiqiang Liu

>>
>> On 2020/11/6 17:23, Zhiqiang Liu wrote:
>>> Recently, we use Coverity to analysis the ndctl package.
>>> Several issues should be resolved to make Coverity happy.
>>>
>>> lihaotian9 (8):
>>>   namespace: check whether pfn|dax|btt is NULL in setup_namespace
>>>   lib/libndctl: fix memory leakage problem in add_bus
>>>   libdaxctl: fix memory leakage in add_dax_region()
>>>   dimm: fix potential fd leakage in dimm_action()
>>>   util/help: check whether strdup returns NULL in exec_man_konqueror
>>>   lib/inject: check whether cmd is created successfully
>>>   libndctl: check whether ndctl_btt_get_namespace returns NULL in
>>>     callers
>>>   namespace: check whether seed is NULL in validate_namespace_options
>>>
>>>  daxctl/lib/libdaxctl.c |  3 +++
>>>  ndctl/dimm.c           | 12 +++++++-----
>>>  ndctl/lib/inject.c     |  8 ++++++++
>>>  ndctl/lib/libndctl.c   |  1 +
>>>  ndctl/namespace.c      | 23 ++++++++++++++++++-----
>>>  test/libndctl.c        | 16 +++++++++++-----
>>>  test/parent-uuid.c     |  2 +-
>>>  util/help.c            |  8 +++++++-
>>>  util/json.c            |  3 +++
>>>  9 files changed, 59 insertions(+), 17 deletions(-)
>>>
>> _______________________________________________
>> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
>> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
> 
> _______________________________________________
> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
> 
> .
>
Jeff Moyer Nov. 20, 2020, 4:45 p.m. UTC | #5
Zhiqiang Liu <liuzhiqiang26@huawei.com> writes:

> Recently, we use Coverity to analysis the ndctl package.
> Several issues should be resolved to make Coverity happy.
>
> lihaotian9 (8):
>   namespace: check whether pfn|dax|btt is NULL in setup_namespace
>   lib/libndctl: fix memory leakage problem in add_bus
>   libdaxctl: fix memory leakage in add_dax_region()
>   dimm: fix potential fd leakage in dimm_action()
>   util/help: check whether strdup returns NULL in exec_man_konqueror
>   lib/inject: check whether cmd is created successfully
>   libndctl: check whether ndctl_btt_get_namespace returns NULL in
>     callers
>   namespace: check whether seed is NULL in validate_namespace_options
>
>  daxctl/lib/libdaxctl.c |  3 +++
>  ndctl/dimm.c           | 12 +++++++-----
>  ndctl/lib/inject.c     |  8 ++++++++
>  ndctl/lib/libndctl.c   |  1 +
>  ndctl/namespace.c      | 23 ++++++++++++++++++-----
>  test/libndctl.c        | 16 +++++++++++-----
>  test/parent-uuid.c     |  2 +-
>  util/help.c            |  8 +++++++-
>  util/json.c            |  3 +++
>  9 files changed, 59 insertions(+), 17 deletions(-)

Except for the minor nit I pointed out, for the  series:

Acked-by: Jeff Moyer <jmoyer@redhat.com>
Zhiqiang Liu Nov. 23, 2020, 12:47 a.m. UTC | #6
Thanks for your reply.
I will add one empty line in 1/8 patch in v2.

Regards
Zhiqiang Liu

On 2020/11/21 0:45, Jeff Moyer wrote:
> Zhiqiang Liu <liuzhiqiang26@huawei.com> writes:
> 
>> Recently, we use Coverity to analysis the ndctl package.
>> Several issues should be resolved to make Coverity happy.
>>
>> lihaotian9 (8):
>>   namespace: check whether pfn|dax|btt is NULL in setup_namespace
>>   lib/libndctl: fix memory leakage problem in add_bus
>>   libdaxctl: fix memory leakage in add_dax_region()
>>   dimm: fix potential fd leakage in dimm_action()
>>   util/help: check whether strdup returns NULL in exec_man_konqueror
>>   lib/inject: check whether cmd is created successfully
>>   libndctl: check whether ndctl_btt_get_namespace returns NULL in
>>     callers
>>   namespace: check whether seed is NULL in validate_namespace_options
>>
>>  daxctl/lib/libdaxctl.c |  3 +++
>>  ndctl/dimm.c           | 12 +++++++-----
>>  ndctl/lib/inject.c     |  8 ++++++++
>>  ndctl/lib/libndctl.c   |  1 +
>>  ndctl/namespace.c      | 23 ++++++++++++++++++-----
>>  test/libndctl.c        | 16 +++++++++++-----
>>  test/parent-uuid.c     |  2 +-
>>  util/help.c            |  8 +++++++-
>>  util/json.c            |  3 +++
>>  9 files changed, 59 insertions(+), 17 deletions(-)
> 
> Except for the minor nit I pointed out, for the  series:
> 
> Acked-by: Jeff Moyer <jmoyer@redhat.com>
> 
> 
> .
>