Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
> *** CID 425354: Integer handling issues (CONSTANT_EXPRESSION_RESULT) > /libcfs/libcfs/hash.c: 1067 in cfs_hash_create() > 1061 (flags & CFS_HASH_NO_LOCK) == 0)); > 1062 LASSERT(ergo((flags & CFS_HASH_REHASH_KEY) != 0, > 1063 ops->hs_keycpy != NULL)); > 1064 > 1065 len = (flags & CFS_HASH_BIGNAME) == 0 ? > 1066 CFS_HASH_NAME_LEN : CFS_HASH_BIGNAME_LEN; >>>> CID 425354: Integer handling issues (CONSTANT_EXPRESSION_RESULT) >>>> The expression "184UL /* sizeof (struct cfs_hash) */ + len <= (8192UL /* 2 << 12 */) && 1 /* ((gfp_t)(0x200000U | 0x400000U) | (gfp_t)64U) & (((gfp_t)32U | (gfp_t)524288U) | (gfp_t)4194304U) */" is suspicious because it performs a Boolean operation on a constant other than 0 or 1. > 1067 LIBCFS_ALLOC(hs, sizeof(struct cfs_hash) + len); > 1068 if (hs == NULL) > 1069 RETURN(NULL); > 1070 > 1071 strscpy(hs->hs_name, name, len); > 1072 hs->hs_flags = flags; >