From 5b30dee6cc07fd91eedcb3a1ba1b81af8512c011 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 16 Mar 2020 07:45:44 +0100 Subject: [PATCH] vt: selection, fix double lock introduced by a merge The merge commit cb05c6c82fb0 (Merge 5.6-rc5 into tty-next) introduced a double lock to set_selection_kernel. vc_sel.lock is locked both in set_selection_kernel and its callee __set_selection_kernel now. Remove the latter. Signed-off-by: Jiri Slaby Cc: Stephen Rothwell Link: https://lore.kernel.org/r/20200316064544.4799-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/selection.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index 1a069979866c..582184dd386c 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c @@ -219,7 +219,6 @@ static int __set_selection_kernel(struct tiocl_selection *v, struct tty_struct * if (ps > pe) /* make vc_sel.start <= vc_sel.end */ swap(ps, pe); - mutex_lock(&vc_sel.lock); if (vc_sel.cons != vc_cons[fg_console].d) { clear_selection(); vc_sel.cons = vc_cons[fg_console].d;