summaryrefslogtreecommitdiff
path: root/include/linux/kref_api.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-10-23 21:41:58 -0700
committerPeter Zijlstra <peterz@infradead.org>2024-10-30 22:42:19 +0100
commit2bf8e5aceff899f5117f14c73e869a61c44d8a69 (patch)
tree590fd6451c2e552ae1c4ca054cc373d19c97a7bb /include/linux/kref_api.h
parent9e9af8bbb5f9b565b9faf691f96f661791e199b0 (diff)
uprobes: allow put_uprobe() from non-sleepable softirq context
Currently put_uprobe() might trigger mutex_lock()/mutex_unlock(), which makes it unsuitable to be called from more restricted context like softirq. Let's make put_uprobe() agnostic to the context in which it is called, and use work queue to defer the mutex-protected clean up steps. RB tree removal step is also moved into work-deferred callback to avoid potential deadlock between softirq-based timer callback, added in the next patch, and the rest of uprobe code. We can rework locking altogher as a follow up, but that's significantly more tricky, so warrants its own patch set. For now, we need to make sure that changes in the next patch that add timer thread work correctly with existing approach, while concentrating on SRCU + timeout logic. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20241024044159.3156646-2-andrii@kernel.org
Diffstat (limited to 'include/linux/kref_api.h')
0 files changed, 0 insertions, 0 deletions