diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-09-09 10:01:04 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-09-10 04:18:45 +0000 |
commit | 0af88a6c33e8fd57745997afb7c68e4ef6023fbf (patch) | |
tree | 8e48ca5fc7a08ae7453345223e633c01c1c75687 /xlators/mgmt | |
parent | ea95631ff47c8048f039faedbc0faa918c4e165a (diff) |
glusterd, rpc, glusterfsd: fix coverity defects and put required annotations
1404965 - Null pointer dereference
1404316 - Program hangs
1401715 - Program hangs
1401713 - Program hangs
Updates: bz#789278
Change-Id: I6e6575daafcb067bc910445f82a9d564f43b75a2
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-shd-svc.c | 2 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 58bb075aa57..0493612d1da 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3293,7 +3293,7 @@ glusterd_friend_remove(uuid_t uuid, char *hostname) ret = glusterd_peerinfo_cleanup(peerinfo); out: gf_msg_debug(THIS->name, 0, "returning %d", ret); - + /* coverity[LOCK] */ return ret; } diff --git a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c index eaed873d430..e106398e697 100644 --- a/xlators/mgmt/glusterd/src/glusterd-shd-svc.c +++ b/xlators/mgmt/glusterd/src/glusterd-shd-svc.c @@ -482,6 +482,7 @@ glusterd_shdsvc_start(glusterd_svc_t *svc, int flags) volinfo->volname, glusterd_proc_get_pid(&svc->proc)); glusterd_shd_svcproc_cleanup(&volinfo->shd); glusterd_volinfo_unref(volinfo); + goto out1; } goto out; } @@ -494,6 +495,7 @@ out: glusterd_shd_svcproc_cleanup(&volinfo->shd); if (volinfo) glusterd_volinfo_unref(volinfo); +out1: gf_msg_debug(THIS->name, 0, "Returning %d", ret); return ret; diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index d3a3e65b647..24743b62ade 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -2492,6 +2492,7 @@ glusterd_start_volume(glusterd_volinfo_t *volinfo, int flags, gf_boolean_t wait) attach_brick_callback can also call store_volinfo for same volume to update volinfo on disk */ + /* coverity[ORDER_REVERSAL] */ LOCK(&volinfo->lock); ret = glusterd_store_volinfo(volinfo, verincrement); UNLOCK(&volinfo->lock); |