Re: [PATCH] kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR
From: Muchun Song
Date: Mon May 22 2023 - 22:18:11 EST
> On May 23, 2023, at 03:08, Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> 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.
OK. I'll send v2.
Thanks.
>
> Thanks.
>
> --
> tejun