Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1657972
| From | tip-bot for Fabian Frederick <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:efi/core] efi/capsule: Remove NULL test on kmap() |
| Date | 2017-06-05 19:20 +0200 |
| Message-ID | <tP3PB-5Lk-25@gated-at.bofh.it> (permalink) |
| References | <tNVhp-1Vg-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 171fd0222957abe28e6d78de667f457376f45cf1
Gitweb: http://git.kernel.org/tip/171fd0222957abe28e6d78de667f457376f45cf1
Author: Fabian Frederick <fabf@skynet.be>
AuthorDate: Fri, 2 Jun 2017 13:52:01 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 5 Jun 2017 17:50:40 +0200
efi/capsule: Remove NULL test on kmap()
kmap() can't fail.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Kweh Hock Leong <hock.leong.kweh@intel.com>
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-8-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/firmware/efi/capsule-loader.c | 4 ----
drivers/firmware/efi/capsule.c | 4 ----
2 files changed, 8 deletions(-)
diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
index 5b012a4..2357bcd 100644
--- a/drivers/firmware/efi/capsule-loader.c
+++ b/drivers/firmware/efi/capsule-loader.c
@@ -170,10 +170,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,
page = cap_info->pages[cap_info->index - 1];
kbuff = kmap(page);
- if (!kbuff) {
- ret = -ENOMEM;
- goto failed;
- }
kbuff += PAGE_SIZE - cap_info->page_bytes_remain;
/* Copy capsule binary data from user space to kernel space buffer */
diff --git a/drivers/firmware/efi/capsule.c b/drivers/firmware/efi/capsule.c
index 6eedff4..e603ccf 100644
--- a/drivers/firmware/efi/capsule.c
+++ b/drivers/firmware/efi/capsule.c
@@ -247,10 +247,6 @@ int efi_capsule_update(efi_capsule_header_t *capsule, struct page **pages)
efi_capsule_block_desc_t *sglist;
sglist = kmap(sg_pages[i]);
- if (!sglist) {
- rv = -ENOMEM;
- goto out;
- }
for (j = 0; j < SGLIST_PER_PAGE && count > 0; j++) {
u64 sz = min_t(u64, imagesize, PAGE_SIZE);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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