Commit 89c5a2d3 authored by Pan Bian's avatar Pan Bian Committed by Ingo Molnar

efi/esrt: Use memunmap() instead of kfree() to free the remapping

The remapping result of memremap() should be freed with memunmap(), not kfree().
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Cc: <stable@vger.kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20171206095010.24170-3-ard.biesheuvel@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent af97a77b
...@@ -428,7 +428,7 @@ static int __init esrt_sysfs_init(void) ...@@ -428,7 +428,7 @@ static int __init esrt_sysfs_init(void)
err_remove_esrt: err_remove_esrt:
kobject_put(esrt_kobj); kobject_put(esrt_kobj);
err: err:
kfree(esrt); memunmap(esrt);
esrt = NULL; esrt = NULL;
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment