fanotify: Make wait for permission event response interruptible
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 13 repliesIn review
- v14 patches 10 repliesSuperseded
Changes in v2 from the cover letter
* leave pr_debug() calls alone (Amir)
* simplify permission event state tracking (Amir)
* split some changes into separate patches (Amir)
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | fanotify: Fold dequeue_event() into process_access_response()fs/ | +13 | 1 reply | |
| 2/6 | fanotify: Move locking inside get_one_event()fs/ | +11 | 1 reply | |
| 3/6 | fsnotify: Create function to remove event from notification listfs/ include/ | +16 | 1 reply | |
| 4/6 | fanotify: Simplify cleaning of access_listfs/ | +4 | 1 reply | |
| 5/6 | fanotify: Track permission event statefs/ fs/ fs/ | +40 | 1 reply | |
| 6/6 | fanotify: Use interruptible wait when waiting for permission eventsfs/ fs/ | +34 | 4 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Amir Goldstein |
|---|---|
| 1/6 | R-b |
| 2/6 | R-b |
| 3/6 | R-b |
| 4/6 | R-b |
| 5/6 | R-b |
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/6] fanotify: Make wait for permission event response interruptible
Hello,
When waiting for response to fanotify permission events, we currently use uninterruptible waits. That makes code simple however it can cause lots of processes to end up in uninterruptible sleep with hard reboot being the only alternative in case fanotify listener process stops responding (e.g. due to a bug in its implementation) - reported e.g. in [1]. Uninterruptible sleep also makes system hibernation fail if the listener gets frozen before the process generating fanotify permission event (as reported e.g. here [2]).
This patch set modifies fanotify so that it will use interruptible wait when waiting for fanotify permission event response. Patches are based on current Linus' tree for the ease of testing (I plan to rebase them on top of Amir's pending changes later). I have also create LTP test which stresses handling of permission events while sending processes signals to test the new code [3] Review, comments, and testing are welcome.
[1] https://lore.kernel.org/lkml/153474898224.6806.12518115530793064797.stgit@buzz/
[2] https://lore.kernel.org/lkml/[email protected]/
[3] https://lwn.net/ml/linux-fsdevel/[email protected]/
Changes since v1:
* leave pr_debug() calls alone (Amir)
* simplify permission event state tracking (Amir)
* split some changes into separate patches (Amir)
Honza