lkml.org 
[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/6] arch/x86: Implement text_alloc() and text_free()

* Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> wrote:

> +void text_free(void *region)
> +{
> + /*
> + * This memory may be RO, and freeing RO memory in an interrupt is not
> + * supported by vmalloc.
> + */
> + lockdep_assert_irqs_enabled();
> +
> + vfree(region);

Had to dig around a bit to find the source of this restriction. Might
make sense to clarify this comment to:

/*
* This memory may be read-only, and freeing VM_FLUSH_RESET_PERMS memory
* in an interrupt is not supported by vmalloc.
*/

Thanks,

Ingo

\
 
 \ /
  Last update: 2020-07-24 11:23    [W:0.204 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site