mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muchun Song <muchun.song@linux.dev>
To: Tejun Heo <tj@kernel.org>
Cc: Muchun Song <songmuchun@bytedance.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR
Date: Tue, 23 May 2023 10:17:04 +0800	[thread overview]
Message-ID: <6D4D62D0-FD5D-4065-8D7F-C6E220186DE6@linux.dev> (raw)
In-Reply-To: <ZGu9v3OA0wkhff7g@slm.duckdns.org>



> On May 23, 2023, at 03:08, Tejun Heo <tj@kernel.org> 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


      reply	other threads:[~2023-05-23  2:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  3:45 Muchun Song
2023-05-22 19:08 ` Tejun Heo
2023-05-23  2:17   ` Muchun Song [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6D4D62D0-FD5D-4065-8D7F-C6E220186DE6@linux.dev \
    --to=muchun.song@linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=songmuchun@bytedance.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®