public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stuart MacDonald" <stuartm@connecttech.com>
To: "'Oliver Neukum'" <oliver@neukum.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: question on tty open and close
Date: Wed, 28 Mar 2007 09:22:15 -0400	[thread overview]
Message-ID: <019201c7713c$1a3277c0$294b82ce@stuartm> (raw)
In-Reply-To: <200703281516.31366.oliver@neukum.org>

From: Oliver Neukum [mailto:oliver@neukum.org] 
> Am Mittwoch, 28. März 2007 15:10 schrieb Stuart MacDonald:
> > > We find that a failure in open() leads to release_dev() 
> being called.
> > > release_dev() calls close():
> > > 
> > >       if (tty->driver->close)
> > >               tty->driver->close(tty, filp);
> > > 
> > > So we have a file that's closed although open() never succeeded?
> > 
> > That's correct! It's been a pain in my butt for years.
> 
> How did you deal with that proctological issue?

Just make sure the close() handles the situation properly. It makes
reference counting...  fun.

The serial driver has always handled it like this.

..Stu


  reply	other threads:[~2007-03-28 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 11:38 question on tty open and close Oliver Neukum
2007-03-28 13:10 ` Stuart MacDonald
2007-03-28 13:16   ` Oliver Neukum
2007-03-28 13:22     ` Stuart MacDonald [this message]
2007-03-28 14:44       ` Alan Cox
2007-03-28 15:26         ` Paul Fulghum
2007-03-28 15:31           ` Alan Cox
2007-03-28 14:54             ` Marcel Holtmann
2007-03-28 15:32             ` Paul Fulghum
  -- strict thread matches above, loose matches on Subject: below --
2007-03-28 14:37 Kilau, Scott

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='019201c7713c$1a3277c0$294b82ce@stuartm' \
    --to=stuartm@connecttech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.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