diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index c13e050de83b..ce447477ccf3 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -3186,6 +3186,11 @@ static int gsm_activate_mux(struct gsm_mux *gsm) struct gsm_dlci *dlci; int ret; + guard(mutex)(&gsm->mutex); + + if (unlikely(gsm->dlci[0])) + return -EBUSY; + dlci = gsm_dlci_alloc(gsm, 0); if (dlci == NULL) return -ENOMEM;