USB devices are not closed when error occurs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fwupd (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Brian Murray | ||
Yakkety |
Won't Fix
|
Undecided
|
Unassigned | ||
Zesty |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* fwupd (used in Xenial) does not close USB device nodes when it fails to process the
devices.
* The orphan (un-closed) device node will be kept until fwupd ends
* The behavior will avoid the system to set the USB device as idle/suspend then the system cannot enter some power-saving mode (eg. S0ix)
[Test Case]
* make sure fwupd is not running by executing 'fwupdmgr get-devices'
It will show devices information.
* list the fds opened by fwupd
$ sudo ls -l /proc/$(pgrep fwupd)/fd | grep usb
If a system is not affected, it will output nothing.
If the result shows one or more strings like /dev/bus/
(BUS and DEV are numeric variables), that means the issue is existing.
[Regression Potential]
* The fix only closes file descriptors of USB devices when errors happen and should not have regression there.
[Original description]
In fwupd, a few of USB devices are not closed when there are some failures of
operations. This issue will cause fwupd has some orphan USB nodes inside during fwupd is
running. A orphan USB node might introduce memory leak and block some runtime power
features as well.
I proposed a upstream PR, and also put the link here.
https:/
description: | updated |
Changed in fwupd (Ubuntu): | |
importance: | Undecided → Medium |
Changed in fwupd (Ubuntu Zesty): | |
status: | New → Fix Released |
Changed in fwupd (Ubuntu Yakkety): | |
status: | New → Won't Fix |
Changed in fwupd (Ubuntu): | |
status: | New → Fix Released |
Changed in fwupd (Ubuntu Xenial): | |
status: | Triaged → Fix Committed |
The upstream PR has been merged.
Could we have this patch also land in Ubuntu, please?