From: Andrew Morton <akpm@osdl.org>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty races
Date: Tue, 3 May 2005 17:50:23 -0700 [thread overview]
Message-ID: <20050503175023.627bd904.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0505030923560.10633@dhcp83-105.boston.redhat.com>
Jason Baron <jbaron@redhat.com> wrote:
>
> >
> > I don't see anywhere which takes lock_kernel() on the tty_open() path.
> >
>
> fs/char_dev.c:chrdev_open():
>
> if (filp->f_op->open) {
> lock_kernel();
> ret = filp->f_op->open(inode,filp);
> unlock_kernel();
> }
>
hm, we're still doing that.
> >
> > We want to move away from lock_kernel()-based locking.
> >
>
> I completely agree, but unfortunately lock_kernel() is currently used
> extensively throughout the tty layer.
Well no - it's being migrated over to use tty_sem. We shouldn't start
heading in the reverse direction. Plus your patch reverts part of
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/char/tty_io.c@1.156?nav=index.html|src/|src/drivers|src/drivers/char|hist/drivers/char/tty_io.c
in ways which might be unsafe.
> lock_kernel() is used extensively throughout the tty layer. We can
> re-write the locking for the layer, but I'd like to see this bug fix in
> 2.6.12, if that isn't done in time.
Sorry, but AFAICT all you have done is to advocate for the existing patch
without having attempted to fix this problem with tty_sem. Please try to
come up with a tty_sem-based fix.
next prev parent reply other threads:[~2005-05-04 0:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 16:44 Jason Baron
2005-04-26 6:22 ` Andrew Morton
2005-04-26 13:52 ` Jason Baron
2005-05-03 6:27 ` Andrew Morton
2005-05-03 13:33 ` Jason Baron
2005-05-04 0:50 ` Andrew Morton [this message]
2005-05-04 1:13 ` Jason Baron
2005-05-04 1:25 ` Andrew Morton
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=20050503175023.627bd904.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jbaron@redhat.com \
--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
all inboxes | Powered by JetHome®