Skip to content

Commit

Permalink
USB: ftdi_sio: Note missing locking
Browse files Browse the repository at this point in the history
The ftdi_sio driver has no internal locking on the dtr/rts state. Flag
that up for someone to fix.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Apr 25, 2008
1 parent 2097890 commit 9b0f258
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,8 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
}

buf = kmalloc(1, GFP_NOIO);
if (!buf) {
if (!buf)
return -ENOMEM;
}

clear &= ~set; /* 'set' takes precedence over 'clear' */
urb_value = 0;
Expand Down Expand Up @@ -568,6 +567,7 @@ static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned
(clear & TIOCM_DTR) ? "LOW" : "unchanged",
(set & TIOCM_RTS) ? "HIGH" :
(clear & TIOCM_RTS) ? "LOW" : "unchanged");
/* FIXME: locking on last_dtr_rts */
priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set;
}
return rv;
Expand Down

0 comments on commit 9b0f258

Please sign in to comment.