mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
Attempt migration to Buildroot 2017.08 + kernel 4.12.
Build fails at: https://git.busybox.net/buildroot/commit/?id=c128c5f3c79b31d89256ffbc5c650ba613d3d52b
This commit is contained in:
@@ -14,13 +14,13 @@ Related:
|
||||
- https://github.com/ikwzm/udmabuf
|
||||
*/
|
||||
|
||||
#include <asm/uaccess.h> /* copy_from_user */
|
||||
#include <linux/fs.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/kernel.h> /* min */
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/uaccess.h> /* copy_from_user, copy_to_user */
|
||||
#include <linux/slab.h>
|
||||
|
||||
static const char *filename = "lkmc_mmap";
|
||||
@@ -38,13 +38,14 @@ static void vm_close(struct vm_area_struct *vma)
|
||||
}
|
||||
|
||||
/* First page access. */
|
||||
static int vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
int (*fault)(struct vm_fault *vmf);
|
||||
static int vm_fault(struct vm_fault *vmf)
|
||||
{
|
||||
struct page *page;
|
||||
struct mmap_info *info;
|
||||
|
||||
pr_info("vm_fault\n");
|
||||
info = (struct mmap_info *)vma->vm_private_data;
|
||||
info = (struct mmap_info *)vmf->vma->vm_private_data;
|
||||
if (info->data) {
|
||||
page = virt_to_page(info->data);
|
||||
get_page(page);
|
||||
|
||||
Reference in New Issue
Block a user