Skip to content

Commit

Permalink
efi/esrt: Use memunmap() instead of kfree() to free the remapping
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
SinkFinder authored and Ingo Molnar committed Dec 6, 2017
1 parent af97a77 commit 89c5a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/firmware/efi/esrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ static int __init esrt_sysfs_init(void)
err_remove_esrt:
kobject_put(esrt_kobj);
err:
kfree(esrt);
memunmap(esrt);
esrt = NULL;
return error;
}
Expand Down

0 comments on commit 89c5a2d

Please sign in to comment.