From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Subject: Re: [PATCH] ACPI: processor: Avoid NULL pointer dereferences at init time
Date: Wed, 16 Oct 2019 09:08:08 +0530 [thread overview]
Message-ID: <20191016033808.uqgc4ss6xcg4ta5v@vireshk-i7> (raw)
In-Reply-To: <9765491.cFa8AugBjT@kreacher>
On 15-10-19, 19:35, Rafael J. Wysocki wrote:
> rom: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> If there are neither processor objects nor processor device objects
> in the ACPI tables, the per-CPU processors table will not be
> initialized and attempting to dereference pointers from there will
> cause the kernel to crash. This happens in acpi_processor_ppc_init()
> and acpi_thermal_cpufreq_init() after commit d15ce412737a ("ACPI:
> cpufreq: Switch to QoS requests instead of cpufreq notifier")
> which didn't add the requisite NULL pointer checks in there.
>
> Add the NULL pointer checks to acpi_processor_ppc_init() and
> acpi_thermal_cpufreq_init(), and to the corresponding "exit"
> routines.
>
> While at it, drop redundant return instructions from
> acpi_processor_ppc_init() and acpi_thermal_cpufreq_init().
>
> Fixes: d15ce412737a ("ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier")
> Reported-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/acpi/processor_perflib.c | 10 ++++++----
> drivers/acpi/processor_thermal.c | 10 ++++++----
> 2 files changed, 12 insertions(+), 8 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
prev parent reply other threads:[~2019-10-16 3:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 17:35 [PATCH] ACPI: processor: Avoid NULL pointer dereferences at init time Rafael J. Wysocki
2019-10-16 3:38 ` Viresh Kumar [this message]
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=20191016033808.uqgc4ss6xcg4ta5v@vireshk-i7 \
--to=viresh.kumar@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).