Skip to content
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

fix coverity scan issue 1568450 #28139

Merged
merged 4 commits into from
Dec 23, 2024

Conversation

wangleis
Copy link
Contributor

Details:

  • fix below coverity scan issue

*** CID 1568450: Concurrent data access violations (MISSING_LOCK)
/openvino/src/inference/src/os/lin/lin_system_conf.cpp: 225 in ov::CPU::CPU()::[lambda() (instance 2)]::operator ()() const()
219 return -1;
220 } else if (valid_cpu_mapping_table.size() == (unsigned)_processors) {
221 return 0;
222 } else {
223 _processors = valid_cpu_mapping_table.size();
224 _cpu_mapping_table.swap(valid_cpu_mapping_table);

CID 1568450:  Concurrent data access violations  (MISSING_LOCK)
Accessing "this->this->_proc_type_table" without holding lock "ov::CPU._cpu_mutex". Elsewhere, "ov::CPU._proc_type_table" is written to with "CPU._cpu_mutex" held 2 out of 3 times.

225 update_valid_processor_linux(std::move(phy_core_list),
226 _numa_nodes,
227 _cores,
228 _proc_type_table,
229 _cpu_mapping_table);
230 return 0;

Tickets:

  • CID 1568450

@wangleis wangleis requested a review from a team as a code owner December 19, 2024 07:41
@github-actions github-actions bot added the category: inference OpenVINO Runtime library - Inference label Dec 19, 2024
@dmitry-gorokhov dmitry-gorokhov added this pull request to the merge queue Dec 23, 2024
Merged via the queue into openvinotoolkit:master with commit b0ff709 Dec 23, 2024
182 checks passed
11happy pushed a commit to 11happy/openvino that referenced this pull request Dec 23, 2024
### Details:
- *fix below coverity scan issue*

*** CID 1568450:  Concurrent data access violations  (MISSING_LOCK)
/openvino/src/inference/src/os/lin/lin_system_conf.cpp: 225 in
ov::CPU::CPU()::[lambda() (instance 2)]::operator ()() const()
219                 return -1;
220 } else if (valid_cpu_mapping_table.size() == (unsigned)_processors)
{
221                 return 0;
222             } else {
223                 _processors = valid_cpu_mapping_table.size();
224                 _cpu_mapping_table.swap(valid_cpu_mapping_table);
>>>     CID 1568450:  Concurrent data access violations  (MISSING_LOCK)
>>> Accessing "this->this->_proc_type_table" without holding lock
"ov::CPU._cpu_mutex". Elsewhere, "ov::CPU._proc_type_table" is written
to with "CPU._cpu_mutex" held 2 out of 3 times.
225 update_valid_processor_linux(std::move(phy_core_list),
226                                              _numa_nodes,
227                                              _cores,
228                                              _proc_type_table,
229                                              _cpu_mapping_table);
230                 return 0;

### Tickets:
 - *CID 1568450*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants