kernel: ashmem: use kallsyms_lookup_name for internal symbol access
This commit is contained in:
parent
0887abe263
commit
f2110223d1
3 changed files with 6 additions and 27 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue