mirror of https://github.com/dynup/kpatch
23 lines
733 B
Diff
23 lines
733 B
Diff
|
Index: src/mm/mmap.c
|
||
|
===================================================================
|
||
|
--- src.orig/mm/mmap.c
|
||
|
+++ src/mm/mmap.c
|
||
|
@@ -1493,6 +1493,7 @@ static inline int accountable_mapping(st
|
||
|
return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE;
|
||
|
}
|
||
|
|
||
|
+#include "kpatch-macros.h"
|
||
|
unsigned long mmap_region(struct file *file, unsigned long addr,
|
||
|
unsigned long len, vm_flags_t vm_flags, unsigned long pgoff)
|
||
|
{
|
||
|
@@ -1502,6 +1503,9 @@ unsigned long mmap_region(struct file *f
|
||
|
struct rb_node **rb_link, *rb_parent;
|
||
|
unsigned long charged = 0;
|
||
|
|
||
|
+ if (!jiffies)
|
||
|
+ printk("kpatch mmap foo\n");
|
||
|
+
|
||
|
/* Check against address space limit. */
|
||
|
if (!may_expand_vm(mm, len >> PAGE_SHIFT)) {
|
||
|
unsigned long nr_pages;
|