From: Michal Suchanek <msuchanek@suse.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Michal Suchanek <msuchanek@suse.de>,
Colin Ian King <colin.king@canonical.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] powerpc/fadump: return 0 on re-registration
Date: Mon, 26 Jun 2017 16:06:00 +0200 [thread overview]
Message-ID: <20170626140601.7106-1-msuchanek@suse.de> (raw)
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
next reply other threads:[~2017-06-26 14:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 14:06 Michal Suchanek [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170626140601.7106-1-msuchanek@suse.de \
--to=msuchanek@suse.de \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=colin.king@canonical.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).