Re: [PATCH 2/2] tty-ldisc: turn ldisc user count into a proper refcount

From: OGAWA Hirofumi
Date: Mon Aug 03 2009 - 16:00:39 EST


Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes:

> Whatever. The patch _looks_ sensible to me. The only users of ldisc->users
> are:
> - get_ldisc() - atomically increment the count
>
> - put_ldisc() - atomically decrements the count and releases if zero
>
> - tty_ldisc_try_get() - creates the ldisc, and sets the count to 1.
> The ldisc should then either be released, or be attached to a tty.
>
> Comments? Testing?

This works for me. And it seems there is no refcount leak in this
shutdown case.

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/