Messages in this thread | | | From | OGAWA Hirofumi <> | Subject | Re: [PATCH 2/2] tty-ldisc: turn ldisc user count into a proper refcount | Date | Tue, 04 Aug 2009 05:00:27 +0900 |
| |
Linus Torvalds <torvalds@linux-foundation.org> 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@mail.parknet.co.jp>
| |