@@ -22071,6 +22071,9 @@ static long CoreFreqK_ioctl( struct file *filp,
22071
22071
static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
22072
22072
{
22073
22073
unsigned long reqSize = vma->vm_end - vma->vm_start;
22074
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
22075
+ vm_flags_t vm_ro = VM_READ;
22076
+ #endif
22074
22077
int rc = -EIO;
22075
22078
UNUSED(pfile);
22076
22079
@@ -22083,7 +22086,11 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
22083
22086
goto EXIT_PAGE;
22084
22087
}
22085
22088
22089
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
22090
+ vm_flags_reset_once(vma, vm_ro);
22091
+ #else
22086
22092
vma->vm_flags = VM_READ;
22093
+ #endif
22087
22094
vma->vm_page_prot = PAGE_READONLY;
22088
22095
22089
22096
rc = remap_pfn_range( vma,
@@ -22123,7 +22130,11 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
22123
22130
return -EAGAIN;
22124
22131
}
22125
22132
22133
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
22134
+ vm_flags_reset_once(vma, vm_ro);
22135
+ #else
22126
22136
vma->vm_flags = VM_READ;
22137
+ #endif
22127
22138
vma->vm_page_prot = PAGE_READONLY;
22128
22139
22129
22140
rc = remap_pfn_range( vma,
@@ -22150,7 +22161,11 @@ static int CoreFreqK_mmap(struct file *pfile, struct vm_area_struct *vma)
22150
22161
goto EXIT_PAGE;
22151
22162
}
22152
22163
22164
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
22165
+ vm_flags_reset_once(vma, vm_ro);
22166
+ #else
22153
22167
vma->vm_flags = VM_READ;
22168
+ #endif
22154
22169
vma->vm_page_prot = PAGE_READONLY;
22155
22170
22156
22171
rc = remap_pfn_range( vma,
0 commit comments