lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210825065000.GA11343@in.ibm.com>
Date:   Wed, 25 Aug 2021 12:20:00 +0530
From:   Gautham R Shenoy <ego@...ux.vnet.ibm.com>
To:     Pingfan Liu <kernelfans@...il.com>
Cc:     linux-kernel@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Vincent Donnefort <vincent.donnefort@....com>,
        Valentin Schneider <valentin.schneider@....com>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Nicholas Piggin <npiggin@...il.com>,
        Yuan ZhaoXiong <yuanzhaoxiong@...du.com>
Subject: Re: [PATCH] kernel/cpu: fix spelling mistake of cpuhp_thread_run()

Hello Pingfan,

On Tue, Aug 24, 2021 at 03:07:07PM +0800, Pingfan Liu wrote:
> According to the name of cpuhp_should_run(), cpuhp_thread_fun() should
> be a spelling mistake.

I think cpuhp_thread_fun() is short for "CPU Hotplug thread
function". It seems correct since the function pointer "thread_fn"
(short for "Thread function") in the struct "smp_hotplug_thread
cpuhp_threads" is assigned the value cpuhp_thread_fun().


> 
> Signed-off-by: Pingfan Liu <kernelfans@...il.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Vincent Donnefort <vincent.donnefort@....com>
> Cc: Valentin Schneider <valentin.schneider@....com>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Nicholas Piggin <npiggin@...il.com>
> Cc: Yuan ZhaoXiong <yuanzhaoxiong@...du.com>
> To: linux-kernel@...r.kernel.org
> ---
>  kernel/cpu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/cpu.c b/kernel/cpu.c
> index 804b847912dc..581d08c0efb6 100644
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -521,7 +521,7 @@ static void __cpuhp_kick_ap(struct cpuhp_cpu_state *st)
>  	st->result = 0;
>  	/*
>  	 * Make sure the above stores are visible before should_run becomes
> -	 * true. Paired with the mb() above in cpuhp_thread_fun()
> +	 * true. Paired with the mb() above in cpuhp_thread_run()
>  	 */
>  	smp_mb();
>  	st->should_run = true;
> @@ -723,7 +723,7 @@ static int cpuhp_should_run(unsigned int cpu)
>   *
>   * When complete or on error, should_run is cleared and the completion is fired.
>   */
> -static void cpuhp_thread_fun(unsigned int cpu)
> +static void cpuhp_thread_run(unsigned int cpu)
>  {
>  	struct cpuhp_cpu_state *st = this_cpu_ptr(&cpuhp_state);
>  	bool bringup = st->bringup;
> @@ -863,7 +863,7 @@ static struct smp_hotplug_thread cpuhp_threads = {
>  	.store			= &cpuhp_state.thread,
>  	.create			= &cpuhp_create,
>  	.thread_should_run	= cpuhp_should_run,
> -	.thread_fn		= cpuhp_thread_fun,
> +	.thread_fn		= cpuhp_thread_run,
>  	.thread_comm		= "cpuhp/%u",
>  	.selfparking		= true,
>  };
> -- 
> 2.29.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ