From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Philippe Rétornaz" <philippe.retornaz@epfl.ch>
Cc: Alan Cox <alan@linux.intel.com>,
"Greg Kroah-Hartman" <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty_ldisc: Fix BUG() on hangup
Date: Tue, 26 Oct 2010 17:13:42 +0100 [thread overview]
Message-ID: <20101026171342.580a1f94@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <201010261749.03875.philippe.retornaz@epfl.ch>
On Tue, 26 Oct 2010 17:49:03 +0200
Philippe Rétornaz <philippe.retornaz@epfl.ch> wrote:
> Hello
>
> A kernel BUG when bluetooth rfcomm connection drop while
> the associated serial port is open is sometime triggered.
>
> It seems that the line discipline can disappear between the tty_ldisc_put and
> tty_ldisc_get. This patch fall back to the N_TTY line discipline if the
> previous discipline is not available anymore.
>
> This seem to fix the BUG(), but I don't know if it's correct.
I can see what you are trying to handle, and in theory you could if you
unload modules as they go unused hit a race there - I'm amazed it's
possible however.
The first part looks right - grab the reference before changing over and
error if it isn't available, and the second part follows logically,
although that bit of the hangup code is looking even more untidy now.
Acked-by: Alan Cox <alan@linux.intel.com>
next prev parent reply other threads:[~2010-10-26 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 15:49 Philippe Rétornaz
2010-10-26 16:13 ` Alan Cox [this message]
2010-10-27 15:13 ` Philippe Rétornaz
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=20101026171342.580a1f94@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=philippe.retornaz@epfl.ch \
/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®