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
commit 89c5a2d upstream.

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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
SinkFinder authored and gregkh committed Dec 14, 2017
1 parent 985ce9e commit f4d9017
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 f4d9017

Please sign in to comment.