mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
ecryptfs: fix kernel bug introduced in 4.4.14
Introduced by mainline commit 2f36db7 Patch is from http://www.spinics.net/lists/stable/msg137350.html Fixes #16766
This commit is contained in:
parent
5737c26b6b
commit
fad9a8841b
20
pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch
Normal file
20
pkgs/os-specific/linux/kernel/ecryptfs-fix-mmap-bug.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxx>
|
||||
Tested-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxx> # 4.4.y, 3.18.y
|
||||
Cc: <stable@xxxxxxxxxxxxxxx> # 4.5-
|
||||
---
|
||||
fs/ecryptfs/kthread.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/fs/ecryptfs/kthread.c b/fs/ecryptfs/kthread.c
|
||||
index e818f5a..b9faeab 100644
|
||||
--- a/fs/ecryptfs/kthread.c
|
||||
+++ b/fs/ecryptfs/kthread.c
|
||||
@@ -171,7 +171,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
|
||||
goto out;
|
||||
}
|
||||
have_file:
|
||||
- if ((*lower_file)->f_op->mmap == NULL) {
|
||||
+ if ((*lower_file)->f_op->mmap == NULL && !d_is_dir(lower_dentry)) {
|
||||
fput(*lower_file);
|
||||
*lower_file = NULL;
|
||||
rc = -EMEDIUMTYPE;
|
@ -148,4 +148,8 @@ rec {
|
||||
sha256 = "14rm1qr87p7a5prz8g5fwbpxzdp3ighj095x8rvhm8csm20wspyy";
|
||||
};
|
||||
};
|
||||
ecryptfs_fix_mmap_bug =
|
||||
{ name = "ecryptfs_fix_mmap_bug";
|
||||
patch = ./ecryptfs-fix-mmap-bug.patch;
|
||||
};
|
||||
}
|
||||
|
@ -10954,6 +10954,7 @@ in
|
||||
[ kernelPatches.bridge_stp_helper
|
||||
kernelPatches.qat_common_Makefile
|
||||
kernelPatches.hiddev_CVE_2016_5829
|
||||
kernelPatches.ecryptfs_fix_mmap_bug
|
||||
]
|
||||
++ lib.optionals ((platform.kernelArch or null) == "mips")
|
||||
[ kernelPatches.mips_fpureg_emu
|
||||
|
Loading…
Reference in New Issue
Block a user