From: Lukasz Majewski <l.majewski@samsung.com>
To: Konrad Rzeszutek Wilk <konrad@kernel.org>
Cc: linux-kernel@vger.kernel.org, rafael.j.wysocki@intel.com,
cpufreq@vger.kernel.org, linux-pm@vger.kernel.org,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Myungjoo Ham <myungjoo.ham@samsung.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error.
Date: Tue, 28 Jan 2014 10:41:52 +0100 [thread overview]
Message-ID: <20140128104152.502ef069@amdc2363> (raw)
In-Reply-To: <1390881491-18998-1-git-send-email-konrad.wilk@oracle.com>
Hi Konrad,
> If cpufreq_register_driver() fails we would free the acpi driver
> related structures but not free the ones allocated
> by acpi_cpufreq_boost_init() function. This meant that as
> the driver error-ed out and a CPU online/offline event came
> we would crash and burn as one of the CPU notifiers would point
> to garbage.
>
Thanks for spotting this bug. My bad.
> This fixes a regression that commit
> cfc9c8ed03e4d908f2388af8815f44c87b503aaf "acpi-cpufreq: Adjust the
> code to use the common boost attribute" introduced.
>
> CC: Lukasz Majewski <l.majewski@samsung.com>
> CC: Myungjoo Ham <myungjoo.ham@samsung.com>
> CC: Viresh Kumar <viresh.kumar@linaro.org>
> CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> drivers/cpufreq/acpi-cpufreq.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/acpi-cpufreq.c
> b/drivers/cpufreq/acpi-cpufreq.c index 79e5608..3e856d6 100644
> --- a/drivers/cpufreq/acpi-cpufreq.c
> +++ b/drivers/cpufreq/acpi-cpufreq.c
> @@ -969,9 +969,10 @@ static int __init acpi_cpufreq_init(void)
> acpi_cpufreq_boost_init();
>
> ret = cpufreq_register_driver(&acpi_cpufreq_driver);
> - if (ret)
> + if (ret) {
> free_acpi_perf_data();
> -
> + acpi_cpufreq_boost_exit();
> + }
> return ret;
> }
>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
next prev parent reply other threads:[~2014-01-28 9:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 3:58 [PATCH] acpi-cpufreq: De-register cpu notifier and free struct msr on error Konrad Rzeszutek Wilk
2014-01-28 9:41 ` Lukasz Majewski [this message]
2014-02-03 6:22 ` Viresh Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140128104152.502ef069@amdc2363 \
--to=l.majewski@samsung.com \
--cc=boris.ostrovsky@oracle.com \
--cc=cpufreq@vger.kernel.org \
--cc=konrad.wilk@oracle.com \
--cc=konrad@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rafael.j.wysocki@intel.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.