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]
Message-ID: <CAJZ5v0h3E7x-0FkLG0fDv0qi-8W+GCS6gmpJtvxPWTVLTWH_KQ@mail.gmail.com>
Date:   Thu, 9 Feb 2023 20:30:45 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Viresh Kumar <viresh.kumar@...aro.org>,
        Thomas Weißschuh <linux@...ssschuh.net>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: Make kobj_type structure constant

On Wed, Feb 8, 2023 at 6:04 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 07-02-23, 19:58, Thomas Weißschuh wrote:
> > Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.")
> > the driver core allows the usage of const struct kobj_type.
> >
> > Take advantage of this to constify the structure definition to prevent
> > modification at runtime.
> >
> > Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
> > ---
> >  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 7e56a42750ea..ceb1574417f9 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -993,7 +993,7 @@ static const struct sysfs_ops sysfs_ops = {
> >       .store  = store,
> >  };
> >
> > -static struct kobj_type ktype_cpufreq = {
> > +static const struct kobj_type ktype_cpufreq = {
> >       .sysfs_ops      = &sysfs_ops,
> >       .default_groups = cpufreq_groups,
> >       .release        = cpufreq_sysfs_release,
> >
>
> Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

Applied as 6.3 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ