blob: c56c72fe58619d6ccb7e7665ff8d1ea3d78f953f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
commit 2f7fbc052b632c0ae2d4a2bb5d5c928bbc24ca43
Author: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Date: Tue Apr 9 04:12:18 2019 +0200
Revert "aio: fix spectre gadget in lookup_ioctx"
This reverts commit 3a7bac902691cd92cb69f95d98dc675dea8b3228.
diff --git a/fs/aio.c b/fs/aio.c
index c3fc80294397..b1170a7affe2 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -40,7 +40,6 @@
#include <linux/ramfs.h>
#include <linux/percpu-refcount.h>
#include <linux/mount.h>
-#include <linux/nospec.h>
#include <asm/kmap_types.h>
#include <asm/uaccess.h>
@@ -1072,7 +1071,6 @@ static struct kioctx *lookup_ioctx(unsigned long ctx_id)
if (!table || id >= table->nr)
goto out;
- id = array_index_nospec(id, table->nr);
ctx = rcu_dereference(table->table[id]);
if (ctx && ctx->user_id == ctx_id) {
if (percpu_ref_tryget_live(&ctx->users))
|