Closed Bug 1621051 Opened 4 years ago Closed 4 years ago

Make nsIOService::AllowPort thread-safe

Categories

(Core :: Networking, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox75 --- fixed
firefox76 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

nsIOService::AllowPort is called from TRRServiceChannel::AsyncOpen, so we have to make it thread-safe.

Priority: -- → P1
Whiteboard: [necko-triaged]
Assignee: nobody → kershaw
Status: NEW → ASSIGNED
Pushed by kjang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2be4c9a3f053
Add a mutext to protect mRestrictedPortList,r=valentin
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

Comment on attachment 9132023 [details]
Bug 1621051 - Add a mutext to protect mRestrictedPortList,r?valentin

Beta/Release Uplift Approval Request

  • User impact if declined: There could be a race when checking if a port is allowed to connect.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch is quite simple and straightforward, so the risk is low.
  • String changes made/needed: N/A
Attachment #9132023 - Flags: approval-mozilla-beta?

Comment on attachment 9132023 [details]
Bug 1621051 - Add a mutext to protect mRestrictedPortList,r?valentin

approved for 75.0b2

Attachment #9132023 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

What happens if nsIOService::AllowPort is called between restrictedPortList.Assign(mRestrictedPortList); and mRestrictedPortList.Assign(std::move(restrictedPortList));?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: