[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <476AC51F.70400@davidnewall.com>
Date: Fri, 21 Dec 2007 06:10:15 +1030
From: David Newall <david@...idnewall.com>
To: Arjan van de Ven <arjan@...ux.intel.com>
CC: Alan Cox <alan@...rguk.ukuu.org.uk>,
Marcel Holtmann <marcel@...tmann.org>,
linux-kernel@...r.kernel.org
Subject: Re: Kernel bug: bluetooth meets TTY layer
Hi Arjan,
I've not been able to find this file, "drivers/bluetooth/hci_tty.c", but
anyway, This seems to be what happens: Hci_uart_close() flushes using
hci_uart_flush(). Subsequently, in hci_dev_do_close(), (one step in
hci_unregister_dev()), hci_uart_flush() is called again. The comment in
uart_flush_buffer(), relating to the WARN_ON(), indicates you can't
flush after the port is closed; which sounds reasonable. I think
hci_uart_close() should set hdev->flush to NULL before returning.
Hci_dev_do_close() does check for this. The code path is rather
involved and I'm not entirely clear of all steps, but I think that's
what should be done.
Patch for stupidly obsolete kernel attached.
David
View attachment "hci_ldisc.c.patch" of type "text/x-diff" (514 bytes)
Powered by blists - more mailing lists