efi/esrt: Use memunmap() instead of kfree() to free the remapping
authorPan Bian <[email protected]>
Wed, 6 Dec 2017 09:50:09 +0000 (09:50 +0000)
committerIngo Molnar <[email protected]>
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 <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
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;
 }