Re: [PATCHv2 1/4] tty: Drop tty->count on tty_reopen() failure

From: Jiri Slaby
Date: Tue Sep 04 2018 - 04:59:00 EST


On 09/03/2018, 06:52 PM, 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))
>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: Jiri Slaby <jslaby@xxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx # v4.6+
> Fixes: commit 892d1fa7eaae ("tty: Destroy ldisc instance on hangup")
> Tested-by: Jiri Slaby <jslaby@xxxxxxxx>

Reviewed-by: Jiri Slaby <jslaby@xxxxxxx>

> Tested-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Dmitry Safonov <dima@xxxxxxxxxx>

thanks,
--
js
suse labs