linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/fadump: return 0 on re-registration
@ 2017-06-26 14:06 Michal Suchanek
  2017-06-26 14:06 ` [PATCH 2/2] powerpc/fadump: use kstrtoint to handle sysfs store Michal Suchanek
  2017-06-27  9:30 ` [PATCH 1/2] powerpc/fadump: return 0 on re-registration Michal Suchánek
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Suchanek @ 2017-06-26 14:06 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Hari Bathini, Mahesh Salgaonkar, Andrew Morton, Michal Suchanek,
	Colin Ian King, linuxppc-dev, linux-kernel

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@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-14 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 14:06 [PATCH 1/2] powerpc/fadump: return 0 on re-registration Michal Suchanek
2017-06-26 14:06 ` [PATCH 2/2] powerpc/fadump: use kstrtoint to handle sysfs store Michal Suchanek
2017-11-12 17:30   ` Hari Bathini
2017-11-14 11:11   ` [2/2] " Michael Ellerman
2017-06-27  9:30 ` [PATCH 1/2] powerpc/fadump: return 0 on re-registration Michal Suchánek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).