From 4ee80a8dcd538991afdcc7e87afea596c6157461 Mon Sep 17 00:00:00 2001
From: Andy Whitcroft <apw@canonical.com>
Date: Fri, 26 Jan 2018 12:37:13 +0000
Subject: [PATCH 36/89] Revert "fs: prevent speculative execution"

CVE-2017-5753 (revert embargoed)
CVE-2017-5715 (revert embargoed)

This reverts commit 1ca9e14b253a501f055c3ea29d992c028473676e.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 include/linux/fdtable.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/include/linux/fdtable.h b/include/linux/fdtable.h
index 09b124542bb8..6e84b2cae6ad 100644
--- a/include/linux/fdtable.h
+++ b/include/linux/fdtable.h
@@ -81,10 +81,8 @@ static inline struct file *__fcheck_files(struct files_struct *files, unsigned i
 {
 	struct fdtable *fdt = rcu_dereference_raw(files->fdt);
 
-	if (fd < fdt->max_fds) {
-		gmb();
+	if (fd < fdt->max_fds)
 		return rcu_dereference_raw(fdt->fd[fd]);
-	}
 	return NULL;
 }
 
-- 
2.15.1

