[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZGu9v3OA0wkhff7g@slm.duckdns.org>
Date: Mon, 22 May 2023 09:08:47 -1000
From: Tejun Heo <tj@...nel.org>
To: Muchun Song <songmuchun@...edance.com>
Cc: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
muchun.song@...ux.dev
Subject: Re: [PATCH] kernfs: fix missing kernfs_idr_lock to remove an ID from
the IDR
On Tue, May 16, 2023 at 11:45:36AM +0800, Muchun Song wrote:
> @@ -655,7 +660,7 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,
> return kn;
>
> err_out3:
> - idr_remove(&root->ino_idr, (u32)kernfs_ino(kn));
> + kernfs_idr_remove(root, kn);
Good catch but I'd just open code the locking here.
Thanks.
--
tejun
Powered by blists - more mailing lists