• Michal Hocko's avatar
    ACPI / scan: Drop support for force_remove · ffc10d82
    Michal Hocko authored
    /sys/firmware/acpi/hotplug/force_remove was presumably added to support
    auto offlining in the past. This is, however, inherently dangerous for
    some hotplugable resources like memory. The memory offlining fails when
    the memory is still in use and cannot be dropped or migrated. If we
    ignore the failure we are basically allowing for subtle memory
    corruption or a crash.
    
    We have actually noticed the later while hitting BUG() during the memory
    hotremove (remove_memory):
    	ret = walk_memory_range(PFN_DOWN(start), PFN_UP(start + size - 1), NULL,
    			check_memblock_offlined_cb);
    	if (ret)
    		BUG();
    
    it took us quite non-trivial time realize that the customer had
    force_remove enabled. Even if the BUG was removed here and we could
    propagate the error up the call chain it wouldn't help at all because
    then we would hit a crash or a memory corruption later and harder to
    debug. So force_remove is unfixable for the memory hotremove. We haven't
    checked other hotplugable resources t...
    ffc10d82
sysfs-firmware-acpi 384 Bytes