Fix leak of pipe FDs in MD RAID code
ClosedPublic

Authored by fvogt on Jun 21 2018, 5:07 PM.

Details

Summary

Use pipe2 with O_CLOEXEC to not leak FDs and close the pipe completely after reading.

BUG: 378268

Test Plan

Did not break anything here, but I don't have MD RAID.
According to the reporter this fixed the FD leak issue.

Diff Detail

Repository
R106 KSysguard
Branch
Plasma/5.12
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 214
Build 214: arc lint + arc unit
fvogt created this revision.Jun 21 2018, 5:07 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 21 2018, 5:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
fvogt requested review of this revision.Jun 21 2018, 5:07 PM
fvogt updated this revision to Diff 36477.Jun 21 2018, 5:10 PM

Comment got lost - readded.

fvogt edited the summary of this revision. (Show Details)Jun 21 2018, 5:10 PM
fvogt updated this revision to Diff 36480.Jun 21 2018, 6:22 PM

Remove cleanup again - it breaks stuff.

fvogt retitled this revision from [WIP] Fix use of pipes in MD RAID code to Fix leak of pipe FDs in MD RAID code.Jun 21 2018, 7:53 PM
fvogt edited the summary of this revision. (Show Details)
fvogt edited the test plan for this revision. (Show Details)
mart accepted this revision.Jun 22 2018, 8:38 AM
This revision is now accepted and ready to land.Jun 22 2018, 8:38 AM
This revision was automatically updated to reflect the committed changes.