[PATCH 1/2] powerpc/fadump: return 0 on re-registration
Michal Suchanek
msuchanek at suse.de
Tue Jun 27 00:06:00 AEST 2017
When fadump is already registered return success.
Currently EEXIST is returned which is difficult to handle race-free in
userspace when shell scripts are used. If multiple writers are trying to
write '1' there is no difference in whichever succeeds so just return 0
to all.
Signed-off-by: Michal Suchanek <msuchanek at suse.de>
---
arch/powerpc/kernel/fadump.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index 436aedf195ab..5a7355381dac 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1214,7 +1214,6 @@ static ssize_t fadump_register_store(struct kobject *kobj,
break;
case '1':
if (fw_dump.dump_registered == 1) {
- ret = -EEXIST;
goto unlock_out;
}
/* Register Firmware-assisted dump */
--
2.10.2
More information about the Linuxppc-dev
mailing list