Skip to content

Commit

Permalink
aufs mmap patches for k6.1 & k6.6 (#4329)
Browse files Browse the repository at this point in the history
* Add 6.1 & 6.6 patches

6.6 should be temporary

* Update apply 6.1 & 6.6 patches

6.6 should be temporary
  • Loading branch information
peabee authored Nov 30, 2024
1 parent 77a514f commit 8f7a81d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
12 changes: 12 additions & 0 deletions kernel-kit/patches/aufs_sources/apply
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,16 @@ if [ "$kseries" = "5.10" ] ; then
fi
fi

if [ "$kseries" = "6.1" ] ; then
if vercmp $kver ge 6.1.119 ; then
patch aufs6-mmap.patch ../patches/aufs_sources/k6.1.119.patch
fi
fi

if [ "$kseries" = "6.6" ] ; then
if vercmp $kver ge 6.6.63 ; then
patch aufs6-mmap.patch ../patches/aufs_sources/k6.6.63.patch
fi
fi

### END ###
15 changes: 15 additions & 0 deletions kernel-kit/patches/aufs_sources/k6.1.119.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- aufs6-mmap.patch.orig 2024-11-30 11:59:55.826601709 +0000
+++ aufs6-mmap.patch 2024-11-30 11:57:13.876603849 +0000
@@ -237,9 +237,9 @@
vma = merge;
/* Update vm_flags to pick up the change. */
@@ -2746,7 +2746,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
- if (vma->vm_ops && vma->vm_ops->close)
- vma->vm_ops->close(vma);
- unmap_and_free_vma:
+ return addr;
+
+ unmap_and_free_file_vma:
- fput(vma->vm_file);
+ vma_fput(vma);
vma->vm_file = NULL;
23 changes: 23 additions & 0 deletions kernel-kit/patches/aufs_sources/k6.6.63.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- aufs6-mmap.patch.orig 2024-11-30 12:04:39.029931230 +0000
+++ aufs6-mmap.patch 2024-11-30 11:42:03.209949373 +0000
@@ -219,14 +219,14 @@
vma = merge;
/* Update vm_flags to pick up the change. */
@@ -2904,7 +2904,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
+ return addr;

- if (file || vma->vm_file) {
- unmap_and_free_vma:
-- fput(vma->vm_file);
-+ vma_fput(vma);
- vma->vm_file = NULL;
+ unmap_and_free_file_vma:
+- fput(vma->vm_file);
++ vma_fput(vma);
+ vma->vm_file = NULL;

- vma_iter_set(&vmi, vma->vm_end);
+ vma_iter_set(&vmi, vma->vm_end);
@@ -2966,6 +2966,9 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
unsigned long populate = 0;
unsigned long ret = -EINVAL;

0 comments on commit 8f7a81d

Please sign in to comment.