On Wed, 15 Oct 2025 19:49:52 +0800
Yongliang Gao <[email protected]> wrote:

> diff --git a/kernel/trace/pid_list.c b/kernel/trace/pid_list.c
> index 090bb5ea4a19..62082a4f60db 100644
> --- a/kernel/trace/pid_list.c
> +++ b/kernel/trace/pid_list.c
> @@ -138,14 +138,14 @@ bool trace_pid_list_is_set(struct trace_pid_list 
> *pid_list, unsigned int pid)
>       if (pid_split(pid, &upper1, &upper2, &lower) < 0)
>               return false;
>  
> -     raw_spin_lock_irqsave(&pid_list->lock, flags);
> +     read_lock_irqsave(&pid_list->lock, flags);
>       upper_chunk = pid_list->upper[upper1];
>       if (upper_chunk) {
>               lower_chunk = upper_chunk->data[upper2];
>               if (lower_chunk)
>                       ret = test_bit(lower, lower_chunk->data);
>       }
> -     raw_spin_unlock_irqrestore(&pid_list->lock, flags);
> +     read_unlock_irqrestore(&pid_list->lock, flags);
>  
>       return ret;
>  }

Unfortunately you cannot do this because this is called while holding the
task pi_lock and rq locks. In PREEMPT_RT() the read/write_lock_* turn into
mutexes.

Sebastian, is there any equivalent of raw_read/write_locks() that can be
used?

-- Steve

Reply via email to