Commit 9b0f2582 authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman

USB: ftdi_sio: Note missing locking

The ftdi_sio driver has no internal locking on the dtr/rts state. Flag
that up for someone to fix.
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2097890c
...@@ -533,9 +533,8 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned ...@@ -533,9 +533,8 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
} }
buf = kmalloc(1, GFP_NOIO); buf = kmalloc(1, GFP_NOIO);
if (!buf) { if (!buf)
return -ENOMEM; return -ENOMEM;
}
clear &= ~set; /* 'set' takes precedence over 'clear' */ clear &= ~set; /* 'set' takes precedence over 'clear' */
urb_value = 0; urb_value = 0;
...@@ -568,6 +567,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned ...@@ -568,6 +567,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
(clear & TIOCM_DTR) ? "LOW" : "unchanged", (clear & TIOCM_DTR) ? "LOW" : "unchanged",
(set & TIOCM_RTS) ? "HIGH" : (set & TIOCM_RTS) ? "HIGH" :
(clear & TIOCM_RTS) ? "LOW" : "unchanged"); (clear & TIOCM_RTS) ? "LOW" : "unchanged");
/* FIXME: locking on last_dtr_rts */
priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set; priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set;
} }
return rv; return rv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment