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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 5 Dec 2013 11:33:53 +0100
From:	Hans-Christian Egtvedt <egtvedt@...fundet.no>
To:	Matthias Brugger <matthias.bgg@...il.com>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, hskinnemoen@...il.com,
	heiko@...ech.de
Subject: Re: [PATCH] cpufreq_ at32ap-cpufreq.c: Fix section mismatch

Around Thu 05 Dec 2013 10:59:57 +0100 or thereabout, Matthias Brugger wrote:
> The function at32_cpufreq_driver_init was marked as __init but will be
> called from inside the cpufreq framework. This lead to the following a
> section mismatch during compilation:
> 
> WARNING: drivers/built-in.o(.data+0x2448): Section mismatch in reference
> from the variable at32_driver to the function
> .init.text:at32_cpufreq_driver_init()
> The variable at32_driver references
> the function __init at32_cpufreq_driver_init()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the
> variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

You're right, it is added in struct cpufreq_driver, and AFAICT the cpufreq
core might call init every now and then.

Added to my for-linus branch.

> Signed-off-by: Matthias Brugger <matthias.bgg@...il.com>

Acked-by: Hans-Christian Egtvedt <egtvedt@...fundet.no>

> ---
>  drivers/cpufreq/at32ap-cpufreq.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c
> index e0c38d9..372c426 100644
> --- a/drivers/cpufreq/at32ap-cpufreq.c
> +++ b/drivers/cpufreq/at32ap-cpufreq.c
> @@ -83,7 +83,7 @@ static int at32_set_target(struct cpufreq_policy *policy,
>  	return 0;
>  }
>  
> -static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy)
> +static int at32_cpufreq_driver_init(struct cpufreq_policy *policy)
>  {
>  	if (policy->cpu != 0)
>  		return -EINVAL;
-- 
mvh
Hans-Christian Egtvedt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ