From: Marcel Holtmann <marcel@holtmann.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Fulghum <paulkf@microgate.com>,
Stuart MacDonald <stuartm@connecttech.com>,
"'Oliver Neukum'" <oliver@neukum.org>,
linux-kernel@vger.kernel.org
Subject: Re: question on tty open and close
Date: Wed, 28 Mar 2007 16:54:41 +0200 [thread overview]
Message-ID: <1175093681.5815.145.camel@violet> (raw)
In-Reply-To: <20070328163158.658b372a@the-village.bc.nu>
Hi Alan,
> > As long as the new behavior continues to call
> > driver->close() if driver->open() succeeds
> > then I see no problem.
>
> It breaks if any existing driver is doing no cleanup in ->open() when it
> fails but relying upon ->close() being called. That is what needs
> auditing first of all.
I know at least that the Bluetooth TTY emulation (RFCOMM) will break
since I have a big fat warning in my code:
/* We don't leak this refcount. For reasons which are not entirely
clear, the TTY layer will call our ->close() method even if the
open fails. We decrease the refcount there, and decreasing it
here too would cause breakage. */
dev = rfcomm_dev_get(id);
if (!dev)
return -ENODEV;
Regards
Marcel
next prev parent reply other threads:[~2007-03-28 14:55 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
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 [this message]
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=1175093681.5815.145.camel@violet \
--to=marcel@holtmann.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=paulkf@microgate.com \
--cc=stuartm@connecttech.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