fs: provide a stop gap fix for buggy resume firmware API calls
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | test_firmware: add suspend support to test buggy driverslib/ tools/ tools/ | +211 | 1 reply | |
| 2/2 | fs/kernel_read_file: use usermodehelper_read_trylock() as a stop gapfs/ kernel/ kernel/ | +50 | 2 replies |
Reviews trailers per patch
None of the 2 patches has a Reviewed-by or Acked-by.
| Patch | Lukas Middendorf |
|---|---|
| 1/2 | |
| 2/2 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] fs: provide a stop gap fix for buggy resume firmware API calls
Lukas has reported an issue [0] with a media driver which causes stall on resume. At first his suspicion was that this issue was due to a bug in btrfs. I managed to build a custom driver to reproduce the issue and confirmed it was not a bug in btrfs. The issue is reproducible in XFS as well. This issue is a demonstration of how broken the filesystem suspend / resume cycle is and how easy it can be to trigger an issue.
By only doing reads with the firmware API used incorrectly, a simple suspend / resume cycle can stall a system. The stall happens since the hardware never gets read request issued by the filesystem as it was already suspended. The fs waits forever. The stall also happens because resume calls are synchronous and if one does not complete we'll wait forever.
My new unposted VFS series for the fs freezer / resume work fixes this, however this series will require a bit more discussion before this lands upstream. And so this series provides a test case for the issue and an intermediate stop-gap patch which resolves the issue for now. We can remove this once the VFS freeze work lands upstream.
[0] https://lkml.kernel.org/r/[email protected]
Luis Chamberlain (2):
test_firmware: add suspend support to test buggy drivers fs/kernel_read_file: use usermodehelper_read_trylock() as a stop gap
fs/kernel_read_file.c | 37 ++++- kernel/kexec_file.c | 9 +- kernel/module.c | 8 +- lib/test_firmware.c | 136 ++++++++++++++++-- tools/testing/selftests/firmware/fw_lib.sh | 8 +- .../selftests/firmware/fw_test_resume.sh | 80 +++++++++++ 6 files changed, 261 insertions(+), 17 deletions(-) create mode 100755 tools/testing/selftests/firmware/fw_test_resume.sh
Signature · 1 line
2.29.2