aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64/um_module.c
blob: 3dead392a415d3abb5421582ac251298fcd99cf3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <linux/vmalloc.h>
#include <linux/moduleloader.h>

/* Copied from i386 arch/i386/kernel/module.c */
void *module_alloc(unsigned long size)
{
	if (size == 0)
		return NULL;
	return vmalloc_exec(size);
}

/* Free memory returned from module_alloc */
void module_free(struct module *mod, void *module_region)
{
	vfree(module_region);
	/*
	 * FIXME: If module_region == mod->init_region, trim exception
	 * table entries.
	 */
}