Skip to content

RDKEMW-20574 : Fix the notification locks in networkmanager plugin#319

Open
jincysam87 wants to merge 7 commits into
developfrom
topic/NW-crash
Open

RDKEMW-20574 : Fix the notification locks in networkmanager plugin#319
jincysam87 wants to merge 7 commits into
developfrom
topic/NW-crash

Conversation

@jincysam87

Copy link
Copy Markdown
Contributor

Reason for change: Fix the notification locks in networkmanager plugin
Priority: P1
Test Procedure: Check the test steps in RDKEMW-20574
Risks: medium

Signed-off-by: jincysaramma_sam@comcast.com

@jincysam87 jincysam87 requested a review from a team as a code owner June 25, 2026 19:32
Copilot AI review requested due to automatic review settings June 25, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses lock-related issues in the NetworkManager plugin by tightening the scope of notification callback locking and adding a dedicated lock for WiFi scan filter vectors to prevent concurrent access problems during scan option updates and scan result filtering.

Changes:

  • Narrow _notificationLock scope so it’s held primarily during notification callback iteration rather than across additional work/telemetry logging.
  • Introduce _filterVectorsLock to protect m_filterSsidslist / m_filterFrequencies during updates and filtering.
  • In the GNOME backend, snapshot the SSID filter vector before issuing a scan request to avoid races with later modifications.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
plugin/rdk/NetworkManagerRDKProxy.cpp Adds locking around updates to WiFi scan filter vectors for the RDK backend.
plugin/NetworkManagerImplementation.h Introduces _filterVectorsLock to protect shared filter vectors.
plugin/NetworkManagerImplementation.cpp Adjusts notification lock scope and adds filter-vector locking around scan result filtering.
plugin/gnome/NetworkManagerGnomeProxy.cpp Adds locking for filter vector updates and uses an SSID snapshot for scan requests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin/NetworkManagerImplementation.cpp Outdated
Comment on lines +865 to +867
_filterVectorsLock.Lock();
filterScanResults(filterResult);
_filterVectorsLock.Unlock();
Copilot AI review requested due to automatic review settings June 25, 2026 20:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines 618 to +623
string ssid = object["ssid"].String();
string frequency = object["frequency"].String();

double frequencyValue = std::stod(frequency);
bool ssidMatches = scanForSsidsSet.empty() || scanForSsidsSet.find(ssid) != scanForSsidsSet.end();
bool freqMatches = m_filterFrequencies.empty();
bool freqMatches = filterFrequencies.empty();
Comment on lines +623 to 629
bool freqMatches = filterFrequencies.empty();
if (!freqMatches)
{
for (const auto& selectedFrequency : m_filterFrequencies)
for (const auto& selectedFrequency : filterFrequencies)
{
if (selectedFrequency == "ALL")
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants