From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Aristeu Sergio Rozanski Filho <aris@ruivo.org>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vt: fix vcs* sysfs file creation race [v2]
Date: Fri, 23 May 2008 20:04:40 +0100 [thread overview]
Message-ID: <20080523200440.1f3efa62@core> (raw)
In-Reply-To: <20080523161434.GE5713@cathedrallabs.org>
> But this isn't the only problem. Currently release_dev() checks for
> tty->count without holding any locks but BKL that is acquired on tty_release()
> and several tty drivers also check tty->count and some of them without even
Yes - the old stable branches were fixed to used atomic_t but for some
reason this never ended up in 2.5/2.6.
> 1) We get rid of tty->count usage on drivers by implementing internal
> counters. This solution would allow us to fix each driver before
> converting tty->count into a kref and only be used by tty layer. This
> proposed patch does eliminate tty->count usage on vt.
We need to do this anyway because of the race between an interrupt on one
processor and a hangup/close on another. So tty needs a kref and if tty
has a kref count it might as well be the tty->count replacement. It's on
my todo list but feel free to beat me to it.
> 2) We kill the current one open/close for each tty_open, only calling
> driver's open and close on the first open and last close. By looking on
> the tty drivers, none of them do anything important with multiple opens
> anyway (but I might be wrong on this).
Several use it to track things like board use counters. I'd prefer to
avoid that change, especially as it isn't needed long term. Also long
term tty->open is moving towards standardised library code - thats where
having tty_port leads.
kref the tty not the vty would be my suggestion.
Alan
prev parent reply other threads:[~2008-05-23 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-01 19:21 [PATCH] RFC: vt: fix vcs* sysfs file creation race Aristeu Sergio Rozanski Filho
2008-05-14 3:42 ` Andrew Morton
2008-05-23 16:14 ` [PATCH] vt: fix vcs* sysfs file creation race [v2] Aristeu Sergio Rozanski Filho
2008-05-23 19:04 ` Alan Cox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080523200440.1f3efa62@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@linux-foundation.org \
--cc=aris@ruivo.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox