diff options
author | Eric Biggers <ebiggers@google.com> | 2020-02-24 11:03:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-02 16:11:00 +0300 |
commit | d1b6ab26c850ff1e02e895b10e74564a4df12483 (patch) | |
tree | 34a7daac26788acec27fe9cdcd59266a9dbb4796 /init | |
parent | c897e625f94b3dad181362c98f6eef61ef8471a9 (diff) | |
download | linux-d1b6ab26c850ff1e02e895b10e74564a4df12483.tar.xz |
vt: vt_ioctl: remove unnecessary console allocation checks
commit 1aa6e058dd6cd04471b1f21298270014daf48ac9 upstream.
The vc_cons_allocated() checks in vt_ioctl() and vt_compat_ioctl() are
unnecessary because they can only be reached by calling ioctl() on an
open tty, which implies the corresponding virtual console is allocated.
And even if the virtual console *could* be freed concurrently, then
these checks would be broken since they aren't done under console_lock,
and the vc_data is dereferenced before them anyway.
So, remove these unneeded checks to avoid confusion.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20200224080326.295046-1-ebiggers@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions