Re: [PATCH] Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.

2017-10-22 Thread Dean Jenkins
Hi Ronald, Sorry for my delay in replying to you. On 18/10/17 03:00, Life is hard, and then you die wrote: In fact, hci_uart_tty_close() is really a bit of a mess because it progressively removes resources. It is is based on old code which has been patched over the many years. Therefore it ha

Re: [PATCH] Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.

2017-10-17 Thread Life is hard, and then you die
Hi Dean, apologies for the slow reply, and thank you for the detailed response. On Mon, Oct 16, 2017 at 06:08:37PM +0100, Dean Jenkins wrote: > > On 15/10/17 11:40, =?UTF-8?q?Ronald=20Tschal=C3=A4r?= wrote: > >Lastly, the read-lock in the hci_uart_tx_wakeup() callback now needed > >to be remo

Re: [PATCH] Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.

2017-10-16 Thread Dean Jenkins
Hi Ronald, On 15/10/17 11:40, =?UTF-8?q?Ronald=20Tschal=C3=A4r?= wrote: Lastly, the read-lock in the hci_uart_tx_wakeup() callback now needed to be removed because that function is called from an IRQ context. But since it doesn't actually call any proto functions, instead just queueing the work,

[PATCH] Bluetooth: hci_ldisc: Allow sleeping while proto locks are held.

2017-10-15 Thread =?UTF-8?q?Ronald=20Tschal=C3=A4r?=
Commit dec2c92880cc5435381d50e3045ef018a762a917 ("Bluetooth: hci_ldisc: Use rwlocking to avoid closing proto races") introduced locks in hci_ldisc that are held while calling the proto functions. These locks are rwlock's, and hence do not allow sleeping while they are held. However, the proto funct