Re: çå: Re: [PATCH] tty: max3100: Fix oops while 'cat/proc/tty/driver/ttyMAX'

From: Jiri Slaby
Date: Fri Sep 14 2018 - 07:28:18 EST


On 09/13/2018, 08:32 AM, chen.lin5@xxxxxxxxxx wrote:
> Â Â Â Â
>
> but 'get_mctrl' is already protected by Âthe upper layer by spin lock,
> so, will the races happen?
>
>
> for example: inÂ/drivers/tty/serial/serial_core.cÂ
>
> Â Â Â Â Â Â Â spin_lock_irq(&uport->lock);
>
> Â Â Â Â Â Â Â result |= uport->ops->get_mctrl(uport);
>
> Â Â Â Â Â Â Â spin_unlock_irq(&uport->lock);

Right, but creation and destroy of the workqueue is not locked as far as
I can see. Am I missing something?

thanks,.
--
js
suse labs