• Mahesh Salgaonkar's avatar
    powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. · e7226c67
    Mahesh Salgaonkar authored
    [ Upstream commit 0db6896f ]
    
    For fadump to work successfully there should not be any holes in reserved
    memory ranges where kernel has asked firmware to move the content of old
    kernel memory in event of crash. Now that fadump uses CMA for reserved
    area, this memory area is now not protected from hot-remove operations
    unless it is cma allocated. Hence, fadump service can fail to re-register
    after the hot-remove operation, if hot-removed memory belongs to fadump
    reserved region. To avoid this make sure that memory from fadump reserved
    area is not hot-removable if fadump is registered.
    
    However, if user still wants to remove that memory, he can do so by
    manually stopping fadump service before hot-remove operation.
    Signed-off-by: default avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    e7226c67
fadump.c 42.1 KB