[Gluster-devel] Fwd: New Defects reported by Coverity Scan for GlusterFS

Lalatendu Mohanty lmohanty at redhat.com
Fri Jan 24 18:11:28 UTC 2014




-------- Original Message --------
Subject: 	New Defects reported by Coverity Scan for GlusterFS
Date: 	Fri, 24 Jan 2014 08:13:16 -0800
From: 	scan-admin at coverity.com



Hi,


Please find the latest report on new defect(s) introduced to GlusterFS found with Coverity Scan.

Defect(s) Reported-by: Coverity Scan
Showing 3 of 3 defect(s)


** CID 1164067:  Unchecked return value  (CHECKED_RETURN)
/xlators/features/qemu-block/src/qb-coroutines.c: 440 in qb_update_size_xattr()

** CID 1134006:  Unchecked return value  (CHECKED_RETURN)
/xlators/encryption/crypt/src/metadata.c: 218 in create_format_v1()

** CID 1164066:  Logically dead code  (DEADCODE)
/xlators/cluster/dht/src/dht-rebalance.c: 1096 in gf_defrag_handle_migrate_error()


________________________________________________________________________________________________________
*** CID 1164067:  Unchecked return value  (CHECKED_RETURN)
/xlators/features/qemu-block/src/qb-coroutines.c: 440 in qb_update_size_xattr()
434
435     	if (dict_set_str (xattr, qb_conf->qb_xattr_key, val) != 0) {
436     		dict_unref (xattr);
437     		return;
438     	}
439
>>>     CID 1164067:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "syncop_fsetxattr(this->children->xlator, fd, xattr, 0)".
440     	syncop_fsetxattr (FIRST_CHILD(this), fd, xattr, 0);
441     	dict_unref (xattr);
442     }
443
444
445     int

________________________________________________________________________________________________________
*** CID 1134006:  Unchecked return value  (CHECKED_RETURN)
/xlators/encryption/crypt/src/metadata.c: 218 in create_format_v1()
212     	if (ret)
213     		return ret;
214     	ret = get_nmtd_link_key(loc, master, nmtd_link_key);
215     	if (ret)
216     		return ret;
217     	
>>>     CID 1134006:  Unchecked return value  (CHECKED_RETURN)
>>>     No check of the return value of "AES_set_encrypt_key(mtd_key, 128, &EMTD_KEY)".
218     	AES_set_encrypt_key(mtd_key, sizeof(mtd_key)*8, &EMTD_KEY);
219
220     	gctx = CRYPTO_gcm128_new(&EMTD_KEY, (block128_f)AES_encrypt);
221
222     	/* TBD: Check return values */
223

________________________________________________________________________________________________________
*** CID 1164066:  Logically dead code  (DEADCODE)
/xlators/cluster/dht/src/dht-rebalance.c: 1096 in gf_defrag_handle_migrate_error()
1090     {
1091             /* if errno is not ENOSPC or ENOTCONN, we can still continue
1092                with rebalance process */
1093             if ((op_errno != ENOSPC) || (op_errno != ENOTCONN))
1094                     return 1;
1095
>>>     CID 1164066:  Logically dead code  (DEADCODE)
>>>     Execution cannot reach this statement "if (op_errno == 107) {
   de...".
1096             if (op_errno == ENOTCONN) {
1097                     /* Most probably mount point went missing (mostly due
1098                        to a brick down), say rebalance failure to user,
1099                        let him restart it if everything is fine */
1100                     defrag->defrag_status = GF_DEFRAG_STATUS_FAILED;
1101                     return -1;


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, http://scan.coverity.com/projects/987?tab=Overview

To unsubscribe from the email notification for new defects, http://scan5.coverity.com/cgi-bin/unsubscribe.py





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140124/048b616a/attachment-0001.html>


More information about the Gluster-devel mailing list