efi/esrt: Use memunmap() instead of kfree() to free the remapping
authorPan Bian <bianpan2016@163.com>
Wed, 6 Dec 2017 09:50:09 +0000 (09:50 +0000)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Dec 2017 18:32:08 +0000 (19:32 +0100)
The remapping result of memremap() should be freed with memunmap(), not kfree().

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Ard 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.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/esrt.c

index 7aae2483fcb947d00762e7ebab69e9042d08ad38..c47e0c6ec00f858c0b9960f605974b4f2e4b1294 100644 (file)
@@ -428,7 +428,7 @@ err_remove_group:
 err_remove_esrt:
        kobject_put(esrt_kobj);
 err:
-       kfree(esrt);
+       memunmap(esrt);
        esrt = NULL;
        return error;
 }