Linux Archive

Linux Archive (
-   Ubuntu Kernel Team (
-   -   UBUNTU: SAUCE: do not make sysdev links for processors which are not booted (

Andy Whitcroft 03-25-2009 10:33 AM

UBUNTU: SAUCE: do not make sysdev links for processors which are not booted
Bug: #295091

When booting if a CPU cannot be started we will not initialise its sysdev
object. Later when we initialise ACPI we find both CPUS in the ACPI data
and use that to build sysfs links for each. When the CPU is not booted
these links have nothing to link to and we panic while building the links.
Do not make or remove the links for CPUs which did not boot.

Signed-off-by: Andy Whitcroft <>
drivers/acpi/processor_core.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index c703eab..6705259 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -654,7 +654,8 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
goto end;

sysdev = get_cpu_sysdev(pr->id);
- if (sysfs_create_link(&device->dev.kobj, &sysdev->kobj, "sysdev"))
+ if (sysdev &&
+ sysfs_create_link(&device->dev.kobj, &sysdev->kobj, "sysdev"))
return -EFAULT;

status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
@@ -793,7 +794,8 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,

- sysfs_remove_link(&device->dev.kobj, "sysdev");
+ if (get_cpu_sysdev(pr->id))
+ sysfs_remove_link(&device->dev.kobj, "sysdev");



kernel-team mailing list

All times are GMT. The time now is 01:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.