Re: [PATCHv5 1/7] tty: Drop tty->count on tty_reopen() failure
From: Greg Kroah-Hartman
Date: Tue Sep 18 2018 - 09:41:57 EST
On Tue, Sep 18, 2018 at 12:52:52AM +0100, Dmitry Safonov wrote:
> In case of tty_ldisc_reinit() failure, tty->count should be decremented
> back, otherwise we will never release_tty().
> Tetsuo reported that it fixes noisy warnings on tty release like:
> pts pts4033: tty_release: tty->count(10529) != (#fd's(7) + #kopen's(0))
>
> Fixes: commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup")
>
Minor nit, no need to have "commit" in this line, it's implied.
Also, no need to put an extra line here either.
I'll queue this patch up now, have some question about the rest...
thanks,
greg k-h