Summary: | Device::listFromType can return incorrect types | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-solid | Reporter: | masonbee <masonbee> |
Component: | general | Assignee: | Lukáš Tinkl <lukas> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | kde, kdelibs-bugs, plasma-bugs, sitter |
Priority: | NOR | ||
Version: | 5.68.0 | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Backtrace |
Description
masonbee
2020-03-25 10:33:55 UTC
What's the backtrace? Created attachment 126999 [details]
Backtrace
Seems solid is giving out non-NetworkShares when we explicit asked for NetworkShares. Git commit 4847c9e2fed215f8d2bfe8bfd5a58c0f62d5d3a9 by Harald Sitter. Committed on 25/03/2020 at 16:10. Pushed by sitter into branch 'Plasma/5.18'. skip over supposed network shares that aren't Summary: we explicitly request listFromType(Solid::DeviceInterface::NetworkShare) but apparently still can get devices that aren't actually of that type. add an explicit type check to guard against bogus shares coming out of listFromType. Test Plan: mount an overlay (I am guessing that's what the problem with kubuntu is), observe no crash on init Reviewers: ngraham Reviewed By: ngraham Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D28275 M +5 -0 Modules/samba/smbmountmodel.cpp https://commits.kde.org/kinfocenter/4847c9e2fed215f8d2bfe8bfd5a58c0f62d5d3a9 Bouncing bug to solid. Definitely reproducible with live ISOs where the overlayfs is returned from Device::listFromType(NetworkShare) but in fact doesn't ->is() cast to NetworkShare (it also is no network share of course). FstabManager::devicesFromQuery just returns all devices for NetworkShare type. The logic for determining if something is a network share or encrypted storage access is done in the Device and not accessible here. |