Re: [PATCH] tty: hvc: Fix data abort due to race in hvc_open

From: Markus Elfring
Date: Tue Apr 28 2020 - 08:48:52 EST


> Hence, serialize hvc_open and check if tty->private_data is NULL before
> proceeding ahead.

How do you think about to add the tag âFixesâ because of adjustments
for the data synchronisation?


â
> +++ b/drivers/tty/hvc/hvc_console.c
â
@@ -384,6 +394,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
â
> +out:
> + mutex_unlock(&hvc_open_mutex);
> return rc;
> }

I suggest to use the label âunlockâ instead.

Regards,
Markus