diff options
author | Kees Cook <keescook@chromium.org> | 2017-03-03 12:11:40 -0800 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-03-07 08:21:38 -0800 |
commit | 0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75 (patch) | |
tree | 7b0b2975a3640de807561f1091476a6c08cd90ee /fs/pstore/platform.c | |
parent | 1344dd86f35c7669c94aceb2273676e356cff848 (diff) | |
download | op-kernel-dev-0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75.zip op-kernel-dev-0d7cd09a3dbbdb3d4932cddbef613b2a6de28b75.tar.gz |
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/platform.c')
-rw-r--r-- | fs/pstore/platform.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index d69ef8a..320a673 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; } |