kernel: ashmem: use kallsyms_lookup_name for internal symbol access

This commit is contained in:
Simon Fels 2016-12-06 08:16:32 +01:00
commit f2110223d1
3 changed files with 6 additions and 27 deletions

View file

@ -1,10 +1,11 @@
#include <linux/mm.h>
#include <linux/kallsyms.h>
#include "deps.h"
static int (*shmem_zero_setup_ptr)(struct vm_area_struct *) = SHMEM_ZERO_SETUP;
static int (*shmem_zero_setup_ptr)(struct vm_area_struct *) = NULL;
int shmem_zero_setup(struct vm_area_struct *vma)
{
return shmem_zero_setup_ptr(vma);
if (!shmem_zero_setup_ptr)
shmem_zero_setup_ptr = kallsyms_lookup_name("shmem_zero_setup");
return shmem_zero_setup_ptr(vma);
}