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] [day] [month] [year] [list]
Message-ID: <CAK44p219E_AHQZ_4MRB=+hMpcT78cAdzvVdLg7Y3jEfW3Gyhfw@mail.gmail.com>
Date:	Thu, 27 Sep 2012 10:54:40 +0530
From:	Amit Kachhap <amit.kachhap@...aro.org>
To:	Jonghwa Lee <jonghwa3.lee@...sung.com>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Len Brown <len.brown@...el.com>,
	Durgadoss R <durgadoss.r@...el.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, Zhang Rui <rui.zhang@...el.com>
Subject: Re: [PATCH] Thermal: Fix bug on cpu_cooling, cooling device's id
 conflict problem.

On 26 September 2012 06:13, Jonghwa Lee <jonghwa3.lee@...sung.com> wrote:
> This patch fixes small bug on cpu_cooling. CPU cooling device has own
> id generated with idr mathod. However in the previous version, it swapped
> to all same id at last stage of probing as 0. This makes id's collision and
> also occures error when it releases that id.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
> ---
>  drivers/thermal/cpu_cooling.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index 99a5d75..9050c1b 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -351,7 +351,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
>         struct cpufreq_cooling_device *cpufreq_dev = NULL;
>         unsigned int cpufreq_dev_count = 0, min = 0, max = 0;
>         char dev_name[THERMAL_NAME_LENGTH];
> -       int ret = 0, id = 0, i;
> +       int ret = 0, i;
>         struct cpufreq_policy policy;
>
>         list_for_each_entry(cpufreq_dev, &cooling_cpufreq_list, node)
> @@ -396,7 +396,6 @@ struct thermal_cooling_device *cpufreq_cooling_register(
>                 kfree(cpufreq_dev);
>                 return ERR_PTR(-EINVAL);
>         }
> -       cpufreq_dev->id = id;

This change looks fine. May be some last minute typo caused this bug.

Thanks,
Amit Daniel
>         cpufreq_dev->cool_dev = cool_dev;
>         cpufreq_dev->cpufreq_state = 0;
>         mutex_lock(&cooling_cpufreq_lock);
> --
> 1.7.4.1
>
--
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