Hi, On Mon, Oct 02, 2017 at 05:23:48PM +0200, Hans de Goede wrote: > Fix a NULL pointer deref (hu->tty) when calling hci_uart_set_flow_control > on hci_uart-s using serdev. > > Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx> > --- > drivers/bluetooth/hci_ldisc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c > index a746627e784e..d02f6d029093 100644 > --- a/drivers/bluetooth/hci_ldisc.c > +++ b/drivers/bluetooth/hci_ldisc.c > @@ -41,6 +41,7 @@ > #include <linux/ioctl.h> > #include <linux/skbuff.h> > #include <linux/firmware.h> > +#include <linux/serdev.h> > > #include <net/bluetooth/bluetooth.h> > #include <net/bluetooth/hci_core.h> > @@ -298,6 +299,11 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable) > unsigned int set = 0; > unsigned int clear = 0; > > + if (hu->serdev) { > + serdev_device_set_flow_control(hu->serdev, !enable); > + return; > + } I think this should also control rts, so that the behaviour is the same for serdev and ldisc implementation: serdev_device_set_rts(serdev, enable); > + > if (enable) { > /* Disable hardware flow control */ > ktermios = tty->termios; -- Sebastian
Attachment:
signature.asc
Description: PGP signature