diff -urNp x-ref/include/linux/miscdevice.h x/include/linux/miscdevice.h --- x-ref/include/linux/miscdevice.h 2002-12-19 00:15:44.000000000 +0100 +++ x/include/linux/miscdevice.h 2002-12-19 01:16:40.000000000 +0100 @@ -20,6 +20,7 @@ #define RTC_MINOR 135 #define EFI_RTC_MINOR 136 /* EFI Time services */ #define SUN_OPENPROM_MINOR 139 +#define DMAPI_MINOR 140 /* DMAPI */ #define NVRAM_MINOR 144 #define I2O_MINOR 166 #define MICROCODE_MINOR 184 diff -urNp x-ref/include/linux/mm.h x/include/linux/mm.h --- x-ref/include/linux/mm.h 2002-12-19 01:16:21.000000000 +0100 +++ x/include/linux/mm.h 2002-12-19 01:16:28.000000000 +0100 @@ -132,6 +132,8 @@ struct vm_operations_struct { void (*open)(struct vm_area_struct * area); void (*close)(struct vm_area_struct * area); struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused); +#define HAVE_VMOP_MPROTECT + int (*mprotect)(struct vm_area_struct * area, unsigned int newflags); }; /* diff -urNp x-ref/mm/mprotect.c x/mm/mprotect.c --- x-ref/mm/mprotect.c 2002-12-19 01:16:19.000000000 +0100 +++ x/mm/mprotect.c 2002-12-19 01:16:28.000000000 +0100 @@ -302,6 +302,11 @@ asmlinkage long sys_mprotect(unsigned lo goto out; } + if (vma->vm_ops && vma->vm_ops->mprotect) { + error = vma->vm_ops->mprotect(vma, newflags); + if (error < 0) + goto out; + } if (vma->vm_end > end) { error = mprotect_fixup(vma, &prev, nstart, end, newflags); goto out;