Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657961

[tip:efi/core] efi/capsule: Remove pr_debug() on ENOMEM or EFAULT

From tip-bot for Jan Kiszka <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:efi/core] efi/capsule: Remove pr_debug() on ENOMEM or EFAULT
Date 2017-06-05 19:20 +0200
Message-ID <tP3PA-5Lk-9@gated-at.bofh.it> (permalink)
References <tNVhp-1Vg-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Commit-ID:  7367633f0bfd783ae5838141f3af88bba6c45eb9
Gitweb:     http://git.kernel.org/tip/7367633f0bfd783ae5838141f3af88bba6c45eb9
Author:     Jan Kiszka <jan.kiszka@siemens.com>
AuthorDate: Fri, 2 Jun 2017 13:51:57 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 5 Jun 2017 17:50:38 +0200

efi/capsule: Remove pr_debug() on ENOMEM or EFAULT

Both cases are not worth a debug log message - the error code is telling
enough.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170602135207.21708-4-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 drivers/firmware/efi/capsule-loader.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
index 91e91f7..7b57dda 100644
--- a/drivers/firmware/efi/capsule-loader.c
+++ b/drivers/firmware/efi/capsule-loader.c
@@ -88,10 +88,8 @@ static ssize_t efi_capsule_setup_info(struct capsule_info *cap_info,
 	temp_page = krealloc(cap_info->pages,
 			     pages_needed * sizeof(void *),
 			     GFP_KERNEL | __GFP_ZERO);
-	if (!temp_page) {
-		pr_debug("%s: krealloc() failed\n", __func__);
+	if (!temp_page)
 		return -ENOMEM;
-	}
 
 	cap_info->pages = temp_page;
 	cap_info->header_obtained = true;
@@ -111,10 +109,8 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info)
 
 	cap_hdr_temp = vmap(cap_info->pages, cap_info->index,
 			VM_MAP, PAGE_KERNEL);
-	if (!cap_hdr_temp) {
-		pr_debug("%s: vmap() failed\n", __func__);
+	if (!cap_hdr_temp)
 		return -ENOMEM;
-	}
 
 	ret = efi_capsule_update(cap_hdr_temp, cap_info->pages);
 	vunmap(cap_hdr_temp);
@@ -171,7 +167,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,
 	if (!cap_info->page_bytes_remain) {
 		page = alloc_page(GFP_KERNEL);
 		if (!page) {
-			pr_debug("%s: alloc_page() failed\n", __func__);
 			ret = -ENOMEM;
 			goto failed;
 		}
@@ -184,7 +179,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,
 
 	kbuff = kmap(page);
 	if (!kbuff) {
-		pr_debug("%s: kmap() failed\n", __func__);
 		ret = -ENOMEM;
 		goto failed;
 	}
@@ -193,7 +187,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,
 	/* Copy capsule binary data from user space to kernel space buffer */
 	write_byte = min_t(size_t, count, cap_info->page_bytes_remain);
 	if (copy_from_user(kbuff, buff, write_byte)) {
-		pr_debug("%s: copy_from_user() failed\n", __func__);
 		ret = -EFAULT;
 		goto fail_unmap;
 	}

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/13] First batch of EFI updates for v4.13 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
  [PATCH 07/13] efi/capsule: Remove NULL test on kmap() Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule: Remove NULL test on kmap() tip-bot for Fabian Frederick <tipbot@zytor.com> - 2017-06-05 19:20 +0200
  [PATCH 13/13] efi: arm: enable DMI/SMBIOS Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/arm: Enable DMI/SMBIOS tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2017-06-05 19:30 +0200
  [PATCH 03/13] efi/capsule: Remove pr_debug on ENOMEM or EFAULT Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule: Remove pr_debug() on ENOMEM or EFAULT tip-bot for Jan Kiszka <tipbot@zytor.com> - 2017-06-05 19:20 +0200
  [PATCH 02/13] efi/capsule: Fix return code on failing kmap/vmap Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule: Fix return code on failing kmap/vmap tip-bot for Jan Kiszka <tipbot@zytor.com> - 2017-06-05 19:20 +0200
  [PATCH 10/13] efi/capsule: Add support for Quark security header Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    Re: [PATCH 10/13] efi/capsule: Add support for Quark security header Ingo Molnar <mingo@kernel.org> - 2017-06-05 18:00 +0200
      Re: [PATCH 10/13] efi/capsule: Add support for Quark security header Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-05 18:10 +0200
        Re: [PATCH 10/13] efi/capsule: Add support for Quark security header Ingo Molnar <mingo@kernel.org> - 2017-06-05 18:20 +0200
    [tip:efi/core] efi/capsule: Add support for Quark security header tip-bot for Jan Kiszka <tipbot@zytor.com> - 2017-06-05 19:30 +0200
  [PATCH 01/13] x86/efi: Clean up efi CR3 save/restore Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    Re: [PATCH 01/13] x86/efi: Clean up efi CR3 save/restore Ingo Molnar <mingo@kernel.org> - 2017-06-05 17:50 +0200
      Re: [PATCH 01/13] x86/efi: Clean up efi CR3 save/restore Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-05 18:10 +0200
        Re: [PATCH 01/13] x86/efi: Clean up efi CR3 save/restore Andy Lutomirski <luto@kernel.org> - 2017-06-05 18:20 +0200
  [PATCH 04/13] efi/capsule: Clean up pr_err/info messages Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule: Clean up pr_err/_info() messages tip-bot for Jan Kiszka <tipbot@zytor.com> - 2017-06-05 19:20 +0200
  [PATCH 12/13] x86/efi: Add EFI_PGT_DUMP support for x86_32 and kexec Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] x86/efi: Extend CONFIG_EFI_PGT_DUMP support to  x86_32 and kexec as well tip-bot for Sai Praneeth <tipbot@zytor.com> - 2017-06-05 19:30 +0200
  [PATCH 05/13] efi/capsule: Adjust return type of efi_capsule_setup_info Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule: Adjust return type of  efi_capsule_setup_info() tip-bot for Jan Kiszka <tipbot@zytor.com> - 2017-06-05 19:20 +0200
  [PATCH 09/13] efi/capsule-loader: Use page addresses rather than struct page pointers Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-02 16:00 +0200
    [tip:efi/core] efi/capsule-loader: Use page addresses rather than  struct page pointers tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2017-06-05 19:30 +0200
  Re: [GIT PULL 00/13] First batch of EFI updates for v4.13 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-05 10:20 +0200
    Re: [GIT PULL 00/13] First batch of EFI updates for v4.13 Ingo Molnar <mingo@kernel.org> - 2017-06-05 11:10 +0200
      Re: [GIT PULL 00/13] First batch of EFI updates for v4.13 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-06-05 11:40 +0200
        Re: [GIT PULL 00/13] First batch of EFI updates for v4.13 Ingo Molnar <mingo@kernel.org> - 2017-06-05 18:00 +0200

csiph-web