Re: [PATCH net,v3] net: ppp: Fix deadlock caused by unsafe-irq lock in ap_get()

From: Jeongjun Park
Date: Mon Apr 22 2024 - 04:58:16 EST


Jiri Slaby wrote:
> OK, but read_unlock_irq() is not the right way to do it. It would enable
> irqs unconditionally, so serial8250_tx_chars() would not thank you in
> the above call chain.
>
> Plus the issues Jakub had with the patch.
>
> And what about ppp_synctty?

Hmm... If the problem is the case of calling the function in
serial8250_tx_chars(), I think it can be solved by continuing to use
read_lock() in ppp_asynctty_wakeup() and getting the ap by not calling
ap_get().

If I do this, will I be able to apply the existing patch to ap_get()?

Thanks.