diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-05-06 02:29:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-06 02:30:24 -0400 |
commit | c102cb097d9371c2c60049d041ab1f8bdca5ccc2 (patch) | |
tree | c65201412507121fc7d53cb49590b0b8cde1a3a3 /drivers/firmware | |
parent | de71ad2c97862eae1516aa36528cc3b317c17b2f (diff) | |
parent | d67e199611b986b345ea3087ee2e4a15da1c98b3 (diff) |
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into x86/urgent
Pull EFI fixes from Matt Fleming:
* Avoid garbage names in efivarfs due to buggy firmware by zeroing
EFI variable name. (Ross Lagerwall)
* Stop erroneously dropping upper 32 bits of boot command line pointer
in EFI boot stub and stash them in ext_cmd_line_ptr. (Roy Franz)
* Fix double-free bug in error handling code path of EFI runtime map
code. (Dan Carpenter)
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/efi/runtime-map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c index 87b8e3b900d2..5c55227a34c8 100644 --- a/drivers/firmware/efi/runtime-map.c +++ b/drivers/firmware/efi/runtime-map.c | |||
@@ -120,7 +120,8 @@ add_sysfs_runtime_map_entry(struct kobject *kobj, int nr) | |||
120 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); | 120 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); |
121 | if (!entry) { | 121 | if (!entry) { |
122 | kset_unregister(map_kset); | 122 | kset_unregister(map_kset); |
123 | return entry; | 123 | map_kset = NULL; |
124 | return ERR_PTR(-ENOMEM); | ||
124 | } | 125 | } |
125 | 126 | ||
126 | memcpy(&entry->md, efi_runtime_map + nr * efi_memdesc_size, | 127 | memcpy(&entry->md, efi_runtime_map + nr * efi_memdesc_size, |
@@ -132,6 +133,7 @@ add_sysfs_runtime_map_entry(struct kobject *kobj, int nr) | |||
132 | if (ret) { | 133 | if (ret) { |
133 | kobject_put(&entry->kobj); | 134 | kobject_put(&entry->kobj); |
134 | kset_unregister(map_kset); | 135 | kset_unregister(map_kset); |
136 | map_kset = NULL; | ||
135 | return ERR_PTR(ret); | 137 | return ERR_PTR(ret); |
136 | } | 138 | } |
137 | 139 | ||
@@ -195,8 +197,6 @@ out_add_entry: | |||
195 | entry = *(map_entries + j); | 197 | entry = *(map_entries + j); |
196 | kobject_put(&entry->kobj); | 198 | kobject_put(&entry->kobj); |
197 | } | 199 | } |
198 | if (map_kset) | ||
199 | kset_unregister(map_kset); | ||
200 | out: | 200 | out: |
201 | return ret; | 201 | return ret; |
202 | } | 202 | } |