summaryrefslogtreecommitdiff
path: root/fs/pstore
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-03-03 23:11:40 +0300
committerKees Cook <keescook@chromium.org>2017-03-07 19:21:38 +0300
commit0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75 (patch)
tree7b0b2975a3640de807561f1091476a6c08cd90ee /fs/pstore
parent1344dd86f35c7669c94aceb2273676e356cff848 (diff)
downloadlinux-0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75.tar.xz
pstore: Improve register_pstore() error reporting
Uncommon errors are better to get reported to dmesg so developers can more easily figure out why pstore is unhappy with a backend attempting to register. Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/pstore')
-rw-r--r--fs/pstore/platform.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index d69ef8a840b9..320a673ecb5b 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -673,11 +673,15 @@ int pstore_register(struct pstore_info *psi)
{
struct module *owner = psi->owner;
- if (backend && strcmp(backend, psi->name))
+ if (backend && strcmp(backend, psi->name)) {
+ pr_warn("ignoring unexpected backend '%s'\n", psi->name);
return -EPERM;
+ }
spin_lock(&pstore_lock);
if (psinfo) {
+ pr_warn("backend '%s' already loaded: ignoring '%s'\n",
+ psinfo->name, psi->name);
spin_unlock(&pstore_lock);
return -EBUSY;
}