Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1608820
| From | Ard Biesheuvel <ard.biesheuvel@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/7] efi/capsule: Fix return code on failing kmap/vmap |
| Date | 2017-03-24 19:20 +0100 |
| Message-ID | <toBYF-5oX-77@gated-at.bofh.it> (permalink) |
| References | <toBlT-4TS-1@gated-at.bofh.it> <toBlU-4TS-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 24 March 2017 at 17:34, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> If kmap or vmap fail, it means we ran out of memory. There are no
> user-provided addressed involved that would justify EFAULT.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> drivers/firmware/efi/capsule-loader.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/firmware/efi/capsule-loader.c b/drivers/firmware/efi/capsule-loader.c
> index 9ae6c11..91e91f7 100644
> --- a/drivers/firmware/efi/capsule-loader.c
> +++ b/drivers/firmware/efi/capsule-loader.c
> @@ -113,7 +113,7 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info)
> VM_MAP, PAGE_KERNEL);
> if (!cap_hdr_temp) {
> pr_debug("%s: vmap() failed\n", __func__);
> - return -EFAULT;
> + return -ENOMEM;
> }
>
> ret = efi_capsule_update(cap_hdr_temp, cap_info->pages);
> @@ -185,7 +185,7 @@ 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 = -EFAULT;
> + ret = -ENOMEM;
> goto failed;
> }
> kbuff += PAGE_SIZE - cap_info->page_bytes_remain;
> --
> 2.10.2
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/7] efi: Enhance capsule loader to support signed Quark images Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
[PATCH v2 4/7] efi/capsule: Adjust return type of efi_capsule_setup_info Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 4/7] efi/capsule: Adjust return type of efi_capsule_setup_info Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 19:50 +0100
[PATCH v2 6/7] efi/capsule: Factor out overloadable efi_capsule_identify_image Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
[PATCH v2 5/7] efi/capsule: Prepare for loading images with security header Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 5/7] efi/capsule: Prepare for loading images with security header Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-24 21:30 +0100
[PATCH v2 3/7] efi/capsule: Clean up pr_err/info messages Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 3/7] efi/capsule: Clean up pr_err/info messages Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 19:20 +0100
[PATCH v2 2/7] efi/capsule: Remove pr_debug on ENOMEM or EFAULT Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 2/7] efi/capsule: Remove pr_debug on ENOMEM or EFAULT Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 19:20 +0100
[PATCH v2 1/7] efi/capsule: Fix return code on failing kmap/vmap Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 1/7] efi/capsule: Fix return code on failing kmap/vmap Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-03-24 19:20 +0100
[PATCH v2 7/7] efi/capsule: Add support for Quark security header Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-24 18:40 +0100
Re: [PATCH v2 7/7] efi/capsule: Add support for Quark security header Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-24 21:40 +0100
Re: [PATCH v2 0/7] efi: Enhance capsule loader to support signed Quark images Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-03-24 21:50 +0100
Re: [PATCH v2 0/7] efi: Enhance capsule loader to support signed Quark images Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-27 13:30 +0200
Re: [PATCH v2 0/7] efi: Enhance capsule loader to support signed Quark images Bryan O'Donoghue <pure.logic@nexus-software.ie> - 2017-03-27 12:50 +0200
Re: [PATCH v2 0/7] efi: Enhance capsule loader to support signed Quark images Jan Kiszka <jan.kiszka@siemens.com> - 2017-03-27 13:10 +0200
csiph-web