mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
powerpc/fadump: re-register firmware-assisted dump if already registered
Firmware-Assisted Dump (FADump) needs to be registered again after any memory hot add/remove operation to update the crash memory ranges. But currently, the kernel returns '-EEXIST' if we try to register without uregistering it first. This could expose the system to racing issues while unregistering and registering FADump from userspace during udev events. Spare the userspace of this and let it be taken care of in the kernel space for a simpler interface. Since this change, running 'echo 1 > /sys/kernel/fadump_registered' would result in re-regisering (unregistering and registering) FADump, if it was already registered. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Acked-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
74422e2b19
commit
0823c68b05
1 changed files with 2 additions and 2 deletions
|
@ -1444,8 +1444,8 @@ static ssize_t fadump_register_store(struct kobject *kobj,
|
|||
break;
|
||||
case 1:
|
||||
if (fw_dump.dump_registered == 1) {
|
||||
ret = -EEXIST;
|
||||
goto unlock_out;
|
||||
/* Un-register Firmware-assisted dump */
|
||||
fadump_unregister_dump(&fdm);
|
||||
}
|
||||
/* Register Firmware-assisted dump */
|
||||
ret = register_fadump();
|
||||
|
|
Loading…
Reference in a new issue