Messages in this thread |  | | | Date | Tue, 26 Oct 2010 17:13:42 +0100 | | From | Alan Cox <> | | Subject | Re: [PATCH] tty_ldisc: Fix BUG() on hangup |
| |
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> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |