Thread (62 messages) 62 messages, 8 authors, 12d ago

Re: [PATCH v18 31/42] dept: assign unique dept_key to each distinct wait_for_completion() caller

From: Byungchul Park <byungchul@sk.com>
Date: 2026-02-23 00:47:36
Also in: dri-devel, linux-arch, linux-block, linux-doc, linux-ext4, linux-fsdevel, linux-i2c, linux-ide, linux-media, linux-mm, linux-modules, linux-nfs, linux-rt-devel, lkml, rcu, rust-for-linux

On Sun, Feb 15, 2026 at 07:42:05AM +0100, Dirk Behme wrote:
On 05.12.25 08:18, Byungchul Park wrote:
quoted
wait_for_completion() can be used at various points in the code and it's
very hard to distinguish wait_for_completion()s between different usages.
Using a single dept_key for all the wait_for_completion()s could trigger
false positive reports.

Assign unique dept_key to each distinct wait_for_completion() caller to
avoid false positive reports.

While at it, add a rust helper for wait_for_completion() to avoid build
errors.

Signed-off-by: Byungchul Park <byungchul@sk.com>
---
 include/linux/completion.h | 100 +++++++++++++++++++++++++++++++------
 kernel/sched/completion.c  |  60 +++++++++++-----------
 rust/helpers/completion.c  |   5 ++
 3 files changed, 120 insertions(+), 45 deletions(-)
...
quoted
diff --git a/rust/helpers/completion.c b/rust/helpers/completion.c
index b2443262a2ae..5bae5e749def 100644
--- a/rust/helpers/completion.c
+++ b/rust/helpers/completion.c
@@ -6,3 +6,8 @@ void rust_helper_init_completion(struct completion *x)
 {
      init_completion(x);
 }
+
+void rust_helper_wait_for_completion(struct completion *x)
Please add `__rust_helper`:
I will.  Thanks.

	Byungchul
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/rust/helpers/completion.c?h=next-20260213&id=1c7a6f48f7eeb3014584d2fc55fc67f0cbaeef69

Best regards

Dirk
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help