mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data
@ 2016-12-16 18:35 Boris Ostrovsky
  2016-12-16 21:52 ` Prakash, Prashanth
  0 siblings, 1 reply; 3+ messages in thread
From: Boris Ostrovsky @ 2016-12-16 18:35 UTC (permalink / raw)
  To: rjw, lenb; +Cc: linux-acpi, linux-kernel, Boris Ostrovsky

If acpi_cppc_processor_probe() had not executed successfully (for
example, if _CPC object was not found) then cpc_desc_ptr for that
processor will be invalid.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 drivers/acpi/cppc_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c
index d0d0504..5bba26e 100644
--- a/drivers/acpi/cppc_acpi.c
+++ b/drivers/acpi/cppc_acpi.c
@@ -824,6 +824,8 @@ void acpi_cppc_processor_exit(struct acpi_processor *pr)
 	void __iomem *addr;
 
 	cpc_ptr = per_cpu(cpc_desc_ptr, pr->id);
+	if (!cpc_ptr)
+		return;
 
 	/* Free all the mapped sys mem areas for this CPU */
 	for (i = 2; i < cpc_ptr->num_entries; i++) {
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-16 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 18:35 [PATCH] ACPI/CPC: Don't try to clean up uninitialized CPC data Boris Ostrovsky
2016-12-16 21:52 ` Prakash, Prashanth
2016-12-16 22:02   ` Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®