On 2020/12/17 11:33, Verma, Vishal L wrote:
> On Fri, 2020-11-06 at 17:27 +0800, Zhiqiang Liu wrote:
>> ndctl_bus_cmd_new_ars_cp() is called to create cmd,
>> which may return NULL. We need to check whether it
>> is NULL in callers, such as ndctl_nam
On 2020/12/17 11:41, Verma, Vishal L wrote:
> On Wed, 2020-11-25 at 09:00 +0800, Zhiqiang Liu wrote:
>> Changes: V1->V2
>> - add one empty line in 1/8 patch as suggested by Jeff Moyer
>> .
>>
>>
>> Recently, we use Coverity to analysis the ndctl pac
In setup_namespace(), pfn|dax|btt is obtained by calling
ndctl_region_get_**_seed(), which may return NULL. So we
need to check whether pfn|dax|btt is NULL before accessing
them.
Signed-off-by: Zhiqiang Liu
Acked-by: Jeff Moyer
---
ndctl/namespace.c | 6 ++
1 file changed, 6 insertions
Changes: V1->V2
- add one empty line in 1/8 patch as suggested by Jeff Moyer
.
Recently, we use Coverity to analysis the ndctl package.
Several issues should be resolved to make Coverity happy.
Zhiqiang Liu (8):
namespace: check whether pfn|dax|btt is NULL in setup_namespace
lib/libnd
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 writes:
>
>> Recently, we use Coverity to analysis the ndctl package.
>> Several issues should be resolved to make Coverity happy.
&
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
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
-by: Zhiqiang Liu
---
ndctl/namespace.c | 16
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/ndctl/namespace.c b/ndctl/namespace.c
index 257384d..5a92d62 100644
--- a/ndctl/namespace.c
+++ b/ndctl/namespace.c
@@ -847,8 +847,7 @@ static int validate_namespace_options
ndctl_btt_get_namespace() may return NULL, so we need to check
return value of ndctl_btt_get_namespace() before using the return
value in callers.
Signed-off-by: Zhiqiang Liu
---
test/libndctl.c| 16 +++-
test/parent-uuid.c | 2 +-
util/json.c| 3 +++
3 files changed
In exec_man_konqueror(), new is allocated by calling strdup(),
which may return NULL. We should check whether new is NULL before
using it.
Signed-off-by: Zhiqiang Liu
---
util/help.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/util/help.c b/util/help.c
index
ndctl_bus_cmd_new_ars_cp() is called to create cmd,
which may return NULL. We need to check whether it
is NULL in callers, such as ndctl_namespace_get_clear_uint
and ndctl_namespace_injection_status.
Signed-off-by: Zhiqiang Liu
---
ndctl/lib/inject.c | 8
1 file changed, 8 insertions
In dimm_action(), actx.f_out and actx.f_in may be set by calling
fopen(). If exceptions occur, we will directly goto out tag.
However, we did not close actx.f_out|actx.f_in in out tag, which
will cause fd leakage.
Signed-off-by: Zhiqiang Liu
---
ndctl/dimm.c | 12 +++-
1 file changed
In add_dax_region(), region->devname is allocated by
calling strdup(), which may return NULL. So, we need
to check whether region->devname is NULL, and free
region->devname in err_read tag.
Signed-off-by: Zhiqiang Liu
---
daxctl/lib/libdaxctl.c | 3 +++
1 file changed, 3 insertions
In add_bus(), bus->bus_path is set by calling parent_dev_path(),
which will finally adopt realpath(, NULL) to allocate new path.
However, bus->bus_path will not be freed in err_read tag, then,
memory leakage occurs.
Signed-off-by: Zhiqiang Liu
---
ndctl/lib/libndctl.c | 1 +
1 file chan
In setup_namespace(), pfn|dax|btt is obtained by calling
ndctl_region_get_**_seed(), which may return NULL. So we
need to check whether pfn|dax|btt is NULL before accessing
them.
Signed-off-by: Zhiqiang Liu
---
ndctl/namespace.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion
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
16 matches
Mail list logo