[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1822b768504.1d4e377e236061.5518350412857967240@siddh.me>
Date: Sat, 23 Jul 2022 19:59:23 +0530
From: Siddh Raman Pant <code@...dh.me>
To: "Greg KH" <gregkh@...uxfoundation.org>
Cc: "David Howells" <dhowells@...hat.com>,
"Christophe JAILLET" <christophe.jaillet@...adoo.fr>,
"Eric Dumazet" <edumazet@...gle.com>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
"linux-security-modules" <linux-security-module@...r.kernel.org>,
"linux-kernel-mentees"
<linux-kernel-mentees@...ts.linuxfoundation.org>,
"linux-kernel" <linux-kernel@...r.kernel.org>,
"syzbot+c70d87ac1d001f29a058"
<syzbot+c70d87ac1d001f29a058@...kaller.appspotmail.com>
Subject: Re: [PATCH] kernel/watch_queue: Make pipe NULL while clearing
watch_queue
On Sat, 23 Jul 2022 19:34:17 +0530 Greg KH <gregkh@...uxfoundation.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
Powered by blists - more mailing lists