lkml.org 
[lkml]   [2023]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-05-22 21:09    [W:0.059 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site