-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDK-55945 : sync codebase with stable2 #16
base: develop
Are you sure you want to change the base?
Conversation
Coverity Issue - Data race conditionAccessing "compTr181ParamMap" without holding lock "compParamMap". Elsewhere, "compTr181ParamMap" is written to with "compParamMap" held 3 out of 3 times. Medium Impact, CWE-366 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
Coverity Issue - Data race conditionAccessing "compTr181ParamMap" without holding lock "compParamMap". Elsewhere, "compTr181ParamMap" is written to with "compParamMap" held 3 out of 3 times. Medium Impact, CWE-366 Issue locationThis issue was discovered outside the diff for this Pull Request. You can find it at: |
@@ -565,9 +564,11 @@ | |||
T2Info("Waiting for CollectAndReport to be complete : %s\n", singleProfile->name); | |||
pthread_mutex_lock(&plMutex); | |||
initialized=false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Check of thread-shared field evades lock acquisition
Thread1 sets "initialized" to a new value. Now the two threads have an inconsistent view of "initialized" and updates to fields correlated with "initialized" may be lost.
High Impact, CWE-543
LOCK_EVASION
How to fix
Guard the modification of "initialized" and the read used to decide whether to modify "initialized" with the same set of locks.
if(count++ > 30){ | ||
break; | ||
} | ||
sleep(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Waiting while holding a lock
Call to "sleep" might sleep while holding lock "scMutex".
Medium Impact, CWE-667
SLEEP
@@ -1132,6 +1148,8 @@ | |||
T2Debug("Freeing compTr181ParamMap \n"); | |||
hash_map_destroy(compTr181ParamMap, freeComponentEventList); | |||
compTr181ParamMap = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Check of thread-shared field evades lock acquisition
Thread1 sets "compTr181ParamMap" to a new value. Now the two threads have an inconsistent view of "compTr181ParamMap" and updates to fields of "compTr181ParamMap" or fields correlated with "compTr181ParamMap" may be lost.
High Impact, CWE-543
LOCK_EVASION
How to fix
Guard the modification of "compTr181ParamMap" and the read used to decide whether to modify "compTr181ParamMap" with the same set of locks.
strvalue[strlen(strvalue)-1] = '\0'; | ||
} | ||
ret = report_or_cache_data(strvalue, marker); | ||
if(strvalue != NULL){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Dereference before null check
Null-checking "strvalue" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
Medium Impact, CWE-476
REVERSE_INULL
if(mutex_return != 0){ | ||
T2Error("tProfile Mutex locking failed : %d \n",mutex_return); | ||
if(mutex_return == EBUSY) | ||
T2Error("tProfile Mutex is Busy, already the report generation might be in progress \n"); | ||
return T2ERROR_FAILURE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Missing unlock
Returning without unlocking "scMutex".
Medium Impact, CWE-667
LOCK
|
Reason for change: bring stable2 code changes to develop Test Procedure: No Regressions Risks: Low Signed-off-by: c.shivabhaskar97@gmail.com
ba4460b
to
5cc82ef
Compare
Reason for change: Fix Build Issue Test Procedure: L1/L2 test and no change in functionality Risks: Low Signed-off-by: c.shivabhaskar97@gmail.com
9b7b385
to
b40afa3
Compare
No description provided.