Re: [PATCH 1/4] acpi,memory-hotplug : add memory offline code to acpi_memory_device_remove()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 10/20/2012 02:19 AM, KOSAKI Motohiro Wrote:
>> Hmm, IIRC, if the memory is recognized from kerenl before driver initialization,
>> the memory device is not managed by the driver acpi_memhotplug.
> 
> Yup.
> 
> 
>> I think we should also deal with REMOVAL_NORMAL here now. Otherwise it will cause
>> some critical problem: we unbind the device from the driver but we still use
>> it. If we eject it, we have no chance to offline and remove it. It is very dangerous.
> 
> ??
> If resource was not allocated a driver, a driver doesn't need to
> deallocate it when
> error path. I haven't caught your point.
> 

REMOVAL_NORMAL can be in 2 cases:
1. error path. If init call fails, we don't call it. We call this function
   only when something fails after init.

2. unbind the device from the driver.
   If we don't offline and remove memory when unbinding the device from the driver,
   the device may be out of control. When we eject this driver, we don't offline and
   remove it, but we will eject and poweroff the device. It is very dangerous because
   the kernel uses the memory but we poweroff it.

   acpi_bus_hot_remove_device()
       acpi_bus_trim() // this function successes because the device has no driver
       _PS3 // poweroff
       _EJ0 // eject

Thanks
Wen Congyang
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux