Skip to contentSkip to conversation

rust: task: fix `SAFETY` comment for Task::wake_up

PATCH Applied Panagiotis Foliadis 4 participants 4 messages Mar 8, 2025 – Mar 10, 2025 Rust

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: task: fix `SAFETY` comment for Task::wake_up

The SAFETY comment inside the wake_up function references erroneously the signal_pending function instead of the wake_up_process which is actually called. Fix the comment to reference the correct function.

Fixes fe95f58320e6 ("rust: task: adjust safety comments in Task methods")
---
 rust/kernel/task.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/task.rs +1 -1
index 07bc22a7645c0c7d792a0a163dd55b8ff0fe5f92..38da555a2bdbb71d698c671ad1a7a337e50c6600 100644
@@ -320,7 +320,7 @@ pub fn tgid_nr_ns(&self, pidns: Option<&PidNamespace>) -> Pid {
 
     /// Wakes up the task.
     pub fn wake_up(&self) {
-        // SAFETY: It's always safe to call `signal_pending` on a valid task, even if the task
+        // SAFETY: It's always safe to call `wake_up_process` on a valid task, even if the task
         // running.
         unsafe { bindings::wake_up_process(self.as_ptr()) };
     }

---
base-commit: 2a520073e74fbb956b5564818fc5529dcc7e9f0e
change-id: 20250308-comment-fix-25d09ff1ccb5

Best regards,

Signature · 1 line
Panagiotis Foliadis <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Panagiotis Foliadis

The SAFETY comment inside the wake_up function references erroneously the signal_pending function instead of the wake_up_process which is actually called. Fix the comment to reference the correct function.

Fixes fe95f58320e6 ("rust: task: adjust safety comments in Task methods")
---
 rust/kernel/task.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

You can add,

--
C. Mitrodimas

reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Panagiotis Foliadis
Quoted 7 lines · Panagiotis Foliadis

The SAFETY comment inside the wake_up function references erroneously the signal_pending function instead of the wake_up_process which is actually called. Fix the comment to reference the correct function.

Fixes fe95f58320e6 ("rust: task: adjust safety comments in Task methods")

Thanks.

Applied
#3 lore raw
In reply to Panagiotis Foliadis
Quoted 8 lines · Panagiotis Foliadis

The SAFETY comment inside the wake_up function references erroneously the signal_pending function instead of the wake_up_process which is actually called. Fix the comment to reference the correct function.

Fixes fe95f58320e6 ("rust: task: adjust safety comments in Task methods")

Applied to rust-fixes -- thanks everyone!

[ Slightly reworded. - Miguel ]

Cheers,
Miguel