diff -uNr -Xdontdiff -p linux-2.4.19/include/linux/miscdevice.h linux-2.4-xfs/include/linux/miscdevice.h --- linux-2.4.19/include/linux/miscdevice.h Thu Sep 5 13:38:33 2002 +++ linux-2.4-xfs/include/linux/miscdevice.h Wed Sep 4 22:21:04 2002 @@ -19,6 +19,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 -uNr -Xdontdiff -p linux-2.4.19/include/linux/mm.h linux-2.4-xfs/include/linux/mm.h --- linux-2.4.19/include/linux/mm.h Thu Sep 5 13:38:40 2002 +++ linux-2.4-xfs/include/linux/mm.h Wed Sep 4 22:20:09 2002 @@ -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 -uNr -Xdontdiff -p linux-2.4.19/mm/mprotect.c linux-2.4-xfs/mm/mprotect.c --- linux-2.4.19/mm/mprotect.c Thu Sep 5 13:41:57 2002 +++ linux-2.4-xfs/mm/mprotect.c Thu Jul 11 19:14:53 2002 @@ -300,6 +300,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;