linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Logan Gunthorpe <logang@deltatee.com>, Song Liu <song@kernel.org>,
	Yu Kuai <yukuai1@huaweicloud.com>
Cc: linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	yi.zhang@huawei.com, yangerkun@huawei.com,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH -next v5 1/6] md: pass a md_thread pointer to md_register_thread()
Date: Wed, 12 Apr 2023 17:23:40 +0800	[thread overview]
Message-ID: <04a9522e-f0bb-5452-2ff4-4bb8017eb26b@huaweicloud.com> (raw)
In-Reply-To: <f67e8d9b-dae8-fced-ce7b-b0f8fff2d127@deltatee.com>

Hi,

在 2023/04/11 23:46, Logan Gunthorpe 写道:

>>>> Can we do something like:
>>>>
>>>> struct md_thread __rcu *md_register_thread(void (*run) (struct md_thread *),
>>>>                  struct mddev *mddev, const char *name)
>>>
>>> I think this is not necessary, if we don't want to change api, we must
>>> use rcu_assign_pointer for each caller to set md_thread.
>>
>> I think it is better to use rcu_assign_pointer at the caller side.
> 
> I agree.
> 
> Logan
> .
> 
I'll remove this patch, and use rcu_assign_pointer() in the caller
directly in the next version.

Thanks,
Kuai


  reply	other threads:[~2023-04-12  9:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 11:35 [PATCH -next v5 0/6] md: fix uaf for sync_thread Yu Kuai
2023-04-10 11:35 ` [PATCH -next v5 1/6] md: pass a md_thread pointer to md_register_thread() Yu Kuai
2023-04-11  1:15   ` Song Liu
2023-04-11  1:34     ` Yu Kuai
2023-04-11  5:26       ` Song Liu
2023-04-11 15:46         ` Logan Gunthorpe
2023-04-12  9:23           ` Yu Kuai [this message]
2023-04-10 11:35 ` [PATCH -next v5 2/6] md: factor out a helper to wake up md_thread directly Yu Kuai
2023-04-10 11:35 ` [PATCH -next v5 3/6] dm-raid: remove useless checking in raid_message() Yu Kuai
2023-04-10 11:35 ` [PATCH -next v5 4/6] md/bitmap: always wake up md_thread in timeout_store Yu Kuai
2023-04-10 11:35 ` [PATCH -next v5 5/6] md/bitmap: factor out a helper to set timeout Yu Kuai
2023-04-10 11:35 ` [PATCH -next v5 6/6] md: protect md_thread with rcu Yu Kuai
2023-04-10 15:42   ` Logan Gunthorpe
2023-04-11  1:08     ` Yu Kuai

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=04a9522e-f0bb-5452-2ff4-4bb8017eb26b@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=song@kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).