Re: [PATCH] vt_ioctl: fix potential spectre v1 in VT_DISALLOCATE

From: Xiaomeng Tong
Date: Wed Feb 23 2022 - 01:47:46 EST


On Tue, 22 Feb 2022 07:56:13 +0100, Jiri Slaby wrote:
> Could you add a break; here and remove the else branching completely?
> ...
> You could simply do:
> arg = array_index_nospec(arg - 1, MAX_NR_CONSOLES);
> and remove
> --arg;
> completely.

Already adjusted as suggested in Patch v2, thanks!

Best regards,
--
Xiaomeng Tong