Hi,

On Thu, Sep 17, 2026 at 8:55 AM Wentao Liang <[email protected]> wrote:
>
> tty_find_polling_driver() returns the tty driver with an extra
> reference taken by tty_driver_kref_get(). configure_kgdboc() stores it
> in kgdb_tty_driver but the reference is never dropped: it is leaked when
> kgdb_register_io_module() fails, when the configuration is cleared, and
> on every reconfigure.
>
> Release the reference both when unconfiguring and on the error path.
>
> Fixes: 7d7b93c1452f ("tty: kref the tty driver object")
> Cc: [email protected]
> Signed-off-by: Wentao Liang <[email protected]>
> ---
>  drivers/tty/serial/kgdboc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Looks right to me. Even the "Fixes" looks right since the tty change
landed after kgdb was added to the mainline kernel (by a ~6 months).

Reviewed-by: Douglas Anderson <[email protected]>


_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to