[PATCH] kernel/watch_queue: Make pipe NULL while clearing watch_queue
Siddh Raman Pant
code at siddh.me
Sat Jul 23 14:29:23 UTC 2022
On Sat, 23 Jul 2022 19:34:17 +0530 Greg KH <gregkh at linuxfoundation.org> wrote:
> Also you now have a spinlock held when calling rcu_read_unlock(), are
> you sure that's ok?
>
>
We logically should not do write operations in a read critical section, so the
nulling of `wqueue->pipe->watch_queue` should happen after rcu_read_unlock().
Also, since we already have a spinlock, we can use it to ensure the nulling.
So I think it is okay.
Though, it is my first time encountering a spinlock and an rcu lock together,
so if I am wrong, please do correct me.
Thanks,
Siddh
More information about the Linux-security-module-archive
mailing list