diff options
Diffstat (limited to 'drivers/misc/sgi-gru/grukdump.c')
-rw-r--r-- | drivers/misc/sgi-gru/grukdump.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c index 313da3150262..1540a7785e14 100644 --- a/drivers/misc/sgi-gru/grukdump.c +++ b/drivers/misc/sgi-gru/grukdump.c | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <asm/uv/uv_hub.h> | 29 | #include <asm/uv/uv_hub.h> |
30 | |||
31 | #include <linux/nospec.h> | ||
32 | |||
30 | #include "gru.h" | 33 | #include "gru.h" |
31 | #include "grutables.h" | 34 | #include "grutables.h" |
32 | #include "gruhandles.h" | 35 | #include "gruhandles.h" |
@@ -196,6 +199,7 @@ int gru_dump_chiplet_request(unsigned long arg) | |||
196 | /* Currently, only dump by gid is implemented */ | 199 | /* Currently, only dump by gid is implemented */ |
197 | if (req.gid >= gru_max_gids) | 200 | if (req.gid >= gru_max_gids) |
198 | return -EINVAL; | 201 | return -EINVAL; |
202 | req.gid = array_index_nospec(req.gid, gru_max_gids); | ||
199 | 203 | ||
200 | gru = GID_TO_GRU(req.gid); | 204 | gru = GID_TO_GRU(req.gid); |
201 | ubuf = req.buf; | 205 | ubuf = req.buf; |