Skip to contentSkip to conversation

vt: selection, fix double lock introduced by a merge

PATCH New Jiri Slaby 1 participant 1 message Mar 16, 2020 TTY layer and serial drivers

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 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.

Cc Stephen Rothwell <[email protected]>
---
 drivers/tty/vt/selection.c | 1 -
 1 file changed, 1 deletion(-)
drivers/tty/vt/selection.c +0 -1
index 1a069979866c..582184dd386c 100644
@@ -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;
Signature · 1 line
2.25.1