[3.16.y-ckt stable] Patch "efi: Small leak on error in runtime map code" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Mar 2 13:38:20 UTC 2015
This is a note to let you know that I have just added a patch titled
efi: Small leak on error in runtime map code
to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue
This patch is scheduled to be released in version 3.16.7-ckt8.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 46485553d8a2d0025ccda165d63cb91d54a5a0e7 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter at oracle.com>
Date: Thu, 15 Jan 2015 12:21:21 +0300
Subject: efi: Small leak on error in runtime map code
commit 86d68a58d00db3770735b5919ef2c6b12d7f06f3 upstream.
The "> 0" here should ">= 0" so we free map_entries[0].
Fixes: 926172d46038 ('efi: Export EFI runtime memory mapping to sysfs')
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
Acked-by: Dave Young <dyoung at redhat.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/firmware/efi/runtime-map.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c
index 97cdd16a2169..c98b101a73ae 100644
--- a/drivers/firmware/efi/runtime-map.c
+++ b/drivers/firmware/efi/runtime-map.c
@@ -170,7 +170,7 @@ int __init efi_runtime_map_init(struct kobject *efi_kobj)
return 0;
out_add_entry:
- for (j = i - 1; j > 0; j--) {
+ for (j = i - 1; j >= 0; j--) {
entry = *(map_entries + j);
kobject_put(&entry->kobj);
}
More information about the kernel-team
mailing list