projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c2993b
)
efi/capsule: Fix return code on failing kmap/vmap
author
Jan Kiszka
<
[email protected]
>
Fri, 2 Jun 2017 13:51:56 +0000
(13:51 +0000)
committer
Ingo Molnar
<
[email protected]
>
Mon, 5 Jun 2017 15:50:37 +0000
(17:50 +0200)
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 <
[email protected]
>
Signed-off-by: Ard Biesheuvel <
[email protected]
>
Reviewed-by: Matt Fleming <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
drivers/firmware/efi/capsule-loader.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/efi/capsule-loader.c
b/drivers/firmware/efi/capsule-loader.c
index 9ae6c116c4746286770052fb6f241baddc08d5b0..91e91f7a880776c68f422db7298afda4e293baf2 100644
(file)
--- 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 -E
FAULT
;
+ return -E
NOMEM
;
}
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 = -E
FAULT
;
+ ret = -E
NOMEM
;
goto failed;
}
kbuff += PAGE_SIZE - cap_info->page_bytes_remain;