Re: [RESEND][PATCH v31 8/9] sched: Add deactivated (sleeping) owner handling to find_proxy_task()
From: Peter Zijlstra
Date: Thu Aug 13 2026 - 10:25:13 EST
On Thu, Aug 13, 2026 at 03:48:23PM +0200, Peter Zijlstra wrote:
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1261,11 +1261,11 @@ struct task_struct {
> struct mutex *blocked_on; /* lock we're blocked on */
> raw_spinlock_t blocked_lock;
> #ifdef CONFIG_SCHED_PROXY_EXEC
> - struct list_head blocked_head; /* tasks blocked on this task */
> + struct list_head blocked_head __guarded_by(&blocked_lock); /* tasks blocked on this task */
> struct list_head blocked_node; /* our entry on someone elses blocked_head */
> /* Node for list of tasks to process blocked_head list for blocked entitiy activations */
> struct list_head blocked_activation_node;
> - struct task_struct *sleeping_owner; /* task our blocked_node is enqueued on */
> + struct task_struct *sleeping_owner __guarded_by(&blocked_lock); /* task our blocked_node is enqueued on */
> #endif
Oh, cute, that last __guarded_by() isn't right. p->sleeping_owner is in
fact guarded by owner->blocked_lock. But clang isn't complaining :/