# Re: \[PATCH\] yama: don't abuse rcu\_read\_lock/get\_task\_struct in yama\_task\_prctl()

- From: Oleg Nesterov \<oleg@redhat.com\>
- Date: 2025-02-19 21:42:56 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2025/02/2934563
- Thread: https://ratatoskr.run/linux-security-module/2025/02/2934024/t.md

```text
Damn, sorry for the spam ;)

On 02/19, Oleg Nesterov wrote:
>
> Forgot to say...
>
> with or without this patch the usage of ptrace_relation->tracer/tracee
> doesn't look right (safe) to me... but probably I missed something
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Yes I did. I didn't realize that put_task_struct(tracer/tracee) calls
security_task_free() -> yama_task_free().

Sorry fo the noise.

Oleg.

```
