Re: [PATCH] tty: ldisc: fix deadlock between ldisc_sem and rtnl_mutex

From: Zhou, Yun

Date: Thu Jul 16 2026 - 23:46:46 EST


Hi Jagielski,

On 7/16/26 15:59, Jagielski, Jedrzej wrote:
CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

From: Yun Zhou <yun.zhou@xxxxxxxxxxxxx>
Sent: Thursday, July 16, 2026 8:47 AM

syzbot reported a circular lock dependency involving tty ldisc_sem and
the networking rtnl_mutex. The full chain is:

rtnl_mutex --> nft_commit_mutex --> ... --> ep->mtx --> ldisc_sem --> rtnl_mutex

still unclear where the first mutex may come from

tty_set_ldisc()
tty_ldisc_lock() <- hold ldisc_sem
tty_ldisc_open()
slcan_open()
register_candev()
register_netdev()
rtnl_net_lock_killable() <- hold rtnl_mutex



+ tty_ldisc_unlock(tty);

+ /*

this blank line is redundant i believe


Isn't it common practice to leave the first line of a multi-line comment blank? Does it violate the coding style guidelines?

BR,
Yun