FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

LinkBack Thread Tools
Old 03-25-2009, 10:33 AM
Andy Whitcroft
Default 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 <apw@canonical.com>
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

Thread Tools

All times are GMT. The time now is 09:19 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org