From: "Theodore Ts'o" <tytso@mit.edu>
To: Ryan Arnold <rsa@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>,
Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hvc_console fix to protect hvc_write against ldisc write after hvc_close
Date: Wed, 15 Sep 2004 16:41:07 -0400 [thread overview]
Message-ID: <20040915204107.GA26776@thunk.org> (raw)
In-Reply-To: <1095273835.3294.278.camel@localhost>
On Wed, Sep 15, 2004 at 01:43:55PM -0500, Ryan Arnold wrote:
> Andrew,
>
> Due to the tty ldisc code not stopping write operations against a driver
> even after a tty has been closed I added a mechanism to hvc_console in
> my previous patch to prevent this by nulling out the tty->driver_data in
> hvc_close() but I forgot to check tty->driver_data in hvc_write().
> Anton Blanchard got several oops'es from hvc_write() accessing NULL as
> if it were a pointer to an hvc_struct usually stored in
> tty->driver_data.
>
> So this patch checks tty->driver_data in hvc_write() before it is used.
> Hopefully once Alan Cox's patch is checked in ldisc writes won't
> continue to happen after tty closes.
The current (I can't speak to what Alan Cox is going to change) rules
with tty drivers is that tty drivers are supposed to close the line
discpline in their close routines. That's the much safer and cleaner
way of fixing this problem, and it is in line with what most of the
other tty drivers are doing.
- Ted
next prev parent reply other threads:[~2004-09-15 20:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 18:43 [PATCH] hvc_console fix to protect hvc_write against ldisc write after hvc_close Ryan Arnold
2004-09-15 19:20 ` Alan Cox
2004-09-15 21:23 ` Ryan Arnold
2004-09-15 20:41 ` Theodore Ts'o [this message]
2004-09-15 21:36 ` Alan Cox
2004-09-15 22:35 ` Ryan Arnold
2004-09-24 1:15 ` ldisc writes during tty release_dev() causing problems Ryan Arnold
2004-09-24 12:40 ` Alan Cox
2004-09-24 16:18 ` Ryan Arnold
2004-09-24 15:30 ` Alan Cox
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=20040915204107.GA26776@thunk.org \
--to=tytso@mit.edu \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rsa@us.ibm.com \
/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