Thread (164 messages) 164 messages, 2 authors, 2015-03-16
STALE4136d REVIEWED: 1 (0M)

[PATCH 3.19 154/177] efi: Small leak on error in runtime map code

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2015-03-16 15:26:13
Also in: lkml

3.19-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dan Carpenter <redacted>

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 <redacted>
Acked-by: Dave Young <redacted>
Signed-off-by: Matt Fleming <redacted>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/firmware/efi/runtime-map.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/firmware/efi/runtime-map.c
+++ b/drivers/firmware/efi/runtime-map.c
@@ -191,7 +191,7 @@ int __init efi_runtime_map_init(struct k
 
 	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);
 	}

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help