Bug 386886 - Bluez-Qt leaks rfkill file descriptor into all child processes of KDE session
Summary: Bluez-Qt leaks rfkill file descriptor into all child processes of KDE session
Status: RESOLVED FIXED
Alias: None
Product: frameworks-bluez-qt
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 23:12 UTC by Oliver Freyermuth
Modified: 2017-11-14 18:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Freyermuth 2017-11-13 23:12:33 UTC
All processes in my KDE session have an extra FD open pointing to 
/dev/rfkill, easily checkable with:
ls -la /proc/self/fd
lrwx------ 1 olifre olifre 64 14. Nov 00:11 0 -> /dev/pts/13
lrwx------ 1 olifre olifre 64 14. Nov 00:11 1 -> /dev/pts/13
lrwx------ 1 olifre olifre 64 14. Nov 00:11 2 -> /dev/pts/13
lr-x------ 1 olifre olifre 64 14. Nov 00:11 30 -> /dev/rfkill

Fix is simple and put up here:
https://phabricator.kde.org/D8806
Comment 1 David Rosca 2017-11-14 08:39:16 UTC
Git commit ae044d6dfec90b18c4c44cc49012fab196fa8212 by David Rosca, on behalf of Oliver Freyermuth.
Committed on 14/11/2017 at 08:38.
Pushed by drosca into branch 'master'.

Do not leak rfkill file descriptors.

Summary:
They may be leaked into all child processes,
including regular Konsole terminals on KDE.

I observed them showing up at all processes in my KDE session, just checking
ls -la /proc/self/fd

Using O_CLOEXEC, things are resolved properly.

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: drosca, bshah, broulik, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D8806

M  +2    -2    src/rfkill.cpp

https://commits.kde.org/bluez-qt/ae044d6dfec90b18c4c44cc49012fab196fa8212