]> git.proxmox.com Git - pve-kernel.git/blame - patches/kernel/0270-fs-prevent-speculative-execution.patch
update ZFS to 0.7.4 + ARC hit rate cherry-pick
[pve-kernel.git] / patches / kernel / 0270-fs-prevent-speculative-execution.patch
CommitLineData
035dbe67
FG
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Elena Reshetova <elena.reshetova@intel.com>
3Date: Mon, 4 Sep 2017 13:11:54 +0300
4Subject: [PATCH] fs: prevent speculative execution
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9CVE-2017-5753
10CVE-2017-5715
11
12Real commit text tbd
13
14Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
15Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
16Signed-off-by: Andy Whitcroft <apw@canonical.com>
17Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
18(cherry picked from commit 1ca9e14b253a501f055c3ea29d992c028473676e)
19Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
20---
21 include/linux/fdtable.h | 4 +++-
22 1 file changed, 3 insertions(+), 1 deletion(-)
23
24diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
25index 6e84b2cae6ad..09b124542bb8 100644
26--- a/include/linux/fdtable.h
27+++ b/include/linux/fdtable.h
28@@ -81,8 +81,10 @@ static inline struct file *__fcheck_files(struct files_struct *files, unsigned i
29 {
30 struct fdtable *fdt = rcu_dereference_raw(files->fdt);
31
32- if (fd < fdt->max_fds)
33+ if (fd < fdt->max_fds) {
34+ gmb();
35 return rcu_dereference_raw(fdt->fd[fd]);
36+ }
37 return NULL;
38 }
39
40--
412.14.2
42