vt: always call notifier with the console lock held
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 9 Jan 2019 03:55:00 +0000 (22:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2019 17:42:29 +0000 (19:42 +0200)
[ Upstream commit 7e1d226345f89ad5d0216a9092c81386c89b4983 ]

Every invocation of notify_write() and notify_update() is performed
under the console lock, except for one case. Let's fix that.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/tty/vt/vt.c

index 1fb5e7f409c4a9f9b2f19bb3196430e15583d13c..6ff921cf9a9e4c98e73ccacb11fc093b5f7e968c 100644 (file)
@@ -2435,8 +2435,8 @@ rescan_last_byte:
        }
        con_flush(vc, draw_from, draw_to, &draw_x);
        console_conditional_schedule();
-       console_unlock();
        notify_update(vc);
+       console_unlock();
        return n;
 }