diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 22:14:44 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 22:14:44 +0400 |
commit | 04bbc8e1f68cf4c1aac8024d6aea1a24757e8a5a (patch) | |
tree | 9eee2dd7cca805dc27490a624160ef6d9ddd7dd1 /drivers/acpi/apei | |
parent | e39dfe52f8f67061317e7108f62a2b33a3d06580 (diff) | |
parent | 0d838347f1325cebfe8b9341a4b4c1f407022231 (diff) | |
download | linux-04bbc8e1f68cf4c1aac8024d6aea1a24757e8a5a.tar.xz |
Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Pull pstore update from Tony Luck:
"Fixes for pstore for 3.11 merge window"
* tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
efivars: If pstore_register fails, free unneeded pstore buffer
acpi: Eliminate console msg if pstore.backend excludes ERST
pstore: Return unique error if backend registration excluded by kernel param
pstore: Fail to unlink if a driver has not defined pstore_erase
pstore/ram: remove the power of buffer size limitation
pstore/ram: avoid atomic accesses for ioremapped regions
efi, pstore: Cocci spatch "memdup.spatch"
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/erst.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c index 6d894bfd8b8f..f7b3b39e94fc 100644 --- a/drivers/acpi/apei/erst.c +++ b/drivers/acpi/apei/erst.c @@ -1180,20 +1180,28 @@ static int __init erst_init(void) if (!erst_erange.vaddr) goto err_release_erange; + pr_info(ERST_PFX + "Error Record Serialization Table (ERST) support is initialized.\n"); + buf = kmalloc(erst_erange.size, GFP_KERNEL); spin_lock_init(&erst_info.buf_lock); if (buf) { erst_info.buf = buf + sizeof(struct cper_pstore_record); erst_info.bufsize = erst_erange.size - sizeof(struct cper_pstore_record); - if (pstore_register(&erst_info)) { - pr_info(ERST_PFX "Could not register with persistent store\n"); + rc = pstore_register(&erst_info); + if (rc) { + if (rc != -EPERM) + pr_info(ERST_PFX + "Could not register with persistent store\n"); + erst_info.buf = NULL; + erst_info.bufsize = 0; kfree(buf); } - } - - pr_info(ERST_PFX - "Error Record Serialization Table (ERST) support is initialized.\n"); + } else + pr_err(ERST_PFX + "Failed to allocate %lld bytes for persistent store error log\n", + erst_erange.size); return 0; |