diff options
author | Baokun Li <[email protected]> | 2024-05-22 19:43:08 +0800 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-05-29 13:03:31 +0200 |
commit | bc9dde6155464e906e630a0a5c17a4cab241ffbb (patch) | |
tree | 2a3f4d2fe8dec61ad9fadfaac06daf30623344c4 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 85e833cd7243bda7285492b0653c3abb1e2e757b (diff) |
cachefiles: make on-demand read killable
Replacing wait_for_completion() with wait_for_completion_killable() in
cachefiles_ondemand_send_req() allows us to kill processes that might
trigger a hunk_task if the daemon is abnormal.
But now only CACHEFILES_OP_READ is killable, because OP_CLOSE and OP_OPEN
is initiated from kworker context and the signal is prohibited in these
kworker.
Note that when the req in xas changes, i.e. xas_load(&xas) != req, it
means that a process will complete the current request soon, so wait
again for the request to be completed.
In addition, add the cachefiles_ondemand_finish_req() helper function to
simplify the code.
Suggested-by: Hou Tao <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Jeff Layton <[email protected]>
Reviewed-by: Jia Zhu <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions