[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmhSYkXp0KBXOyFc@zeniv-ca.linux.org.uk>
Date: Tue, 26 Apr 2022 20:13:22 +0000
From: Al Viro <viro@...iv.linux.org.uk>
To: Tejun Heo <tj@...nel.org>
Cc: Imran Khan <imran.f.khan@...cle.com>, gregkh@...uxfoundation.org,
ebiederm@...ssion.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 01/10] kernfs: Remove reference counting for
kernfs_open_node.
On Tue, Apr 26, 2022 at 08:29:21AM -1000, Tejun Heo wrote:
> The code is just wrong. You can end up:
>
> on = kn->attr.open;
> if (!on)
> return;
>
> // we get preempted here and someone else puts @on and then
> // recreates it
Can't happen - the caller has guaranteed that no new openers will be
coming. Look at the call chain of kernfs_drain_open_files()...
Al, back to life and staring at the pile of mail to sift through...
Powered by blists - more mailing lists