[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <rgk3oym7r2gkx4gjqsot3n55s4jtlgyl7vayutaneyuqegybzl@njlf3ohiykjq>
Date: Wed, 22 Oct 2025 11:04:59 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
linux-hardening@...r.kernel.org, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: Replace deprecated strcpy in
cpufreq_unregister_governor
On 17-10-25, 17:33, Thorsten Blum wrote:
> strcpy() is deprecated; assign the NUL terminator directly instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
> drivers/cpufreq/cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 852e024facc3..0d3e77cf96a7 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2550,7 +2550,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)
> for_each_inactive_policy(policy) {
> if (!strcmp(policy->last_governor, governor->name)) {
> policy->governor = NULL;
> - strcpy(policy->last_governor, "\0");
> + policy->last_governor[0] = '\0';
> }
> }
> read_unlock_irqrestore(&cpufreq_driver_lock, flags);
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists