Re: [PATCH net-next v2] 6pack: drop redundant locking and refcounting

From: Dan Carpenter

Date: Thu Sep 25 2025 - 02:12:26 EST


On Thu, Sep 25, 2025 at 01:10:59PM +0800, Qingfang Deng wrote:
> The TTY layer already serializes line discipline operations with
> tty->ldisc_sem, so the extra disc_data_lock and refcnt in 6pack
> are unnecessary.
>
> Removing them simplifies the code and also resolves a lockdep warning
> reported by syzbot. The warning did not indicate a real deadlock, since
> the write-side lock was only taken in process context with hardirqs
> disabled.
>
> Reported-by: syzbot+5fd749c74105b0e1b302@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://lore.kernel.org/all/68c858b0.050a0220.3c6139.0d1c.GAE@xxxxxxxxxx/
> Signed-off-by: Qingfang Deng <dqfext@xxxxxxxxx>
> ---
> v2: add Closes tag
> - https://lore.kernel.org/netdev/20250923060706.10232-1-dqfext@xxxxxxxxx/
>

Thanks!

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter